Constructor and Description |
---|
PrimitiveDoubleBuffer()
Constructs a new instance with a zero length vector.
|
PrimitiveDoubleBuffer(double[] arr)
Constructs a new instance copying the input.
|
PrimitiveDoubleBuffer(double[] arr,
boolean copyFlag)
Constructs a new instance.
|
PrimitiveDoubleBuffer(int sz)
Constructs a new instance with a vector of length sz.
|
Modifier and Type | Method and Description |
---|---|
double[] |
getData()
Returns a copy of the wrapped double[] vector
|
double[] |
getDataRef()
Returns a reference to the wrapped data vector.
|
int |
getDimension()
Returns the length of the wrapped double[]
|
double |
getEntry(int index)
Returns the entry at specified index
|
void |
setData(double[] arr)
Replaces the current wrapped double[] with a copy of the input.
|
void |
setDataRef(double[] arr)
Replaces the current wrapped double[] with a reference to the input.
|
void |
setEntry(int index,
double val)
Sets the entry at the specified index
|
public PrimitiveDoubleBuffer()
public PrimitiveDoubleBuffer(int sz)
sz
- public PrimitiveDoubleBuffer(double[] arr)
arr
- public PrimitiveDoubleBuffer(double[] arr, boolean copyFlag)
arr
- copyFlag
- public double[] getData()
public final double[] getDataRef()
public final void setData(double[] arr)
arr
- public final void setDataRef(double[] arr)
data
as an
external mutable array.arr
- public double getEntry(int index)
index
- public void setEntry(int index, double val)
index
- val
- public int getDimension()