Documentation of 'cc.redberry.core.transformations.CollectScalarFactorsTransformation' Java class
CollectScalarFactorsTransformation
cc.redberry.core.transformations

Class CollectScalarFactorsTransformation

  • All Implemented Interfaces:
    Transformation


    public class CollectScalarFactorsTransformation
    extends java.lang.Object
    implements Transformation
    Puts together similar scalar subproducts in each product. For example, tensor A_m*A^m*A_n*A^n will be transformed to tensor (A_m*A^m)**2.
    Since:
    1.1
    • Constructor Detail

      • CollectScalarFactorsTransformation

        public CollectScalarFactorsTransformation(TraverseGuide traverseGuide)
        Creates transformation for particular parts of expressions, specified by traverse guide.
        Parameters:
        traverseGuide - specifies parts of expression to apply the transformation
    • Method Detail

      • transform

        public Tensor transform(Tensor t)
        Description copied from interface: Transformation
        Transforms specified tensor and returns the result.
        Specified by:
        transform in interface Transformation
        Parameters:
        t - tensor
        Returns:
        transformed tensor
      • collectScalarFactors

        public static Tensor collectScalarFactors(Tensor tensor)
        Puts together similar scalar subproducts in each product. For example, tensor A_m*A^m*A_n*A^n will be transformed to tensor (A_m*A^m)**2.
        Parameters:
        tensor - tensor
        Returns:
        the result
      • collectScalarFactors

        public static Tensor collectScalarFactors(Tensor tensor,
                                                  TraverseGuide traverseGuide)
        Puts together similar scalar subproducts in each product of expression, which can be traversed with specified traverse guide.
        Parameters:
        tensor - tensor
        traverseGuide - specifies parts of expression to apply the transformation
        Returns:
        the result
      • collectScalarFactorsInProduct

        public static Tensor collectScalarFactorsInProduct(Product product)
        Puts together similar scalar subproducts in a given product. For example, tensor A_m*A^m*A_n*A^n will be transformed to tensor (A_m*A^m)**2.
        Parameters:
        product - product
        Returns:
        the result

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.