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

Class StridedVector

    • Method Detail

      • wrap

        public static StridedVector wrap(double[] data,
                                         int offset,
                                         int length,
                                         int stride)
        Wraps a StridedVector around a strided range of a double[] array. Performs no bounds checking.
        Parameters:
        data -
        offset -
        length -
        stride -
        Returns:
      • set

        public void set(int i,
                        double value)
        Description copied from interface: INDArray
        Sets a value at a given position in a mutable 1D array
        Specified by:
        set in interface INDArray
        Specified by:
        set in interface IVector
        Specified by:
        set in class AVector
      • unsafeSet

        public void unsafeSet(int i,
                              double value)
        Description copied from class: AVector
        Like set, but performs no bounds checking. Results are undefined if the index is out of range
        Overrides:
        unsafeSet in class AVector
      • addAt

        public void addAt(int i,
                          double value)
        Description copied from class: AVector
        Adds a value to a specific element of the vector This function does not perform bounds checking, i.e. is an unsafe operation
        Specified by:
        addAt in class AStridedVector
      • add

        public void add(double[] data,
                        int offset)
        Description copied from class: AVector
        Adds to this vector from a given double array.
        Overrides:
        add in class AVector
      • add

        public void add(AVector v)
        Description copied from class: AVector
        Adds another vector to this one
        Overrides:
        add in class AVector
      • add

        public void add(int offset,
                        AVector a,
                        int srcOffset,
                        int length)
        Description copied from class: AVector
        Adds a segment of another vector into this one, at the specified offset
        Overrides:
        add in class AStridedVector
      • applyOp

        public void applyOp(Op op)
        Description copied from interface: INDArray
        Applies a unary operator to all elements of the array (in-place)
        Specified by:
        applyOp in interface INDArray
        Specified by:
        applyOp in class AStridedVector
      • set

        public void set(AVector v)
        Description copied from class: AVector
        Sets the vector to equal the value of another vector
        Specified by:
        set in class AStridedVector
      • clamp

        public void clamp(double min,
                          double max)
        Description copied from class: AVector
        Clamps all values in the vector to a given range
        Specified by:
        clamp in interface INDArray
        Overrides:
        clamp in class AVector
      • fill

        public void fill(double value)
        Description copied from class: AVector
        Fills the entire vector with a given value
        Specified by:
        fill in interface INDArray
        Overrides:
        fill in class AVector
      • multiply

        public void multiply(double factor)
        Description copied from class: AVector
        Multiplies the vector by a constant factor
        Specified by:
        multiply in interface INDArray
        Overrides:
        multiply in class AVector
        Parameters:
        factor - Factor by which to multiply each component of the vector
      • setElements

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

        public void setElements(int pos,
                                double[] src,
                                int srcOffset,
                                int length)
        Description copied from interface: INDArray
        Sets elements in an array using the given double values. The source array must contain at least the specified length in terms of number of elements
        Specified by:
        setElements in interface INDArray
        Specified by:
        setElements in class AStridedVector
        Parameters:
        pos - Offset into this array, expressed in terms of number of elements in row major order
        src - Element values in a double[] array. There must be at least as many element values as elements in this array.
        srcOffset - Position in the values array from which to start taking values.
        length - Number of elements to set.
      • 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
      • isFullyMutable

        public boolean isFullyMutable()
        Description copied from class: AVector
        Returns true if this vector is fully mutable, i.e. can contain any unconstrained double values
        Specified by:
        isFullyMutable in interface INDArray
        Overrides:
        isFullyMutable 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
      • subVector

        public AVector subVector(int start,
                                 int length)
        Description copied from class: AVector
        Obtains a sub-vector view that refers to this vector. Changes to the sub-vector will be reflected in this vector
        Overrides:
        subVector in class AVector
      • exactClone

        public StridedVector exactClone()
        Description copied from class: AVector
        Returns an exact clone of this vector, i.e. of the same type
        Specified by:
        exactClone in interface INDArray
        Specified by:
        exactClone in class AVector
        Returns:
        A clone of the original array

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.