mikera.vectorz.ops
Class Power
- java.lang.Object
-
- mikera.vectorz.Op
-
- mikera.vectorz.ops.Power
-
-
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(AMatrix a)Applies this operator to every element of a target matrix, mutating the matrixvoidapplyTo(AVector a)Applies this operator to a mutable vector.voidapplyTo(double[] data, int start, int length)Applies this operator to the specified range within a double[] array.voidapplyTo(INDArray a)Applies this operator to every element of a target array.doubleaverageValue()static Opcreate(double exponent)static Opcreate(double exponent, double factor)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.OpgetDerivativeOp()Gets an operator which represents the derivative of this operator.doublegetExponent()OpgetInverse()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 outputdoubleminDomain()-
Methods inherited from class mikera.vectorz.Op
applyTo, applyTo, applyTo, applyTo, applyTo, compose, compose, constrainValues, divide, getTransform, hasDerivativeForOutput, isBounded, isDomainBounded, isStochastic, maxDomain, maxValue, minValue, product, sum, toString, validateOutput
-
-
-
-
Method Detail
-
create
public static Op create(double exponent)
-
create
public static Op create(double exponent, double factor)
-
apply
public double apply(double x)
Description copied from interface:IOperatorApplies this operator to a single value, returning the result
-
applyTo
public void applyTo(INDArray a)
Description copied from class:OpApplies this operator to every element of a target array. Mutates the array in place.
-
applyTo
public void applyTo(AMatrix a)
Description copied from class:OpApplies this operator to every element of a target matrix, mutating the matrix
-
applyTo
public void applyTo(AVector a)
Description copied from interface:IOperatorApplies this operator to a mutable vector.
-
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.
-
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:
-
hasDerivative
public boolean hasDerivative()
Description copied from class:OpReturns true if this operator supports computing the derivative for a given input- Overrides:
hasDerivativein classOp- 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 classOp- 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 classOp- 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 classOp- Returns:
-
hasInverse
public boolean hasInverse()
Description copied from class:OpReturns true if this operator supports computing the inverse for a given output- Overrides:
hasInversein classOp- Returns:
-
getInverse
public Op 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:
-
averageValue
public double averageValue()
- Overrides:
averageValuein classOp
-
getExponent
public double getExponent()
-
-
DMelt 3.0 © DataMelt by jWork.ORG