cc.redberry.core.transformations
Class DifferentiateTransformation
- java.lang.Object
-
- cc.redberry.core.transformations.DifferentiateTransformation
-
- All Implemented Interfaces:
- Transformation
public final class DifferentiateTransformation extends java.lang.Object implements Transformation
Differentiates specified tensor with respect to specified simple tensors. It temporary does not support derivatives of tensor fields.- Since:
- 1.0
-
-
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
-
-
Constructor Summary
Constructors Constructor and Description DifferentiateTransformation(SimpleTensor... vars)Creates transformations which differentiate with respect to specified simple tensors.DifferentiateTransformation(SimpleTensor[] vars, Transformation[] expandAndContract)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static Tensordifferentiate(Tensor tensor, SimpleTensor... vars)Gives the multiple derivative of specified tensor with respect to specified arguments.static Tensordifferentiate(Tensor tensor, SimpleTensor var, int order)Gives the multiple derivative of specified order of specified tensor with respect to specified simple tensor.static Tensordifferentiate(Tensor tensor, Transformation[] expandAndContract, SimpleTensor... vars)Gives the multiple derivative of specified tensor with respect to specified arguments.Tensortransform(Tensor t)Transforms specified tensor and returns the result.
-
-
-
Constructor Detail
-
DifferentiateTransformation
public DifferentiateTransformation(SimpleTensor... vars)
Creates transformations which differentiate with respect to specified simple tensors.- Parameters:
vars-
-
DifferentiateTransformation
public DifferentiateTransformation(SimpleTensor[] vars, Transformation[] expandAndContract)
-
-
Method Detail
-
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
-
differentiate
public static Tensor differentiate(Tensor tensor, SimpleTensor var, int order)
Gives the multiple derivative of specified order of specified tensor with respect to specified simple tensor.- Parameters:
tensor- tensor to be differentiatedvar- simple tensororder- order of derivative- Returns:
- derivative
- Throws:
java.lang.IllegalArgumentException- if both order is not one and var is not scalar.
-
differentiate
public static Tensor differentiate(Tensor tensor, SimpleTensor... vars)
Gives the multiple derivative of specified tensor with respect to specified arguments.- Parameters:
tensor- tensor to be differentiatedvars- arguments- Returns:
- derivative
- Throws:
java.lang.IllegalArgumentException- if there is clash of indices
-
differentiate
public static Tensor differentiate(Tensor tensor, Transformation[] expandAndContract, SimpleTensor... vars)
Gives the multiple derivative of specified tensor with respect to specified arguments.- Parameters:
tensor- tensor to be differentiatedvars- argumentsexpandAndContract- additional transformations to be applied after each step of differentiation- Returns:
- derivative
- Throws:
java.lang.IllegalArgumentException- if there is clash of indices
-
-
DataMelt 3.0 © DataMelt by jWork.ORG