Bridges-Java  3.4.3
Bridges(Java API)
Public Member Functions | Package Attributes | List of all members
bridges.base.Array3D< E > Class Template Reference
Inheritance diagram for bridges.base.Array3D< E >:
bridges.base.Array< E > bridges.base.DataStruct

Detailed Description

This class can be used to create two dimensional arrays of type Element<E>.

Author
Kalpathi Subramanian
Date
7/18/19

This class can be used to create 3-dimensional arrays of type Element<E> where E is a generic object representing application specific data.

Arrays are internally represented as 1D arrays

Parameters
<E>The generic parameter object that is part of this element, representing application specific data.
See also
Example Tutorial at
https://bridgesuncc.github.io/tutorials/Array.html (1D, 2D, and 3D Array)

Public Member Functions

 Array3D ()
 
 Array3D (int[] dims)
 
 Array3D (int slices, int rows, int cols)
 
Element< E > getElement (int slice, int row, int col)
 
void setElement (int slice, int row, int col, Element< E > el)
 
- Public Member Functions inherited from bridges.base.Array< E >
 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 ()
 

Package Attributes

int num_rows
 
int num_slices
 
- 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 = "]"
 

Additional Inherited Members

- Protected Member Functions inherited from bridges.base.Array< E >
Element< E > getElement (int indx)
 
void setElement (int indx, Element< E > el)
 
- Protected Attributes inherited from bridges.base.DataStruct
String QUOTE = "\""
 

Constructor & Destructor Documentation

◆ Array3D() [1/3]

◆ Array3D() [2/3]

bridges.base.Array3D< E >.Array3D ( int[]  dims)

Create an array object with the specified dimensions, order is slices, rows, columns, with slices varying the slowest, and columns verying the fastest

Parameters
dimssize of each dimension

◆ Array3D() [3/3]

bridges.base.Array3D< E >.Array3D ( int  slices,
int  rows,
int  cols 
)

Create an array object with the specified dimensions

Parameters
colsnumber of columns
rowsnumber of rows
slicesnumber of slices

Member Function Documentation

◆ getElement()

Element<E> bridges.base.Array3D< E >.getElement ( int  slice,
int  row,
int  col 
)

Get the object at slice, row, column – for 3D arrays

Parameters
slice- slice index
row- row index
col- column index
Returns
Element<E> object at slice, row, column

◆ setElement()

void bridges.base.Array3D< E >.setElement ( int  slice,
int  row,
int  col,
Element< E >  el 
)

Set the input object at 'col, row, slice'

Parameters
sliceslice index into the array
rowrow index into the array
colcolumn index into the array
elelement object to be assigned at 'indx'

Member Data Documentation

◆ num_rows

int bridges.base.Array3D< E >.num_rows
package

◆ num_slices

int bridges.base.Array3D< E >.num_slices
package

The documentation for this class was generated from the following file: