Documentation of 'mikera.vectorz.impl.AJoinedVector' Java class
AJoinedVector
mikera.vectorz.impl

Class AJoinedVector

    • Constructor Detail

      • AJoinedVector

        public AJoinedVector(int length)
    • Method Detail

      • componentCount

        public abstract int componentCount()
        Description copied from interface: INDArray
        Returns the number of components of this array. May return 0 if components are not supported
        Specified by:
        componentCount in interface INDArray
        Overrides:
        componentCount in class AbstractArray<java.lang.Double>
        Returns:
      • getComponent

        public abstract AVector getComponent(int k)
        Description copied from interface: INDArray
        Gets a component from the array at the specified index Will throw an error if components are not supported, or if the component is out of bounds as defined by 0 <= k
        Specified by:
        getComponent in interface INDArray
        Overrides:
        getComponent in class AbstractArray<java.lang.Double>
        Returns:
      • withComponents

        public abstract AJoinedVector withComponents(INDArray... segments)
        Reconstructs a new joined vector of the same type and shape with the given segments. The segments must be the same shape as the original segments
        Specified by:
        withComponents in interface INDArray
        Overrides:
        withComponents in class AbstractArray<java.lang.Double>
        Parameters:
        aVectors -
        Returns:
      • isView

        public boolean isView()
        Description copied from class: AVector
        Returns true if this vector is of a view type that references other vectors / data.
        Specified by:
        isView in interface INDArray
        Overrides:
        isView in class AVector
      • isMutable

        public boolean isMutable()
        Description copied from class: AVector
        Returns true if this vector is mutable.
        Specified by:
        isMutable in interface INDArray
        Overrides:
        isMutable in class AVector
      • setElements

        public void setElements(double[] values,
                                int offset)
        Description copied from interface: INDArray
        Sets all elements in an array using the given double values
        Specified by:
        setElements in interface INDArray
        Overrides:
        setElements in class AVector
        Parameters:
        values - Element values in a double[] array. There must be at least as many element values as elements in this array.
        offset - Position in the values array from which to start taking values.
      • copyTo

        public void copyTo(AVector dest,
                           int offset)
        Description copied from class: AVector
        Copies a the contents of a vector to a vector at the specified offset
        Overrides:
        copyTo in class AVector
      • copyTo

        public void copyTo(int offset,
                           AVector dest,
                           int destOffset,
                           int length)
        Description copied from class: AVector
        Copies a subset of this vector to a vector at the specified offset
        Overrides:
        copyTo in class AVector
      • copyTo

        public void copyTo(int offset,
                           double[] dest,
                           int destOffset,
                           int length)
        Description copied from class: AVector
        Copies a subset of this vector to a specified destination array offset
        Overrides:
        copyTo in class AVector
      • copyTo

        public void copyTo(int offset,
                           double[] dest,
                           int destOffset,
                           int length,
                           int stride)
        Description copied from class: AVector
        Copies a subset of this vector to a specified destination array offset using the given stride. Unsafe operation: performs no bounds checking
        Overrides:
        copyTo in class AVector
      • equals

        public boolean equals(AVector a)
        Description copied from class: AbstractArray
        Returns true if this array is exactly equal to a vector.
        Overrides:
        equals in class AVector
        Returns:
      • equalsArray

        public boolean equalsArray(double[] values,
                                   int offset)
        Description copied from class: AVector
        Returns true if this vector exactly matches the elements in double[] array, starting from the specified offset
        Specified by:
        equalsArray in interface INDArray
        Overrides:
        equalsArray in class ASizedVector
        Parameters:
        values - Array of double element values to check for equality
        offset - Offset into the data array
        Returns:
      • scaleAdd

        public void scaleAdd(double factor,
                             AVector b,
                             double bfactor,
                             double constant)
        Description copied from class: AVector
        Scales all elements of the array by a given double value, adds a scaled second vector and adds a constant value
        Overrides:
        scaleAdd in class AVector
      • elementSum

        public double elementSum()
        Description copied from class: AVector
        Returns the sum of all elements in a vector
        Specified by:
        elementSum in interface INDArray
        Overrides:
        elementSum in class AVector
      • isZero

        public boolean isZero()
        Description copied from class: AVector
        Returns true if this vector is a zero vector (all components zero)
        Specified by:
        isZero in interface INDArray
        Overrides:
        isZero in class AVector
      • hasUncountable

        public boolean hasUncountable()
        Description copied from class: AbstractArray
        Returns true if any element is this array is NaN or infinite
        Specified by:
        hasUncountable in interface INDArray
        Overrides:
        hasUncountable in class AVector
        Returns:
        True if any element is this array is NaN or infinite, false otherwise
      • dotProduct

        public double dotProduct(double[] data,
                                 int offset)
        Description copied from class: AVector
        Fast dot product with a double[] array. Performs no bounds checking. Likely to be faster than most other dot product operations
        Specified by:
        dotProduct in class AVector
      • dotProduct

        public double dotProduct(double[] data,
                                 int offset,
                                 int stride)
        Description copied from class: AVector
        Fast dot product with a double[] array and a stride. Performs no bounds checking. Likely to be faster than other dot product operations
        Overrides:
        dotProduct in class AVector
      • applyOp

        public void applyOp(Op2 op,
                            AVector b)
        Description copied from class: AVector
        Applies a binary operator to this vector and a second vector
        Overrides:
        applyOp in class AVector
      • setSparse

        public void setSparse(double value)
        Description copied from interface: INDArray
        Sets the non-sparse elements of this array to the specified value May throw an exception if non-sparse elements are not mutable
        Specified by:
        setSparse in interface INDArray
        Overrides:
        setSparse in class AVector
      • addSparse

        public void addSparse(double value)
        Description copied from interface: INDArray
        Adds to the non-sparse elements of this array
        Specified by:
        addSparse in interface INDArray
        Overrides:
        addSparse in class AVector
      • reduce

        public double reduce(Op2 op,
                             double init)
        Description copied from interface: INDArray
        Reduces over all elements of the array in row-major order. Applies the operator to the initial/previous result at each step. Returns the final result.
        Specified by:
        reduce in interface INDArray
        Overrides:
        reduce in class AVector
      • reduce

        public double reduce(Op2 op)
        Description copied from interface: INDArray
        Reduces over all elements of the array in row-major order. Applies the operator to the previous result at each step. Returns the final result.
        Specified by:
        reduce in interface INDArray
        Overrides:
        reduce in class AVector

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.