|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.tools.container.MultidimensionalArraySet<E>
E - the class of the array elementspublic class MultidimensionalArraySet<E>
This class represents a multidimensional array whose dimensions have to be specified during construction. The multidimensional array is modeled by an underlying single dimension array.
| Constructor Summary | |
|---|---|
MultidimensionalArraySet(int[] dimensions)
The constructor. |
|
| Method Summary | |
|---|---|
E |
get(int index)
Returns the array element at the specified single dimension array position. |
E |
get(int[] indices)
Returns the array element at the position specified by the given indices. |
int[] |
getDimensions()
Returns an int array holding the dimensions of the multidimensional array. |
int |
getIndex(int[] indices)
Computes the single dimension array index from the given multidimensional indices. |
int[] |
getIndices(int index)
Computs the multidimensional indices corresponding to a single dimension array index. |
void |
set(int[] indices,
E e)
Sets the array element at the position specified by the given indices |
void |
set(int index,
E e)
Sets the array element at the specified single dimension array position. |
int |
size()
Returns the number of elements this array can hold. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultidimensionalArraySet(int[] dimensions)
dimensions - int array which contains the size of each dimension| Method Detail |
|---|
public E get(int index)
index - the index
public E get(int[] indices)
indices - the indices
public void set(int index,
E e)
index - the indexe - an element
public void set(int[] indices,
E e)
indices - the indicese - an elementpublic int getIndex(int[] indices)
indices - the indices
public int[] getIndices(int index)
index - the index
public int size()
public int[] getDimensions()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||