mikera.vectorz.ops
Class Linear
- java.lang.Object
-
- mikera.vectorz.Op
-
- mikera.vectorz.ops.APolynomialOp
-
- mikera.vectorz.ops.ALinearOp
-
- mikera.vectorz.ops.Linear
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubleapply(double x)Applies this operator to a single value, returning the resultdoubleapplyInverse(double y)Applies the inverse of this Op.voidapplyTo(AVector v)Applies this operator to a mutable vector.voidapplyTo(double[] data)Applies this operator to every element in a double[] array, mutating the array in placevoidapplyTo(double[] data, int start, int length)Applies this operator to the specified range within a double[] array.voidapplyTo(INDArray v)Applies this operator to every element of a target array.doubleaverageValue()Opcompose(ALinearOp op)Opcompose(Op op)static ALinearOpcreate(double factor, double constant)doublederivative(double x)Returns the derivative of this Op for a given input value x i.e.doublederivativeForOutput(double y)Returns the derivative of this Op for a given output value y i.e.doublegetConstant()OpgetDerivativeOp()Gets an operator which represents the derivative of this operator.doublegetFactor()ALinearOpgetInverse()Gets the inverse of this operator.booleanhasDerivative()Returns true if this operator supports computing the derivative for a given inputbooleanhasInverse()Returns true if this operator supports computing the inverse for a given output-
Methods inherited from class mikera.vectorz.Op
applyTo, applyTo, applyTo, applyTo, applyTo, compose, constrainValues, divide, getTransform, hasDerivativeForOutput, isBounded, isDomainBounded, isStochastic, maxDomain, maxValue, minDomain, minValue, product, toString, validateOutput
-
-
-
-
Method Detail
-
create
public static ALinearOp create(double factor, double constant)
-
apply
public double apply(double x)
Description copied from interface:IOperatorApplies this operator to a single value, returning the result
-
applyInverse
public double applyInverse(double y)
Description copied from class:OpApplies the inverse of this Op. Throws an error if the inverse function does not exist. Returns Double.NaN if no inverse exists for the specific value of y.- Overrides:
applyInversein classOp- Returns:
-
applyTo
public void applyTo(INDArray v)
Description copied from class:OpApplies this operator to every element of a target array. Mutates the array in place.
-
applyTo
public void applyTo(AVector v)
Description copied from interface:IOperatorApplies this operator to a mutable vector.
-
applyTo
public void applyTo(double[] data)
Description copied from class:OpApplies this operator to every element in a double[] array, mutating the array in place
-
applyTo
public void applyTo(double[] data, int start, int length)Description copied from interface:IOperatorApplies this operator to the specified range within a double[] array.
-
getConstant
public double getConstant()
- Specified by:
getConstantin classALinearOp
-
averageValue
public double averageValue()
- Overrides:
averageValuein classOp
-
hasDerivative
public boolean hasDerivative()
Description copied from class:OpReturns true if this operator supports computing the derivative for a given input- Overrides:
hasDerivativein classALinearOp- Returns:
-
derivative
public double derivative(double x)
Description copied from class:OpReturns the derivative of this Op for a given input value x i.e. f'(x) where f is the operator- Overrides:
derivativein classALinearOp- Returns:
-
derivativeForOutput
public double derivativeForOutput(double y)
Description copied from class:OpReturns the derivative of this Op for a given output value y i.e. f'(g(y)) where f is the operator, g is the inverse of f- Overrides:
derivativeForOutputin classALinearOp- Returns:
-
getDerivativeOp
public Op getDerivativeOp()
Description copied from class:OpGets an operator which represents the derivative of this operator. Returns nil if this cannot be computed or does not exist.- Overrides:
getDerivativeOpin classALinearOp- Returns:
-
hasInverse
public boolean hasInverse()
Description copied from class:OpReturns true if this operator supports computing the inverse for a given output- Overrides:
hasInversein classALinearOp- Returns:
-
getInverse
public ALinearOp getInverse()
Description copied from interface:IOperatorGets the inverse of this operator. Returns null if no inverse exists.- Specified by:
getInversein interfaceIOperator- Overrides:
getInversein classOp- Returns:
-
-
DMelt 3.0 © DataMelt by jWork.ORG