visad.util
Interface FloatTupleArray

All Known Implementing Classes:
FloatTupleArrayImpl

public interface FloatTupleArray

Growable data structure for float tuples.


Nested Class Summary
static class FloatTupleArray.Factory
           
 
Method Summary
 void add(float[][] elements)
          Add tuples to the array.
 void add(float[][] values, int start, int num)
          Add tuples to array.
 int dim()
          Get array tuple dimension.
 float[][] elements()
          Get the elements of this array.
 float get(int i, int j)
          Get a value.
 void set(int i, int j, float val)
          Set an array value.
 int size()
          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 i at tuple index j.

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