This class can be used to create arrays of type Element<E>.
More...
|
| | Array () |
| |
| | Array (int num_dims, int[] dims) |
| |
| | Array (int num_elements) |
| |
| | Array (int x_dim, int y_dim) |
| |
| | Array (int x_dim, int y_dim, int z_dim) |
| |
| String | getDataStructType () |
| |
| void | setNumDimensions (int nd) |
| |
| int | getNumDimensions () |
| |
| void | setDimensions (int[] dim) |
| |
| void | getDimensions (int[] dim) |
| |
| int | getSize () |
| |
| Element< E > | getElement (int indx) |
| |
| Element< E > | getElement (int x, int y) |
| |
| Element< E > | getElement (int x, int y, int z) |
| |
| void | setElement (int indx, Element< E > el) |
| |
| void | setElement (int x, int y, Element< E > el) |
| |
| void | setElement (int x, int y, int z, Element< E > el) |
| |
| String | getDataStructureRepresentation () |
| |
This class can be used to create arrays of type Element<E>.
- Author
- Kalpathi Subramanian
- Date
- 10/8/16, 5/17/17, 5/30/18
This class can be used to create arrays of type Element<E> where E is a generic object representing application specific data.
Arrays are internally represented as 1D arrays; currently 1D, 2D and 3D arrays are supported.
- Parameters
-
| <E> | The generic parameter object that is part of this element, representing application specific data. |
- See also
- Example Tutorial at
http://bridgesuncc.github.io/Hello_World_Tutorials/ARRAY1D.html (1D Array)
http://bridgesuncc.github.io/Hello_World_Tutorials/ARRAY2D.html (2D Array)
http://bridgesuncc.github.io/Hello_World_Tutorials/ARRAY3D.html (3D Array)
◆ Array() [1/5]
◆ Array() [2/5]
Create an array object with the specified dimensions
- Parameters
-
| num_dims | number of dimensions of the array |
| dims | size of each dimension |
◆ Array() [3/5]
Create an 1D array object
- Parameters
-
◆ Array() [4/5]
Create an 2D array object
- Parameters
-
| x_dim | number of elements along dimension 1 |
| y_dim | number of elements along dimension 2 |
◆ Array() [5/5]
Create an 3D array object
- Parameters
-
| x_dim | number of elements along dimension 1 |
| y_dim | number of elements along dimension 2 |
| z_dim | number of elements along dimension 3 |
◆ getDataStructType()
This method gets the data structure type
- Returns
- The date structure type as a string
Reimplemented from bridges.base.DataStruct.
◆ getDataStructureRepresentation()
Generating the JSON string for a Bridges array object (Array<E>[])
- Parameters
-
- Returns
- JSON string
◆ getDimensions()
Get the size of each dimensions;
- Parameters
-
| dims[] | size of each dimension is returned |
◆ getElement() [1/3]
Get the object at 'indx'
- Parameters
-
- Returns
- Element<E> object at 'indx'
◆ getElement() [2/3]
Get the object at index x, y – for 2D arrays
- Parameters
-
| x | - column index |
| y | - row index |
- Returns
- Element<E> object at x, y
◆ getElement() [3/3]
Get the object at x, y, z – for 3D arrays
- Parameters
-
| x | - column index |
| y | - row index |
| z | - slice index |
- Returns
- Element<E> object at x, y, z
◆ getNumDimensions()
Get the number of dimensions of the array;
- Returns
- number of dimensions
◆ getSize()
Get the array size
- Returns
- size
◆ setDimensions()
Set the size of each dimensions; also allocates array space
- Parameters
-
| dim[] | size of each dimension |
◆ setElement() [1/3]
Set the input object at 'indx' - for 1D array
- Parameters
-
| indx | index into the array |
| el | element object to be assigned at 'indx' |
◆ setElement() [2/3]
Set the input object at x, y - 2D arrays
- Parameters
-
| x | column index into the array |
| y | row index into the array |
| el | element object to be assigned at 'indx' |
◆ setElement() [3/3]
Set the input object at 'col, row, slice'
- Parameters
-
| x | column index into the array |
| y | row index into the array |
| z | slice index into the array |
| el | element object to be assigned at 'indx' |
◆ setNumDimensions()
Set the number of dimensions of the array;
- Parameters
-
The documentation for this class was generated from the following file:
- /Users/kalpathi/gr/bridges/client/java/src/main/java/bridges/base/Array.java