Documentation of 'cc.redberry.core.context.NameDescriptor' Java class
NameDescriptor
cc.redberry.core.context

Class NameDescriptor

  • Direct Known Subclasses:
    NameDescriptorForSimpleTensor, NameDescriptorForTensorField


    public abstract class NameDescriptor
    extends java.lang.Object
    Object of this class represents unique type of simple tensor or tensor fields (unique name).

    It holds the information about string name of simple tensor, structure of its indices and arguments (in case of tensor field). Two simple tensors are considered to have different mathematical nature if and only if their name descriptors are not equal. Each simple tensor with unique mathematical nature have its own unique integer identifier, which is hold in the name descriptor. For example, tensors A_mn and A_ij have the same mathematical origin and thus have the same integer identifier and both have the same name descriptor (the same reference). In contrast, for example, tensors A_mn and A_i have different mathematical origin and different integer identifiers.

    This class have no public constructors, since Redberry takes care about its creation (see NameManager). The only way to receive name descriptor from raw information about tensor is through NameManager.mapNameDescriptor(String, cc.redberry.core.indices.StructureOfIndices...). In order to receive the descriptor from a simple tensor object, one should use SimpleTensor.getNameDescriptor() method.

    Since:
    1.0
    • Method Detail

      • getId

        public int getId()
        Returns unique simple tensor identifier
        Returns:
        unique simple tensor identifier
      • getSymmetries

        public IndicesSymmetries getSymmetries()
        Returns symmetries of indices of tensors with this name descriptor
        Returns:
        symmetries of indices of tensors with this name descriptor
      • isField

        public boolean isField()
        Returns true if this is a descriptor of tensor field
        Returns:
        true if this is a descriptor of tensor field
      • getStructureOfIndices

        public StructureOfIndices getStructureOfIndices()
        Returns structure of indices of tensors with this name descriptor
        Returns:
        structure of indices of tensors with this name descriptor
      • getArgStructureOfIndices

        public StructureOfIndices getArgStructureOfIndices(int arg)
        Returns structure of i-th arg indices of tensors with this name descriptor
        Returns:
        structure of i-th arg indices indices of tensors with this name descriptor
      • getStructuresOfIndices

        public StructureOfIndices[] getStructuresOfIndices()
        Returns structure of indices of tensors with this name descriptor (first element in array) and structures of indices of their arguments (in case of tensor field)
        Returns:
        structure of indices of tensors and their arguments
      • getName

        public java.lang.String getName(SimpleIndices indices)
        Returns string name of tensor. The argument can be null.
        Parameters:
        indices - indices (in case of metric or Kronecker) and null in other cases
        Returns:
        string name of tensor
      • getName

        public abstract java.lang.String getName(SimpleIndices indices,
                                                 OutputFormat format)
        Returns string name of tensor in specified output format. The first argument can be null.
        Parameters:
        indices - indices (in case of metric or Kronecker) and null in other cases
        format - output format
        Returns:
        string name of tensor
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • extractKey

        public static NameAndStructureOfIndices extractKey(NameDescriptor nd)
        Returns structure of indices of tensors with specified name descriptor
        Parameters:
        nd - name descriptor
        Returns:
        structure of indices of tensors with specified name descriptor

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.