|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.jbeans.j3d.data.DataArray
net.jbeans.j3d.data.DoubleArray
DoubleArray is an array of double numbers.
DataArray| Field Summary |
| Fields inherited from class net.jbeans.j3d.data.DataArray |
array, dimension, maxId, size, tupleT |
| Constructor Summary | |
DoubleArray()
|
|
DoubleArray(DataArray da)
|
|
DoubleArray(int dim)
Construct a new DoubleArray object. |
|
| Method Summary | |
boolean |
allocate(int size)
Allocate memory for this array. |
void |
copy(DataArray da)
|
int |
getDataType()
Get the data type. |
double |
getElement(int i,
int j)
Return the data element at the ith tuple and
jth element location. |
double[] |
getTuple(int i)
Get a copy of a tuple at the ith location. |
void |
getTuple(int i,
double[] tuple)
Copy the tuple value into a user-provided array. |
double |
getValue(int id)
Get the data at a particular index. |
void |
insertElement(int i,
int j,
double e)
Insert the data element at ith tuple and
jth element location. |
int |
insertNextTuple(double[] tuple)
Insert (memory allocation performed) the tuple onto the end of the array. |
int |
insertNextValue(double i)
Insert data at the end of the array. |
void |
insertTuple(int i,
double[] tuple)
Insert (memory allocation performed) the tuple into the ith location in the array. |
void |
insertValue(int id,
double i)
Insert data at a specified position in the array. |
DataArray |
makeObject()
Virtual constructor creates object of same type as this object. |
protected java.lang.Object |
resize(int size)
resize the array. |
void |
setArray(double[] array)
This method lets the user specify data to be held by the array. |
void |
setElement(int i,
int j,
double e)
Set the data element at the ith tuple and
jth element location. |
void |
setNumberOfTuples(int number)
Set the number of n-tuples in the array. |
void |
setNumberOfValues(int number)
Specify the number of values for this object to hold. |
void |
setTuple(int i,
double[] tuple)
Set the tuple value at the ith location in the array. |
void |
setValue(int id,
double value)
Set the data at a particular index. |
| Methods inherited from class net.jbeans.j3d.data.DataArray |
ensureSpace, getData, getData, getDimension, getMaxId, getNumberOfTuples, getSize, initialize, reset, setDimension, squeeze |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DoubleArray(int dim)
dim - the dimension of the tuple.public DoubleArray()
public DoubleArray(DataArray da)
| Method Detail |
public void copy(DataArray da)
copy in class DataArraypublic DataArray makeObject()
makeObject in class DataArraypublic void setArray(double[] array)
true
to keep the class from deleting the array when it cleans up or
reallocates memory.
The class uses the actual array provided; it does not copy the data
from the suppled array.
array - protected java.lang.Object resize(int size)
resize in class DataArraypublic boolean allocate(int size)
allocate in class DataArraypublic int getDataType()
getDataType in class DataArraypublic void setNumberOfTuples(int number)
setNumberOfTuples in class DataArraynumber -
public double[] getTuple(int i)
ith location.
getTuple in class DataArrayi -
public void getTuple(int i,
double[] tuple)
getTuple in class DataArrayi - tuple -
public void setTuple(int i,
double[] tuple)
setTuple in class DataArrayi - tuple -
public void insertTuple(int i,
double[] tuple)
insertTuple in class DataArrayi - tuple -
public int insertNextTuple(double[] tuple)
insertNextTuple in class DataArraytuple -
public double getValue(int id)
public void setValue(int id,
double value)
public void setNumberOfValues(int number)
public void insertValue(int id,
double i)
public int insertNextValue(double i)
public double getElement(int i,
int j)
throws java.lang.ArrayIndexOutOfBoundsException
ith tuple and
jth element location.
Note that i is less than number of tuples and
j is less than the dimension.
getElement in class DataArrayi - the index to the ith tuple.j - the index to the jth element of the tuple.
java.lang.ArrayIndexOutOfBoundsException
public void setElement(int i,
int j,
double e)
throws java.lang.ArrayIndexOutOfBoundsException
ith tuple and
jth element location.
Note that i is less than number of tuples and
j is less than the dimension.
setElement in class DataArrayi - the index to the ith tuple.j - the index to the jth element of the tuple.e - the element to be set.
java.lang.ArrayIndexOutOfBoundsException
public void insertElement(int i,
int j,
double e)
throws java.lang.ArrayIndexOutOfBoundsException
ith tuple and
jth element location.
insertElement in class DataArrayjava.lang.ArrayIndexOutOfBoundsException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||