Documentation of 'mikera.vectorz.Op' Java class
Op
mikera.vectorz

Class Op

    • Constructor Summary

      Constructors 
      Constructor and Description
      Op() 
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      abstract double apply(double x)
      Applies this operator to a single value, returning the result
      double applyInverse(double y)
      Applies the inverse of this Op.
      void applyTo(ADenseArrayVector v)
      Applies this operator to a dense array vector, mutating the vector
      void applyTo(AMatrix m)
      Applies this operator to every element of a target matrix, mutating the matrix
      void applyTo(AScalar s)
      Applies this operator to a scalar, mutating the scalar
      void applyTo(AVector v)
      Applies this operator to a mutable vector.
      void applyTo(AVector v, int offset, int length)
      Applies this operator to the specified range within a mutable vector.
      void applyTo(double[] data)
      Applies this operator to every element in a double[] array, mutating the array in place
      void applyTo(double[] data, int offset, int length)
      Applies this operator to the specified range within a double[] array.
      void applyTo(double[] data, int offset, int stride, int length)
      Applies this operator to the specified strided range within a double[] array.
      void applyTo(INDArray a)
      Applies this operator to every element of a target array.
      double averageValue() 
      Op compose(Op op) 
      static Op compose(Op op1, Op op2) 
      void constrainValues(double[] src, double[] dest, int offset, int length)
      Creates a copy of the values of src in dest, constraining them to be within the valid range of output values from this Op
      double derivative(double x)
      Returns the derivative of this Op for a given input value x i.e.
      double derivativeForOutput(double y)
      Returns the derivative of this Op for a given output value y i.e.
      Op divide(Op op) 
      Op getDerivativeOp()
      Gets an operator which represents the derivative of this operator.
      Op getInverse()
      Gets the inverse of this operator.
      ATransform getTransform(int dims)
      Converts an operator into a corresponding transform that applies the operator to all elements of its input
      boolean hasDerivative()
      Returns true if this operator supports computing the derivative for a given input
      boolean hasDerivativeForOutput()
      Returns true if this operator supports computing the derivative for a given output
      boolean hasInverse()
      Returns true if this operator supports computing the inverse for a given output
      boolean isBounded()
      Returns true if this operator has a known finite upper or lower bound
      boolean isDomainBounded() 
      boolean isStochastic()
      Returns true if the operator is stochastic, i.e returns random values for at least some inputs
      double maxDomain() 
      double maxValue() 
      double minDomain() 
      double minValue() 
      Op product(Op op) 
      Op sum(Op op) 
      java.lang.String toString() 
      boolean validateOutput(double[] output)
      Validates whether all values in a double[] are within the possible output range for this Op
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Op

        public Op()
    • Method Detail

      • apply

        public abstract double apply(double x)
        Description copied from interface: IOperator
        Applies this operator to a single value, returning the result
        Specified by:
        apply in interface IOperator
        Returns:
      • applyInverse

        public double applyInverse(double y)
        Applies 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.
        Parameters:
        y -
        Returns:
      • applyTo

        public void applyTo(AVector v)
        Description copied from interface: IOperator
        Applies this operator to a mutable vector.
        Specified by:
        applyTo in interface IOperator
      • applyTo

        public void applyTo(AMatrix m)
        Applies this operator to every element of a target matrix, mutating the matrix
      • applyTo

        public void applyTo(AVector v,
                            int offset,
                            int length)
        Description copied from interface: IOperator
        Applies this operator to the specified range within a mutable vector.
        Specified by:
        applyTo in interface IOperator
      • applyTo

        public void applyTo(AScalar s)
        Applies this operator to a scalar, mutating the scalar
        Parameters:
        s -
      • applyTo

        public void applyTo(ADenseArrayVector v)
        Applies this operator to a dense array vector, mutating the vector
        Parameters:
        s -
      • applyTo

        public void applyTo(INDArray a)
        Applies this operator to every element of a target array. Mutates the array in place.
        Parameters:
        a -
      • applyTo

        public void applyTo(double[] data,
                            int offset,
                            int length)
        Description copied from interface: IOperator
        Applies this operator to the specified range within a double[] array.
        Specified by:
        applyTo in interface IOperator
      • applyTo

        public void applyTo(double[] data,
                            int offset,
                            int stride,
                            int length)
        Description copied from interface: IOperator
        Applies this operator to the specified strided range within a double[] array.
        Specified by:
        applyTo in interface IOperator
      • applyTo

        public void applyTo(double[] data)
        Applies this operator to every element in a double[] array, mutating the array in place
        Parameters:
        data -
      • getTransform

        public ATransform getTransform(int dims)
        Description copied from interface: IOperator
        Converts an operator into a corresponding transform that applies the operator to all elements of its input
        Specified by:
        getTransform in interface IOperator
        Returns:
      • getInverse

        public Op getInverse()
        Description copied from interface: IOperator
        Gets the inverse of this operator. Returns null if no inverse exists.
        Specified by:
        getInverse in interface IOperator
        Returns:
      • hasDerivative

        public boolean hasDerivative()
        Returns true if this operator supports computing the derivative for a given input
        Returns:
      • hasDerivativeForOutput

        public boolean hasDerivativeForOutput()
        Returns true if this operator supports computing the derivative for a given output
        Returns:
      • hasInverse

        public boolean hasInverse()
        Returns true if this operator supports computing the inverse for a given output
        Returns:
      • derivativeForOutput

        public double derivativeForOutput(double y)
        Returns 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
        Parameters:
        y -
        Returns:
      • derivative

        public double derivative(double x)
        Returns the derivative of this Op for a given input value x i.e. f'(x) where f is the operator
        Parameters:
        y -
        Returns:
      • isStochastic

        public boolean isStochastic()
        Returns true if the operator is stochastic, i.e returns random values for at least some inputs
        Returns:
      • averageValue

        public double averageValue()
      • minValue

        public double minValue()
      • maxValue

        public double maxValue()
      • minDomain

        public double minDomain()
      • maxDomain

        public double maxDomain()
      • isDomainBounded

        public boolean isDomainBounded()
      • validateOutput

        public boolean validateOutput(double[] output)
        Validates whether all values in a double[] are within the possible output range for this Op
        Parameters:
        output -
        Returns:
      • constrainValues

        public void constrainValues(double[] src,
                                    double[] dest,
                                    int offset,
                                    int length)
        Creates a copy of the values of src in dest, constraining them to be within the valid range of output values from this Op
        Parameters:
        src -
        dest -
        offset -
        length -
      • isBounded

        public boolean isBounded()
        Returns true if this operator has a known finite upper or lower bound
        Returns:
      • getDerivativeOp

        public Op getDerivativeOp()
        Gets an operator which represents the derivative of this operator. Returns nil if this cannot be computed or does not exist.
        Returns:
      • compose

        public static Op compose(Op op1,
                                 Op op2)
      • compose

        public Op compose(Op op)
      • product

        public Op product(Op op)
      • divide

        public Op divide(Op op)
      • sum

        public Op sum(Op op)
      • toString

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

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.