cc.redberry.core.tensor
Class Expression
- java.lang.Object
-
- cc.redberry.core.tensor.Tensor
-
- cc.redberry.core.tensor.Expression
-
- All Implemented Interfaces:
- Transformation, java.lang.Comparable<Tensor>, java.lang.Iterable<Tensor>
public class Expression extends Tensor implements Transformation
Representation of mathematical expression A = B.Expressionalso implementsTransformationand represents substitutions.- Since:
- 1.0
- See Also:
ExpressionBuilder,ExpressionFactory
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface cc.redberry.core.transformations.Transformation
Transformation.Util
-
-
Field Summary
-
Fields inherited from interface cc.redberry.core.transformations.Transformation
INDENTITY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Tensorget(int i)Returns element at i-th position.TensorBuildergetBuilder()Creates a builder for this tensor.TensorFactorygetFactory()Returns a factory for this tensor.IndicesgetIndices()Returns indices of this tensor.booleanisIdentity()Returnstrueif r.h.s.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.Tensortransform(Tensor t)Transforms specified tensor and returns the result.Expressiontranspose()Swaps l.h.s.
-
-
-
Method Detail
-
get
public Tensor get(int i)
Description copied from class:TensorReturns element at i-th position.
-
getIndices
public Indices getIndices()
Description copied from class:TensorReturns indices of this tensor.- Specified by:
getIndicesin classTensor- Returns:
- indices of this tensor
-
size
public int size()
Description copied from class:TensorReturns the number of elements in this tensor.
-
toString
public java.lang.String toString(OutputFormat mode)
Description copied from class:TensorReturns a string representation of a tensor according to the specifiedOutputFormat.
-
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
-
transform
public Tensor transform(Tensor t)
Description copied from interface:TransformationTransforms specified tensor and returns the result.- Specified by:
transformin interfaceTransformation- Parameters:
t- tensor- Returns:
- transformed tensor
-
isIdentity
public boolean isIdentity()
Returnstrueif r.h.s. is equal to l.h.s.- Returns:
trueif r.h.s. is equal to l.h.s.
-
transpose
public Expression transpose()
Swaps l.h.s. and r.h.s. of expression.- Returns:
- swapped expression
-
-
DataMelt 3.0 © DataMelt by jWork.ORG