Bridges-Java
3.4.3
Bridges(Java API)
|
This class can be used to create arrays of type Element<E>.
This class can be used to create arrays of type Element<E> where E is a generic object representing application specific data.
This class is not directly called; instead use subclasses of arrays to construct arrays, depending on their dimension.
Arrays are internally represented as 1D arrays; currently 1D, 2D and 3D arrays are supported.
dims is cols, rows, slices
<E> | The generic parameter object that is part of this element, representing application specific data. |
Public Member Functions | |
Array () | |
Array (int num_dims, int[] dims) | |
String | getDataStructType () |
void | setNumDimensions (int nd) |
int | getNumDimensions () |
void | setSize (int nd, int[] dim) |
Set the size of each dimensions; also allocates array space. More... | |
void | getDimensions (int[] dim) |
Get the size of each dimensions;. More... | |
int | getSize () |
String | getDataStructureRepresentation () |
Protected Member Functions | |
Element< E > | getElement (int indx) |
void | setElement (int indx, Element< E > el) |
Additional Inherited Members | |
Protected Attributes inherited from bridges.base.DataStruct | |
String | QUOTE = "\"" |
Package Attributes inherited from bridges.base.DataStruct | |
String | COMMA = "," |
String | COLON = ":" |
String | OPEN_CURLY = "{" |
String | CLOSE_CURLY = "}" |
String | OPEN_PAREN = "(" |
String | CLOSE_PAREN = ")" |
String | OPEN_BOX = "[" |
String | CLOSE_BOX = "]" |
bridges.base.Array< E >.Array | ( | ) |
bridges.base.Array< E >.Array | ( | int | num_dims, |
int[] | dims | ||
) |
Create an array object with the specified dimensions
num_dims | number of dimensions of the array |
dims | size of each dimension |
String bridges.base.Array< E >.getDataStructType | ( | ) |
This method gets the data structure type
Reimplemented from bridges.base.DataStruct.
String bridges.base.Array< E >.getDataStructureRepresentation | ( | ) |
Gets the data structure representation of the array (as JSON)
Reimplemented from bridges.base.DataStruct.
void bridges.base.Array< E >.getDimensions | ( | int[] | dim | ) |
Get the size of each dimensions;.
|
protected |
Get the object at 'indx'
indx | index into the array |
Reimplemented in bridges.base.Array1D< E >.
int bridges.base.Array< E >.getNumDimensions | ( | ) |
Get the number of dimensions of the array;
int bridges.base.Array< E >.getSize | ( | ) |
Get the array size
|
protected |
Set the input object at 'indx' - for 1D array
indx | index into the array |
el | element object to be assigned at 'indx' |
Reimplemented in bridges.base.Array1D< E >.
void bridges.base.Array< E >.setNumDimensions | ( | int | nd | ) |
Set the number of dimensions of the array;
nd | number of dimensions |
void bridges.base.Array< E >.setSize | ( | int | nd, |
int[] | dim | ||
) |
Set the size of each dimensions; also allocates array space.
nd | number of dimension |
dim | size of each dimension |