public final class Vector3 extends APrimitiveVector
| Constructor and Description |
|---|
Vector3() |
Vector3(AVector v) |
Vector3(double... values) |
Vector3(double x,
double y,
double z) |
Vector3(Vector3 source) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(AVector v)
Adds another vector to this one
|
void |
add(double constant)
Adds a double value to all elements in this array
|
void |
add(double dx,
double dy,
double dz) |
void |
add(Vector3 v) |
void |
addAt(int i,
double value)
Adds a value to a specific element of the vector
This function does not perform bounds checking
|
void |
addMultiple(AVector v,
double factor)
Adds a scaled multiple of another vector to this one
|
void |
addMultiple(double dx,
double dy,
double dz,
double factor) |
void |
addMultiple(Vector3 v,
double factor) |
void |
addProduct(Vector3 a,
Vector3 b) |
void |
addProduct(Vector3 a,
Vector3 b,
double factor) |
double |
angle(AVector v)
Returns the Euclidean angle between this vector and another vector
|
double |
angle(Vector3 v) |
void |
applyOp(Op op)
Applies a unary operator to all elements of the array (in-place)
|
Vector3 |
clone()
Clones the vector, creating a new mutable copy of all data.
|
static Vector3 |
create(AVector v) |
static Vector3 |
create(Object o) |
void |
crossProduct(AVector a) |
void |
crossProduct(Vector3 a) |
double |
distance(AVector v) |
double |
distance(Vector3 v) |
double |
distanceSquared(Vector3 v) |
double |
dotProduct(AVector a) |
double |
dotProduct(double[] data,
int offset)
Fast dot product with a double[] array.
|
double |
dotProduct(Vector v) |
double |
dotProduct(Vector3 a) |
double |
elementSum()
Returns the sum of all elements in a vector
|
Vector3 |
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() |
double |
getY() |
double |
getZ() |
int |
length() |
double |
magnitude()
Returns the magnitude (Euclidean length) of the vector
|
double |
magnitudeSquared() |
void |
negate()
Negates all elements in the array
|
double |
normalise()
Normalises this vector to a magnitude of 1.0
Has no effect on a zero-length vector (i.e.
|
static Vector3 |
of(double... values) |
static Vector3 |
of(double x,
double y,
double z) |
void |
projectToPlane(AVector normal,
double distance) |
void |
projectToPlane(Vector3 normal,
double distance) |
void |
scaleAdd(double factor,
AVector constant) |
void |
scaleAdd(double factor,
double constant)
Scales this vector and adds a constant to every element
|
void |
scaleAdd(double factor,
Vector3 constant) |
void |
set(AVector v)
Sets the vector to equal the value of another vector
|
void |
set(int i,
double value) |
void |
set(Vector3 a) |
void |
setValues(double x,
double y,
double z) |
void |
sub(Vector3 v) |
void |
subMultiple(Vector3 v,
double factor) |
void |
subtractMultiple(Vector3 v,
double factor) |
void |
toDoubleBuffer(DoubleBuffer dest)
Copies the elements of this INDArray to the specified double buffer
|
Vector3 |
toNormal()
Creates a new mutable vector representing the normalised value of this vector
|
getT, isFullyMutable, isMutable, isViewabs, add, add, add, add, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultipleToArray, addProduct, addProduct, addProduct, addProductToArray, addProductToArray, addToArray, addToArray, addWeighted, applyOp, asDoubleArray, asElementList, asVector, broadcast, broadcastLike, broadcastLike, clamp, clampMax, clampMin, compareTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, dimensionality, 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, maxAbsElement, multiply, multiply, multiply, multiply, multiplyTo, mutable, nonZeroCount, normaliseMaxAbsElement, outerProduct, outerProduct, pow, reshape, scale, scaleToMagnitude, set, set, set, set, set, set, set, set, setElements, setElements, setRange, setValues, signum, slice, slice, sliceCount, square, sub, sub, sub, subMultiple, subVector, tanh, toDoubleArray, 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 Vector3()
public Vector3(Vector3 source)
public Vector3(double x,
double y,
double z)
public Vector3(double... values)
public Vector3(AVector v)
public void applyOp(Op op)
INDArraypublic double normalise()
AVectorpublic static Vector3 of(double x, double y, double z)
public static Vector3 of(double... values)
public double angle(AVector v)
AVectorpublic double angle(Vector3 v)
public void add(double dx,
double dy,
double dz)
public double magnitudeSquared()
magnitudeSquared in class AVectorpublic double distanceSquared(Vector3 v)
public double distance(Vector3 v)
public double magnitude()
AVectorpublic void set(Vector3 a)
public void addMultiple(double dx,
double dy,
double dz,
double factor)
public void addMultiple(AVector v, double factor)
AVectoraddMultiple in class AVectorpublic void addMultiple(Vector3 v, double factor)
public void subtractMultiple(Vector3 v, double factor)
public void add(AVector v)
AVectorpublic void add(Vector3 v)
public void sub(Vector3 v)
public void subMultiple(Vector3 v, double factor)
public double dotProduct(Vector3 a)
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 void crossProduct(AVector a)
crossProduct in class AVectorpublic void crossProduct(Vector3 a)
public void projectToPlane(AVector normal, double distance)
projectToPlane in class AVectorpublic void projectToPlane(Vector3 normal, double distance)
public int length()
public double elementSum()
AVectorelementSum in interface INDArrayelementSum in class AVectorpublic void scaleAdd(double factor,
double constant)
AVectorpublic void scaleAdd(double factor,
Vector3 constant)
public void add(double constant)
INDArraypublic double get(int i)
INDArraypublic void set(AVector v)
AVectorpublic void fill(double v)
AVectorpublic void set(int i,
double value)
public void addAt(int i,
double value)
AVectorpublic void setValues(double x,
double y,
double z)
public void negate()
INDArraypublic void getElements(double[] data,
int offset)
INDArraygetElements in interface INDArraygetElements in class AVectorpublic void toDoubleBuffer(DoubleBuffer dest)
INDArraytoDoubleBuffer in interface INDArraytoDoubleBuffer in class AVectorpublic Vector3 toNormal()
AVectortoNormal in class APrimitiveVectorpublic Vector3 clone()
AVectorclone in interface INDArrayclone in class APrimitiveVectorpublic double getX()
getX in class APrimitiveVectorpublic double getY()
getY in class APrimitiveVectorpublic double getZ()
getZ in class APrimitiveVectorpublic Vector3 exactClone()
AVectorexactClone in interface INDArrayexactClone in class APrimitiveVectorCopyright © 2013. All Rights Reserved.