Class NameDescriptor
- java.lang.Object
-
- cc.redberry.core.context.NameDescriptor
-
- Direct Known Subclasses:
- NameDescriptorForSimpleTensor, NameDescriptorForTensorField
public abstract class NameDescriptor extends java.lang.ObjectObject 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 throughNameManager.mapNameDescriptor(String, cc.redberry.core.indices.StructureOfIndices...). In order to receive the descriptor from a simple tensor object, one should useSimpleTensor.getNameDescriptor()method.- Since:
- 1.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description static NameAndStructureOfIndicesextractKey(NameDescriptor nd)Returns structure of indices of tensors with specified name descriptorStructureOfIndicesgetArgStructureOfIndices(int arg)Returns structure of i-th arg indices of tensors with this name descriptorintgetId()Returns unique simple tensor identifierjava.lang.StringgetName(SimpleIndices indices)Returns string name of tensor.abstract java.lang.StringgetName(SimpleIndices indices, OutputFormat format)Returns string name of tensor in specified output format.StructureOfIndicesgetStructureOfIndices()Returns structure of indices of tensors with this name descriptorStructureOfIndices[]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)IndicesSymmetriesgetSymmetries()Returns symmetries of indices of tensors with this name descriptorbooleanisField()Returnstrueif this is a descriptor of tensor fieldjava.lang.StringtoString()
-
-
-
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()
Returnstrueif this is a descriptor of tensor field- Returns:
trueif 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 benull.- 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 benull.- Parameters:
indices- indices (in case of metric or Kronecker) and null in other casesformat- output format- Returns:
- string name of tensor
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.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