cc.redberry.core.tensor
Class SimpleTensor
- java.lang.Object
-
- cc.redberry.core.tensor.Tensor
-
- cc.redberry.core.tensor.SimpleTensor
-
- Direct Known Subclasses:
- TensorField
public class SimpleTensor extends Tensor
Implementation of simple tensor.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object obj)Tensorget(int i)Returns element at i-th position.TensorBuildergetBuilder()Creates a builder for this tensor.TensorFactorygetFactory()Returns a factory for this tensor.SimpleIndicesgetIndices()Returns indices of this tensor.intgetName()Returns the name (unique identifier) of this tensor.NameDescriptorgetNameDescriptor()java.lang.StringgetStringName()java.util.Iterator<Tensor>iterator()Return read-only iterator over tensor elements.intsize()Returns the number of elements in this tensor.java.lang.StringtoString(OutputFormat mode)Returns a string representation of a tensor according to the specifiedOutputFormat.java.lang.StringtoString(OutputFormat mode, java.lang.Class clazz)For internal use.
-
-
-
Method Detail
-
getName
public int getName()
Returns the name (unique identifier) of this tensor.- Returns:
- name of this tensor
- See Also:
NameDescriptor
-
getIndices
public SimpleIndices getIndices()
Description copied from class:TensorReturns indices of this tensor.- Specified by:
getIndicesin classTensor- Returns:
- indices of this tensor
-
get
public Tensor get(int i)
Description copied from class:TensorReturns element at i-th position.
-
size
public int size()
Description copied from class:TensorReturns the number of elements in this tensor.
-
toString
public java.lang.String toString(OutputFormat mode, java.lang.Class clazz)
Description copied from class:TensorFor internal use.
-
toString
public java.lang.String toString(OutputFormat mode)
Description copied from class:TensorReturns a string representation of a tensor according to the specifiedOutputFormat.
-
iterator
public java.util.Iterator<Tensor> iterator()
Description copied from class:TensorReturn read-only iterator over tensor elements.
-
getBuilder
public TensorBuilder getBuilder()
Description copied from class:TensorCreates a builder for this tensor. SeeTensorBuilderfor more information.- Specified by:
getBuilderin classTensor- Returns:
- builder for this tensor
-
getFactory
public TensorFactory getFactory()
Description copied from class:TensorReturns a factory for this tensor. SeeTensorFactoryfor more information.- Specified by:
getFactoryin classTensor- Returns:
- builder for this tensor
-
getNameDescriptor
public NameDescriptor getNameDescriptor()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getStringName
public java.lang.String getStringName()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG