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

Interface IVector

    • Method Detail

      • length

        int length()
        Returns the length of a vector, in terms of the number of elements. For Euclidean length, use magnitude() instead
        Returns:
      • get

        double get(int i)
        Gets a specified element from a vector.
        Specified by:
        get in interface INDArray
      • set

        void set(int i,
                 double value)
        Set a specified element in a vector
        Specified by:
        set in interface INDArray
      • addCopy

        AVector addCopy(AVector a)
        Adds a vector element-wise to this vector, returning a new vector.
        Parameters:
        a -
        Returns:
      • subCopy

        AVector subCopy(AVector a)
        Subtracts a vector element-wise from this vector, returning a new vector.
        Parameters:
        a -
        Returns:
      • multiplyCopy

        AVector multiplyCopy(AVector a)
        Multiplies a vector element-wise with this vector, returning a new vector.
        Parameters:
        a -
        Returns:
      • divideCopy

        AVector divideCopy(AVector a)
        Divides this vector element-wise by another vector, returning a new vector.
        Parameters:
        a -
        Returns:
      • sqrtCopy

        AVector sqrtCopy()
        Computes the square root for each element in this vector, returning a new vector.
        Parameters:
        a -
        Returns:
      • epsilonEquals

        boolean epsilonEquals(AVector v,
                              double tolerance)
      • normalise

        double normalise()
      • normaliseCopy

        AVector normaliseCopy()
        Normalises this vector to unit length, returning a new vector.
        Returns:
      • clone

        AVector clone()
        Description copied from interface: INDArray
        Returns a clone of the array data, as a new array which will be fully mutable and may be of a different class to the original. Clone should attempt to return the most efficient possible array type. Clone should preserve sparsity property where possible, but this is not guaranteed.
        Specified by:
        clone in interface INDArray
      • isSameShape

        boolean isSameShape(AVector a)
        Returns true if this vector is exactly the same shape as another vector.
        Parameters:
        a -
        Returns:
      • shiftCopy

        AVector shiftCopy(int shift)
        Shifts a vector by the specified number of elements, filling with zeros. Returns a new vector.
        Parameters:
        shift -
        Returns:
      • rotateView

        AVector rotateView(int shift)
        Rotates a vector by the specified number of elements, wrapping around element values. Returns a view.
        Parameters:
        shift -
        Returns:
      • rotateCopy

        AVector rotateCopy(int shift)
        Rotates a vector by the specified number of elements, wrapping around element values. Returns a new vector.
        Parameters:
        shift -
        Returns:

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.