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

Class ASingleElementVector

    • Method Detail

      • isMutable

        public final 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
      • dotProduct

        public abstract double dotProduct(AVector v)
        Description copied from class: AVector
        Returns the dot product of this vector with another vector The vectors must have the same length: if not the result is undefined
        Specified by:
        dotProduct in class ASparseVector
        Returns:
      • 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
      • nonSparseElementCount

        public int nonSparseElementCount()
        Description copied from class: ASparseVector
        Returns the number of non-sparse elements in the sparse vector. This will be greater or equal to the number of non-zero elements
        Specified by:
        nonSparseElementCount in class ASparseVector
        Returns:
      • nonSparseIndex

        public Index nonSparseIndex()
        Description copied from class: AVector
        Returns an Index indicating which elements of this vector are defined as non-sparse. A sparse index must be zero. A non-sparse element may be zero, but is typically expected be non-zero.
        Specified by:
        nonSparseIndex in interface ISparseVector
        Specified by:
        nonSparseIndex in class ASparseVector
        Returns:
      • getElements

        public void getElements(double[] dest,
                                int offset)
        Description copied from interface: INDArray
        Copies all elements of this array a double array at the specified offset
        Specified by:
        getElements in interface INDArray
        Overrides:
        getElements in class AVector
      • slice

        public AScalar slice(int i)
        Description copied from interface: INDArray
        Returns the specified major slice of this array as a view (slice along dimension 0) 0 dimensional slice results are permitted, but attempting to slice a 0 dimensional array will result in an error.
        Specified by:
        slice in interface INDArray
        Overrides:
        slice in class AVector
      • equals

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

        public int[] nonZeroIndices()
        Description copied from class: AVector
        Return an int array specifying the positions in this vector which are non-zero
        Overrides:
        nonZeroIndices in class AVector
        Returns:

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.