visad.util
Interface FloatTupleArray
-
- All Known Implementing Classes:
- FloatTupleArrayImpl
public interface FloatTupleArrayGrowable data structure for float tuples.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface and Description static classFloatTupleArray.Factory
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidadd(float[][] elements)Add tuples to the array.voidadd(float[][] values, int start, int num)Add tuples to array.intdim()Get array tuple dimension.float[][]elements()Get the elements of this array.floatget(int i, int j)Get a value.voidset(int i, int j, float val)Set an array value.intsize()Get array size.float[][]toArray()Get array data.
-
-
-
Method Detail
-
add
void add(float[][] values, int start, int num)Add tuples to array.- Parameters:
values- Values to add to array where dimension 2 ==dim().start- Index in input array where to start taking tuples.num- The number of tuples to take.
-
elements
float[][] elements()
Get the elements of this array.- Returns:
- This may return a reference or copy depending on the implementation.
-
add
void add(float[][] elements)
Add tuples to the array. The array will grow as necessary to accommodate the new data.- Parameters:
elements- Values to add to array where dimension 2 ==dim().
-
set
void set(int i, int j, float val)Set an array value.- Parameters:
i- Tuple row index.j- Tuple col index.val- Value to set.
-
get
float get(int i, int j)Get a value.- Parameters:
i- Tuple row index.j- Tuple col index.- Returns:
- The value for tuple
iat tuple indexj.
-
toArray
float[][] toArray()
Get array data. This is potentially expensive.- Returns:
- A copy of the array data.
-
size
int size()
Get array size.- Returns:
- size of array
-
dim
int dim()
Get array tuple dimension.- Returns:
- The array tuple dimension
-
-
DMelt 3.0 © DataMelt by jWork.ORG