Documentation of 'cc.redberry.core.tensor.Tensors' Java class
Tensors
cc.redberry.core.tensor

Class Tensors



  • public final class Tensors
    extends java.lang.Object
    Factory methods to create tensors.
    Since:
    1.0
    • Method Detail

      • pow

        public static Tensor pow(Tensor argument,
                                 int power)
        Power function. Returns tensor raised to specified integer power.
        Parameters:
        argument - base
        power - power
        Returns:
        result of argument exponentiation
        Throws:
        java.lang.IllegalArgumentException - if argument is not scalar
      • pow

        public static Tensor pow(Tensor argument,
                                 java.math.BigInteger power)
        Power function. Returns tensor raised to specified integer power.
        Parameters:
        argument - base
        power - power
        Returns:
        result of argument exponentiation
        Throws:
        java.lang.IllegalArgumentException - if argument is not scalar
      • pow

        public static Tensor pow(Tensor argument,
                                 Tensor power)
        Power function. Returns tensor raised to specified power.
        Parameters:
        argument - base
        power - power
        Returns:
        result of argument exponentiation
        Throws:
        java.lang.IllegalArgumentException - if argument or power is not scalar
      • multiply

        public static Tensor multiply(Tensor... factors)
        Returns the result of multiplication of specified tensors. Einstein notation assumed. If there is a chance that some factors have conflicting (same name) dummy indices use multiplyAndRenameConflictingDummies(Tensor...) instead.
        Parameters:
        factors - array of factors to be multiplied
        Returns:
        result of multiplication
        Throws:
        InconsistentIndicesException - if there is indices clash
      • multiply

        public static Tensor multiply(java.util.Collection<Tensor> factors)
        Returns the result of multiplication of specified tensors. Einstein notation assumed. If there is a chance that some factors have conflicting (same name) dummy indices use multiplyAndRenameConflictingDummies(Tensor...) instead.
        Parameters:
        factors - collection of factors to be multiplied
        Returns:
        result of multiplication
        Throws:
        InconsistentIndicesException - if there is indices clash
      • multiplyAndRenameConflictingDummies

        public static Tensor multiplyAndRenameConflictingDummies(Tensor... factors)
        Returns result of multiplication of specified tensors taking care about all conflicting dummy indices in factors. Einstein notation assumed.
        Parameters:
        factors - array of factors to be multiplied
        Returns:
        result of multiplication
        Throws:
        InconsistentIndicesException - if there is indices clash
      • multiplyAndRenameConflictingDummies

        public static Tensor multiplyAndRenameConflictingDummies(java.util.Collection<Tensor> factors)
        Returns result of multiplication of specified tensors taking care about all conflicting dummy indices in factors. Einstein notation assumed.
        Parameters:
        factors - array of factors to be multiplied
        Returns:
        result of multiplication
        Throws:
        InconsistentIndicesException - if there is indices clash
      • resolveDummy

        public static Tensor[] resolveDummy(Tensor[] factors)
        Renames dummies in specified tensors, such that it becomes safe to multiply them.
        Parameters:
        factors - tensors
        Returns:
        the array of tensors with renamed dummy indices
      • resolveAllDummies

        public static void resolveAllDummies(Tensor[] factors)
      • divide

        public static Tensor divide(Tensor a,
                                    Tensor b)
        Returns a divided by b.
        Parameters:
        a - tensor
        b - scalar tensor
        Returns:
        a divided by b.
        Throws:
        java.lang.IllegalArgumentException - if b is not scalar
      • sum

        public static Tensor sum(Tensor... tensors)
        Returns the result of summation of several tensors.
        Parameters:
        tensors - array of summands
        Returns:
        result of summation
        Throws:
        TensorException - if tensors have different free indices
      • sum

        public static Tensor sum(java.util.Collection<Tensor> tensors)
        Returns the result of summation of several tensors.
        Parameters:
        tensors - collection of summands
        Returns:
        result of summation
        Throws:
        TensorException - if tensors have different free indices
      • subtract

        public static Tensor subtract(Tensor a,
                                      Tensor b)
        Subtracts b from a
        Parameters:
        a - tensor
        b - tensor
        Returns:
        a - b
        Throws:
        TensorException - if tensors have different free indices
      • negate

        public static Tensor negate(Tensor tensor)
        Multiplies specified tensor by minus one.
        Parameters:
        tensor - tensor to be negotiated
        Returns:
        tensor negate to specified one
      • reciprocal

        public static Tensor reciprocal(Tensor tensor)
        Returns reciprocal of the specified tensor, i.e. one divided by it.
        Parameters:
        tensor - tensor
        Returns:
        reciprocal of the specified tensor
        Throws:
        java.lang.IllegalArgumentException - if specified tensor is not scalar
      • simpleTensor

        public static SimpleTensor simpleTensor(java.lang.String name,
                                                SimpleIndices indices)
        Returns new simple tensor with specified string name and indices.
        Parameters:
        name - string name of the tensor
        indices - indices
        Returns:
        new instance of SimpleTensor object
      • simpleTensor

        public static SimpleTensor simpleTensor(int name,
                                                SimpleIndices indices)
        Returns new simple tensor with specified int name (see NameManager for details) and indices.
        Parameters:
        name - int name of the tensor
        indices - indices
        Returns:
        new instance of SimpleTensor object
      • fieldDerivative

        public static TensorField fieldDerivative(TensorField parent,
                                                  SimpleIndices derivativeIndices,
                                                  int argPosition)
        Creates 1-st derivative with respect to specified argument of specified tensor field with specified derivative indices
        Parameters:
        parent - tensor field
        derivativeIndices - indices of the var (inverted)
        argPosition - argument
        Returns:
        1-st derivative
      • fieldDerivative

        public static TensorField fieldDerivative(TensorField parent,
                                                  SimpleIndices derivativeIndices,
                                                  int argPosition,
                                                  int order)
        Creates n-th derivative with respect to specified argument of specified tensor field with specified derivative indices
        Parameters:
        parent - tensor field
        derivativeIndices - indices of the var (inverted)
        argPosition - argument
        order - order of derivative
        Returns:
        n-th derivative
      • fieldDerivative

        public static TensorField fieldDerivative(java.lang.String name,
                                                  SimpleIndices indices,
                                                  SimpleIndices[] argIndices,
                                                  Tensor[] arguments,
                                                  int[] orders)
        Returns new tensor field derivative with specified string name, indices, arguments, derivative orders and explicit argument indices bindings.
        Parameters:
        name - string name of the corresponding tensor field
        indices - total indices of resulting derivative (field indices + indices of vars)
        argIndices - argument indices bindings
        arguments - arguments list
        orders - orders of derivatives
        Returns:
        new instance of TensorField object
      • field

        public static TensorField field(java.lang.String name,
                                        SimpleIndices indices,
                                        Tensor[] arguments)
        Returns new tensor field with specified string name, indices and arguments list. Free indices of arguments assumed as arguments indices bindings of this field bindings.
        Parameters:
        name - int name of the field
        indices - indices
        arguments - arguments list
        Returns:
        new instance of TensorField object
      • field

        public static TensorField field(java.lang.String name,
                                        SimpleIndices indices,
                                        java.util.Collection<Tensor> arguments)
        Returns new tensor field with specified string name, indices and arguments list. Free indices of arguments assumed as arguments indices bindings of this field bindings.
        Parameters:
        name - int name of the field
        indices - indices
        arguments - arguments list
        Returns:
        new instance of TensorField object
      • field

        public static TensorField field(java.lang.String name,
                                        SimpleIndices indices,
                                        SimpleIndices[] argIndices,
                                        Tensor[] arguments)
        Returns new tensor field with specified string name, indices, arguments list and explicit argument indices bindings.
        Parameters:
        name - int name of the field
        indices - indices
        argIndices - argument indices bindings
        arguments - arguments list
        Returns:
        new instance of TensorField object
      • field

        public static TensorField field(int name,
                                        SimpleIndices indices,
                                        SimpleIndices[] argIndices,
                                        Tensor[] arguments)
        Returns new tensor field with specified int name (see NameManager for details), indices, arguments list and explicit argument indices bindings.
        Parameters:
        name - int name of the field
        indices - indices
        argIndices - argument indices bindings
        arguments - arguments list
        Returns:
        new instance of TensorField object
      • field

        public static TensorField field(int name,
                                        SimpleIndices indices,
                                        Tensor[] arguments)
        Returns new tensor field with specified int name (see NameManager for details), indices and arguments list. Free indices of arguments assumed as arguments indices bindings of this field bindings.
        Parameters:
        name - int name of the field
        indices - indices
        arguments - arguments list
        Returns:
        new instance of TensorField object
      • setIndices

        public static SimpleTensor setIndices(SimpleTensor tensor,
                                              int[] indices)
        Returns an instance of specified simple tensor with specified indices
        Parameters:
        tensor - simple tensor
        indices - indices
        Returns:
        instance of specified simple tensor with specified indices
      • setIndices

        public static SimpleTensor setIndices(SimpleTensor tensor,
                                              SimpleIndices indices)
        Returns an instance of specified simple tensor with specified indices
        Parameters:
        tensor - simple tensor
        indices - indices
        Returns:
        instance of specified simple tensor with specified indices
      • expression

        public static Expression expression(Tensor left,
                                            Tensor right)
        Creates an expression object from two tensors.
        Parameters:
        left - left part of expression
        right - right part of expression
        Returns:
        new object of type Expression
      • sin

        public static Tensor sin(Tensor argument)
        Creates a sinus object from scalar argument.
        Parameters:
        argument - scalar argument of sinus
        Returns:
        sinus of argument
      • cos

        public static Tensor cos(Tensor argument)
        Creates a cosine object from scalar argument.
        Parameters:
        argument - scalar argument of cosine
        Returns:
        cosine of argument
      • tan

        public static Tensor tan(Tensor argument)
        Creates a tangent object from scalar argument
        Parameters:
        argument - scalar argument of tangent
        Returns:
        tangent of argument
      • cot

        public static Tensor cot(Tensor argument)
        Creates a cotangent object from scalar argument.
        Parameters:
        argument - scalar argument of cotangent
        Returns:
        cotangent of argument
      • arcsin

        public static Tensor arcsin(Tensor argument)
        Creates a arcsinus object from scalar argument.
        Parameters:
        argument - scalar argument of arcsinus
        Returns:
        arcsinus of argument
      • arccos

        public static Tensor arccos(Tensor argument)
        Creates a arccosine object from scalar argument.
        Parameters:
        argument - scalar argument of arccosine
        Returns:
        arccosine of argument
      • arctan

        public static Tensor arctan(Tensor argument)
        Creates a arctangent object from scalar argument.
        Parameters:
        argument - scalar argument of arctangent
        Returns:
        arctangent of argument
      • arccot

        public static Tensor arccot(Tensor argument)
        Creates a arcotangent object from scalar argument.
        Parameters:
        argument - scalar argument of arccotangent
        Returns:
        arcotangent of argument
      • log

        public static Tensor log(Tensor argument)
        Creates a natural logarithm object from scalar argument.
        Parameters:
        argument - scalar argument of logarithm
        Returns:
        natural logarithm of argument
      • exp

        public static Tensor exp(Tensor argument)
        Creates a exponent object from scalar argument.
        Parameters:
        argument - scalar argument of exponent
        Returns:
        exponent of argument
      • createKronecker

        public static SimpleTensor createKronecker(int index1,
                                                   int index2)
        Returns Kronecker tensor with specified upper and lower indices.
        Parameters:
        index1 - first index
        index2 - second index
        Returns:
        Kronecker tensor with specified upper and lower indices
        Throws:
        java.lang.IllegalArgumentException - if indices have same states
        java.lang.IllegalArgumentException - if indices have different types
      • createMetric

        public static SimpleTensor createMetric(int index1,
                                                int index2)
        Returns metric tensor with specified indices.
        Parameters:
        index1 - first index
        index2 - second index
        Returns:
        metric tensor with specified indices
        Throws:
        java.lang.IllegalArgumentException - if indices have different states
        java.lang.IllegalArgumentException - if indices have different types
        java.lang.IllegalArgumentException - if indices have non metric types
      • createMetricOrKronecker

        public static SimpleTensor createMetricOrKronecker(int index1,
                                                           int index2)
        Returns metric tensor if specified indices have same states and Kronecker tensor if specified indices have different states.
        Parameters:
        index1 - first index
        index2 - second index
        Returns:
        metric tensor if specified indices have same states and Kronecker tensor if specified indices have different states
        Throws:
        java.lang.IllegalArgumentException - if indices have different types
        java.lang.IllegalArgumentException - if indices have same states and non metric types
      • isKronecker

        public static boolean isKronecker(Tensor t)
        Returns true if specified tensor is Kronecker tensor
        Parameters:
        t - tensor
        Returns:
        true if specified tensor is Kronecker tensor
      • isMetric

        public static boolean isMetric(Tensor t)
        Returns true if specified tensor is metric tensor
        Parameters:
        t - tensor
        Returns:
        true if specified tensor is metric tensor
      • isKroneckerOrMetric

        public static boolean isKroneckerOrMetric(Tensor t)
        Returns true if specified tensor is metric or Kronecker tensor
        Parameters:
        t - tensor
        Returns:
        true if specified tensor is metric or Kronecker tensor
      • isKroneckerOrMetric

        public static boolean isKroneckerOrMetric(SimpleTensor t)
        Returns true if specified tensor is metric or Kronecker tensor
        Parameters:
        t - tensor
        Returns:
        true if specified tensor is metric or Kronecker tensor
      • parse

        public static Tensor parse(java.lang.String expression)
        Converts string expression into tensor.
        Parameters:
        expression - string to be parsed
        Returns:
        result of parsing
        Throws:
        ParserException - if expression does not satisfy correct Redberry input notation for tensors
      • parse

        public static Tensor parse(int i)
        Converts int value to Complex.
        Parameters:
        i - integer
        Returns:
        same Complex
      • parse

        public static Tensor parse(long i)
        Converts long value to Complex.
        Parameters:
        i - long integer
        Returns:
        same Complex
      • parse

        public static Tensor parse(double i)
        Converts double value to Complex.
        Parameters:
        i - double
        Returns:
        same Complex
      • parse

        public static Tensor parse(float i)
        Converts float value to Complex.
        Parameters:
        i - float
        Returns:
        same Complex
      • parse

        public static Tensor[] parse(java.lang.String... expressions)
        Converts array of string expressions into array of tensors.
        Parameters:
        expressions - array of strings to be parsed
        Returns:
        array of parsed tensors
        Throws:
        ParserException - if expression does not satisfy correct Redberry input notation for tensors
      • parse

        public static Tensor parse(java.lang.String expression,
                                   ParseTokenTransformer... preprocessors)
        Converts string expression into tensor, additionally transforming AST according to specified AST transformers.
        Parameters:
        expression - string to be parsed
        preprocessors - AST transformers
        Returns:
        result of parsing
        Throws:
        ParserException - if expression does not satisfy correct Redberry input notation for tensors
      • parseSimple

        public static SimpleTensor parseSimple(java.lang.String expression)
        Converts a string into simple tensor.
        Parameters:
        expression - string to be parsed
        Returns:
        simple tensor
        Throws:
        java.lang.IllegalArgumentException - if expression does not represents simple tensor
        ParserException - if expression does not satisfy correct Redberry input notation for tensors
      • parseExpression

        public static Expression parseExpression(java.lang.String expression)
        Converts a string into Expression.
        Parameters:
        expression - string to be parsed
        Returns:
        simple tensor
        Throws:
        java.lang.IllegalArgumentException - if string expression does not represents Expression
        ParserException - if expression does not satisfy correct Redberry input notation for tensors
      • addSymmetry

        public static void addSymmetry(java.lang.String tensor,
                                       IndexType type,
                                       Permutation permutation)
        Attaches symmetry to simple tensor with respect to indices of specified type.
        Parameters:
        tensor - string representation of simple tensor
        type - type of indices
        permutation - permutation
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if degree of permutation differs from the size of indices of specified type
      • addSymmetry

        public static void addSymmetry(SimpleTensor tensor,
                                       IndexType type,
                                       Permutation permutation)
        Attaches symmetry to simple tensor with respect to indices of specified type.
        Parameters:
        tensor - simple tensor
        type - type of indices
        permutation - permutation
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if degree of specified permutation differs from the size of indices of specified type
      • addSymmetry

        public static void addSymmetry(SimpleTensor tensor,
                                       Permutation permutation)
        Attaches symmetry to simple tensor.
        Parameters:
        tensor - simple tensor
        permutation - permutation
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if degree of specified permutation differs from the size of indices of specified tensor
      • addSymmetry

        public static void addSymmetry(java.lang.String tensor,
                                       Permutation permutation)
        Attaches symmetry to simple tensor.
        Parameters:
        tensor - string representation of simple tensor
        permutation - permutation
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if degree of specified permutation differs from the size of indices of specified tensor
      • addSymmetries

        public static void addSymmetries(SimpleTensor tensor,
                                         Permutation... permutations)
        Attaches symmetries to simple tensor.
        Parameters:
        tensor - simple tensor
        permutations - permutations
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if degree of some permutation differs from the size of indices of specified tensor
      • addSymmetries

        public static void addSymmetries(java.lang.String tensor,
                                         Permutation... permutations)
        Attaches symmetris to simple tensor.
        Parameters:
        tensor - string representation of simple tensor
        permutations - permutations
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if degree of some permutation differs from the size of indices of specified tensor
      • addSymmetry

        public static void addSymmetry(java.lang.String tensor,
                                       IndexType type,
                                       boolean sign,
                                       int... permutation)
        Attaches symmetry to simple tensor with respect to indices of specified type.
        Parameters:
        tensor - string representation of simple tensor
        permutation - permutation
        sign - true for antisymmetry, false for symmetry
        type - type of indices
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - if order of specified permutation is odd and sign is true
        java.lang.IllegalArgumentException - if degree of specified permutation differs from the size of indices of specified type
      • addSymmetry

        public static void addSymmetry(SimpleTensor tensor,
                                       IndexType type,
                                       boolean sign,
                                       int... permutation)
        Attaches symmetry to simple tensor with respect to indices of specified type.
        Parameters:
        tensor - simple tensor
        permutation - permutation
        sign - true for antisymmetry, false for symmetry
        type - type of indices
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - if order of specified permutation is odd and sign is true
        java.lang.IllegalArgumentException - if degree of specified permutation differs from the size of indices of specified type
      • addSymmetry

        public static void addSymmetry(java.lang.String tensor,
                                       IndexType type,
                                       int... permutation)
        Attaches symmetry to simple tensor with respect to indices of specified type.
        Parameters:
        tensor - string representation of simple tensor
        permutation - permutation
        type - type of indices
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - if degree of specified permutation differs from the size of indices of specified type
      • addSymmetry

        public static void addSymmetry(SimpleTensor tensor,
                                       IndexType type,
                                       int... permutation)
        Attaches symmetry to simple tensor with respect to indices of specified type.
        Parameters:
        tensor - simple tensor
        permutation - permutation
        type - type of indices
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - if degree of specified permutation differs from the size of indices of specified type
      • addAntiSymmetry

        public static void addAntiSymmetry(java.lang.String tensor,
                                           IndexType type,
                                           int... permutation)
        Attaches antisymmetry to simple tensor with respect to indices of specified type.
        Parameters:
        tensor - string representation of simple tensor
        permutation - permutation
        type - type of indices
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - if order of specified permutation is odd
        java.lang.IllegalArgumentException - if degree of specified permutation differs from the size of indices of specified type
      • addAntiSymmetry

        public static void addAntiSymmetry(SimpleTensor tensor,
                                           IndexType type,
                                           int... permutation)
        Attaches antisymmetry to simple tensor with respect to indices of specified type.
        Parameters:
        tensor - simple tensor
        permutation - permutation
        type - type of indices
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - if order of specified permutation is odd
        java.lang.IllegalArgumentException - if degree of specified permutation differs from the size of indices of specified type
      • addSymmetry

        public static void addSymmetry(java.lang.String tensor,
                                       int... permutation)
        Attaches symmetry to simple tensor.
        Parameters:
        tensor - string representation of simple tensor
        permutation - permutation
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - if degree of specified permutation differs from the size of indices of specified tensor
      • addSymmetry

        public static void addSymmetry(SimpleTensor tensor,
                                       int... permutation)
        Attaches symmetry to simple tensor.
        Parameters:
        tensor - simple tensor
        permutation - permutation
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - if degree of specified permutation differs from the size of indices of specified tensor
      • addAntiSymmetry

        public static void addAntiSymmetry(java.lang.String tensor,
                                           int... permutation)
        Attaches antisymmetry to simple tensor.
        Parameters:
        tensor - string representation of simple tensor
        permutation - permutation
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - if order of specified permutation is odd
        java.lang.IllegalArgumentException - if degree of specified permutation differs from the size of indices of specified tensor
      • addAntiSymmetry

        public static void addAntiSymmetry(SimpleTensor tensor,
                                           int... permutation)
        Attaches antisymmetry to simple tensor.
        Parameters:
        tensor - simple tensor
        permutation - permutation
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - if order of specified permutation is odd
        java.lang.IllegalArgumentException - if degree of specified permutation differs from the size of indices of specified tensor
      • setAntiSymmetric

        public static void setAntiSymmetric(SimpleTensor tensor,
                                            IndexType type)
        Makes simple tensor antisymmetric with respect to indices of specified type.
        Parameters:
        tensor - simple tensor
        type - type of indices
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
      • setAntiSymmetric

        public static void setAntiSymmetric(SimpleTensor tensor)
        Makes simple tensor antisymmetric.
        Parameters:
        tensor - simple tensor
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
      • setAntiSymmetric

        public static void setAntiSymmetric(java.lang.String tensor)
        Makes simple tensor antisymmetric.
        Parameters:
        tensor - string representation of simple tensor
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
      • setAntiSymmetric

        public static void setAntiSymmetric(java.lang.Object... tensors)
        Makes simple tensors antisymmetric.
        Parameters:
        tensors - string representation of simple tensor
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
      • setSymmetric

        public static void setSymmetric(SimpleTensor tensor,
                                        IndexType type)
        Makes simple tensor symmetric with respect to indices of specified type.
        Parameters:
        tensor - simple tensor
        type - type of indices
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
      • setSymmetric

        public static void setSymmetric(SimpleTensor tensor)
        Makes simple tensor symmetric.
        Parameters:
        tensor - simple tensor
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
      • setSymmetric

        public static void setSymmetric(java.lang.String tensor)
        Makes simple tensor symmetric.
        Parameters:
        tensor - string representation of simple tensor
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
      • setSymmetric

        public static void setSymmetric(java.lang.Object... tensors)
        Makes simple tensors symmetric.
        Parameters:
        tensors - string representation of simple tensors
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)
      • setAntiSymmetric

        public static void setAntiSymmetric(java.lang.String... tensors)
        Makes simple tensors symmetric.
        Parameters:
        tensors - string representation of simple tensors
        Throws:
        java.lang.IllegalStateException - if this tensor is already in use (it's permutation group calculated)

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.