public final class ArraySubVector extends ArrayVector
| Constructor and Description |
|---|
ArraySubVector(ArraySubVector source) |
ArraySubVector(ArrayVector source,
int offset,
int length)
Constructs a vector directly referencing a sub-vector of an existing
array-based Vector
|
ArraySubVector(double[] values) |
ArraySubVector(int length) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ArrayVector v) |
void |
addMultiple(ArrayVector v,
double factor) |
AVector |
clone()
Clones the vector, creating a new copy of all data.
|
void |
fill(double value)
Fills a vector with a given value
|
double |
get(int i) |
double[] |
getArray() |
int |
getArrayOffset() |
int |
hashCode()
Vector hashcode, designed to match hashcode of Java double array
|
boolean |
isReference()
Returns true if this vector is of a type that references other vectors / data.
|
int |
length() |
void |
multiply(double factor)
Multiplies the vector by a constant factor
|
void |
set(int i,
double value) |
static ArraySubVector |
wrap(double[] data,
int offset,
int length) |
add, copy, copy, copyTo, divide, divide, divideTo, fillRange, magnitude, magnitudeSquared, multiply, multiply, multiplyTo, set, set, subVectorabsolute, add, add, addMultiple, addMultiple, addProduct, addProduct, addWeighted, angle, asList, clamp, clampMax, clampMin, compareTo, copyTo, distance, distanceL1, distanceLinf, distanceSquared, divide, dotProduct, dotProduct, epsilonEquals, epsilonEquals, equals, interpolate, interpolate, isFullyMutable, isMutable, isUnitLengthVector, isZeroVector, iterator, join, maxAbsComponent, negate, normalise, projectToPlane, scale, scale, scaleAdd, scaleToMagnitude, set, setValues, sub, subMultiple, toArray, toList, toStringpublic ArraySubVector(double[] values)
public ArraySubVector(int length)
public ArraySubVector(ArraySubVector source)
public ArraySubVector(ArrayVector source, int offset, int length)
source - offset - length - public static ArraySubVector wrap(double[] data, int offset, int length)
public int length()
public double get(int i)
public void set(int i,
double value)
public void add(ArrayVector v)
add in class ArrayVectorpublic void addMultiple(ArrayVector v, double factor)
addMultiple in class ArrayVectorpublic void fill(double value)
AVectorpublic void multiply(double factor)
AVectorpublic int hashCode()
public double[] getArray()
getArray in class ArrayVectorpublic int getArrayOffset()
getArrayOffset in class ArrayVectorpublic boolean isReference()
AVectorisReference in class AVectorCopyright © 2012. All Rights Reserved.