public final class Vector1 extends APrimitiveVector
| Modifier and Type | Field and Description |
|---|---|
double |
x |
| Constructor and Description |
|---|
Vector1() |
Vector1(double... values) |
Vector1(double x) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAt(int i,
double value)
Adds a value to a specific element of the vector
This function does not perform bounds checking
|
void |
applyOp(Op op)
Applies a unary operator to all elements of the array (in-place)
|
Vector1 |
clone()
Clones the vector, creating a new mutable copy of all data.
|
double |
dotProduct(AVector a) |
double |
dotProduct(double[] data,
int offset)
Fast dot product with a double[] array.
|
double |
dotProduct(Vector v) |
double |
elementSum()
Returns the sum of all elements in a vector
|
Vector1 |
exactClone()
Returns an exact clone of this vector, i.e.
|
void |
fill(double v)
Fills the entire vector with a given value
|
double |
get(int i)
Returns the double value at the specified position in a 1D vector
|
void |
getElements(double[] data,
int offset)
Gets all elements of the array, copying them into a double array
|
double |
getX() |
int |
length() |
void |
negate()
Negates all elements in the array
|
static Vector1 |
of(double... values) |
static Vector1 |
of(double x) |
void |
set(int i,
double value) |
void |
setValues(double x) |
getT, getY, getZ, isFullyMutable, isMutable, isView, toNormalabs, add, add, add, add, add, add, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultipleToArray, addProduct, addProduct, addProduct, addProductToArray, addProductToArray, addToArray, addToArray, addWeighted, angle, applyOp, asDoubleArray, asElementList, asVector, broadcast, broadcastLike, broadcastLike, clamp, clampMax, clampMin, compareTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, crossProduct, dimensionality, distance, distanceL1, distanceLinf, distanceSquared, divide, divide, divide, divide, divideTo, dotProduct, elementCount, elementIterator, elementSquaredSum, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equals, equalsArray, equalsArray, fillRange, get, get, get, getLongShape, getShape, getShape, getSlices, getTranspose, getTransposeCopy, getTransposeView, hashCode, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, interpolate, interpolate, isElementConstrained, isSameShape, isSameShape, isUnitLengthVector, isZero, iterator, join, log, logistic, magnitude, magnitudeSquared, maxAbsElement, multiply, multiply, multiply, multiply, multiplyTo, mutable, nonZeroCount, normalise, normaliseMaxAbsElement, outerProduct, outerProduct, pow, projectToPlane, reshape, scale, scaleAdd, scaleAdd, scaleToMagnitude, set, set, set, set, set, set, set, set, set, setElements, setElements, setRange, setValues, signum, slice, slice, sliceCount, square, sub, sub, sub, subMultiple, subVector, tanh, toDoubleArray, toDoubleBuffer, toList, toString, toVector, unsafeGet, unsafeSet, validate, zeroCountbroadcastCloneLike, ensureMutable, exp, get, getSliceViews, isBoolean, reciprocal, scale, set, set, sqrt, toArrayfinalize, getClass, notify, notifyAll, wait, wait, waitbroadcastCloneLike, ensureMutable, exp, get, getSliceViews, isBoolean, reciprocal, scale, set, set, sqrt, toArraypublic Vector1()
public Vector1(double x)
public Vector1(double... values)
public static Vector1 of(double x)
public static Vector1 of(double... values)
public double dotProduct(AVector a)
dotProduct in class AVectorpublic double dotProduct(Vector v)
dotProduct in class AVectorpublic double dotProduct(double[] data,
int offset)
AVectordotProduct in class AVectorpublic int length()
public double elementSum()
AVectorelementSum in interface INDArrayelementSum in class AVectorpublic void applyOp(Op op)
INDArraypublic double get(int i)
INDArraypublic void set(int i,
double value)
public void fill(double v)
AVectorpublic void getElements(double[] data,
int offset)
INDArraygetElements in interface INDArraygetElements in class AVectorpublic void addAt(int i,
double value)
AVectorpublic void setValues(double x)
public void negate()
INDArraypublic Vector1 clone()
AVectorclone in interface INDArrayclone in class APrimitiveVectorpublic double getX()
getX in class APrimitiveVectorpublic Vector1 exactClone()
AVectorexactClone in interface INDArrayexactClone in class APrimitiveVectorCopyright © 2013. All Rights Reserved.