Documentation of 'cc.redberry.core.transformations.substitutions.SubstitutionTransformation' Java class
SubstitutionTransformation
cc.redberry.core.transformations.substitutions

Class SubstitutionTransformation

  • All Implemented Interfaces:
    Transformation


    public final class SubstitutionTransformation
    extends java.lang.Object
    implements Transformation
    Substitution.
    Since:
    1.0
    • Constructor Detail

      • SubstitutionTransformation

        public SubstitutionTransformation(Expression[] expressions,
                                          boolean applyIfModified)
        Creates a set of substitutions.
        Parameters:
        expressions - an array of the expressions
        applyIfModified - if false, then if some substitution was applied to some tensor in tree, then others will be skipped in current subtree.
      • SubstitutionTransformation

        public SubstitutionTransformation(Expression expression)
        Creates a substitution.
        Parameters:
        expression - expression
      • SubstitutionTransformation

        public SubstitutionTransformation(Expression... expressions)
        Creates a set of substitutions.
        Parameters:
        expressions - an array of the expressions
      • SubstitutionTransformation

        public SubstitutionTransformation(Tensor from,
                                          Tensor to,
                                          boolean applyIfModified)
        Creates a substitution.
        Parameters:
        from - from tensor
        to - to tensor
        applyIfModified - if false, then if some substitution was applied to some tensor in tree, then others will be skipped in current subtree.
        Throws:
        java.lang.IllegalArgumentException - if from free indices are not equal to to free indices
      • SubstitutionTransformation

        public SubstitutionTransformation(Tensor[] from,
                                          Tensor[] to)
        Creates a set of substitutions.
        Parameters:
        from - an array of from tensors
        to - an array of to tensors
        Throws:
        java.lang.IllegalArgumentException - if from.length != to.length
        java.lang.IllegalArgumentException - if for there is a pair for which from[i] free indices equal to to[i] free indices
      • SubstitutionTransformation

        public SubstitutionTransformation(Tensor from,
                                          Tensor to)
        Creates a substitution
        Parameters:
        from - from tensor
        to - to tensor
        Throws:
        java.lang.IllegalArgumentException - if from free indices are not equal to to free indices
      • SubstitutionTransformation

        public SubstitutionTransformation(Tensor[] from,
                                          Tensor[] to,
                                          boolean applyIfModified)
        Creates a set of substitutions
        Parameters:
        from - an array of from tensors
        to - an array of to tensors
        applyIfModified - if false, then if some substitution was applied to some tensor in tree, then others will be skipped in current subtree.
        Throws:
        java.lang.IllegalArgumentException - if from.length != to.length
        java.lang.IllegalArgumentException - if for there is a pair for which from[i] free indices are not equal to to[i] free indices
    • Method Detail

      • asSimpleSubstitution

        public SubstitutionTransformation asSimpleSubstitution()
        Creates a new substitution, which treats all of the inner substitutions as simple substitutions.
        Returns:
        new substitution, which treats all of the inner substitutions as simple substitutions.
      • 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
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.