Java org.apache.mahout.math Vector fields, constructors, methods, implement or subclass

Example usage for Java org.apache.mahout.math Vector fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.mahout.math Vector.

The text is from its open source code.

Method

Iterableall()
Vectorassign(double value)
Assign the value to all elements of the receiver
Vectorassign(double[] values)
Assign the values to the receiver
Vectorassign(Vector other)
Assign the other vector values to the receiver
Vectorassign(DoubleFunction function)
Apply the function to each element of the receiver
Vectorassign(Vector other, DoubleDoubleFunction function)
Apply the function to each element of the receiver and the corresponding element of the other argument
Vectorassign(DoubleDoubleFunction f, double y)
Apply the function to each element of the receiver, using the y value as the second argument of the DoubleDoubleFunction
Vectorclone()
Return a copy of the recipient
Matrixcross(Vector other)
Return the cross product of the receiver and the other vector
Vectordivide(double x)
Return a new vector containing the values of the recipient divided by the argument
doubledot(Vector x)
Return the dot product of the recipient and the argument
doubleget(int index)
Return the value at the given index
doublegetDistanceSquared(Vector v)
Get the square of the distance between this vector and the other vector.
ElementgetElement(int index)
Return an object of Vector.Element representing an element of this Vector.
doublegetLengthSquared()
Return the sum of squares of all elements in the vector.
intgetNumNondefaultElements()
Return the number of values in the recipient which are not the default value.
intgetNumNonZeroElements()
Return the number of non zero elements in the vector.
doublegetQuick(int index)
Return the value at the given index, without checking bounds
booleanisDense()
true if this implementation should be considered dense -- that it explicitly represents every value
booleanisSequentialAccess()
true if this implementation should be considered to be iterable in index order in an efficient way.
Vectorlike()
Return an empty vector of the same underlying class as the receiver
doublemaxValue()
intmaxValueIndex()
Vectorminus(Vector x)
Return a new vector containing the element by element difference of the recipient and the argument
doubleminValue()
intminValueIndex()
IterablenonZeroes()
doublenorm(double power)
Return the k-norm of the vector.
Vectornormalize(double power)
Return a new Vector containing the normalized (L_power norm) values of the recipient.
Vectorplus(double x)
Return a new vector containing the sum of each value of the recipient and the argument
Vectorplus(Vector x)
Return a new vector containing the element by element sum of the recipient and the argument
voidset(int index, double value)
Set the value at the given index
voidsetQuick(int index, double value)
Set the value at the given index, without checking bounds
intsize()
Return the cardinality of the recipient (the maximum number of values)
Vectortimes(double x)
Return a new vector containing the product of each value of the recipient and the argument
Vectortimes(Vector x)
Return a new vector containing the element-wise product of the recipient and the argument
VectorviewPart(int offset, int length)
Return a new vector containing the subset of the recipient
doublezSum()
Return the sum of all the elements of the receiver