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 references other vectors / data.
|
int |
length() |
void |
multiply(double factor)
Multiplies the vector by a constant factor
|
void |
set(int i,
double value) |
copy, copy, copyTo, magnitude, magnitudeSquared, subVectoradd, addMultiple, angle, approxEquals, approxEquals, compareTo, copyTo, distance, distanceSquared, dotProduct, equals, isMutable, isUnitLengthVector, isZeroVector, join, manhattanDistance, negate, normalise, set, setValues, subtract, subtractMultiple, 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 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.