mikera.vectorz.ops
Class Constant
- java.lang.Object
-
- mikera.vectorz.Op
-
- mikera.vectorz.ops.APolynomialOp
-
- mikera.vectorz.ops.ALinearOp
-
- mikera.vectorz.ops.Constant
-
-
Field Summary
Fields Modifier and Type Field and Description static ConstantHALFstatic ConstantONEstatic ConstantTWOdoublevaluestatic ConstantZERO
-
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 x)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(Op op)static Constantcreate(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()doublemaxValue()doubleminValue()Opproduct(Op op)-
Methods inherited from class mikera.vectorz.ops.ALinearOp
hasDerivative, hasInverse, sum, sum
-
Methods inherited from class mikera.vectorz.Op
applyTo, applyTo, applyTo, applyTo, applyTo, compose, constrainValues, divide, getInverse, getTransform, hasDerivativeForOutput, isBounded, isDomainBounded, isStochastic, maxDomain, minDomain, toString, validateOutput
-
-
-
-
Field Detail
-
value
public final double value
-
ZERO
public static final Constant ZERO
-
HALF
public static final Constant HALF
-
ONE
public static final Constant ONE
-
TWO
public static final Constant TWO
-
-
Method Detail
-
create
public static final Constant create(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 x)
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
-
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:
-
-
DMelt 3.0 © DataMelt by jWork.ORG