@Deprecated public final class MutableVec extends Vec
Vec. This vector can be modified and is not
thread-safe. Create one with create(int) or wrap(double[]).| Modifier and Type | Method and Description |
|---|---|
double |
add(int i,
double v)
Deprecated.
Add a value to an entry in this vector.
|
void |
add(Vec v)
Deprecated.
Add another vector to this vector.
|
static MutableVec |
create(int dim)
Deprecated.
Create a new mutable vector with the specified size.
|
void |
fill(double v)
Deprecated.
Fill the vector with a value.
|
void |
scale(double s)
Deprecated.
Scale this vector.
|
void |
set(double[] v)
Deprecated.
Copy an array into this vector.
|
double |
set(int i,
double v)
Deprecated.
Set a value in this vector.
|
void |
set(Vec v)
Deprecated.
Copy a vector into this vector.
|
static MutableVec |
wrap(double[] data)
Deprecated.
Create a new vector wrapping an existing array.
|
public static MutableVec create(int dim)
dim - The size of the new vector.public static MutableVec wrap(double[] data)
data - The data array.data.public double set(int i,
double v)
i - The index.v - The value to set.i.IllegalArgumentException - if i is not a valid index in this vector.public double add(int i,
double v)
i - The index.v - The value to set.i.IllegalArgumentException - if i is not a valid index in this vector.public void fill(double v)
v - The value with which to fill the vector.public void set(Vec v)
v - The vector to copy in.public void set(double[] v)
v - The array to copy in.public void add(Vec v)
v - The other vector.IllegalArgumentException - if v has a different dimension than this vector.public void scale(double s)
s - The scalar to multiply this vector by.