This class can be used to create arrays of type Element.
- Author
- Matthew McQuaigue, Erik Saule
- Date
- 10/8/16, 6/09/19, 7/20/22
This class can be used to create arrays of type Element. Element enables to store objects of any types and provide styling features for visualization purposes.
Arrays are internally represented as 1D arrays; currently 1D, 2D and 3D arrays are supported.
Example Tutorial at: https://bridgesuncc.github.io/tutorials/Array.html (1D, 2D, and 3D Array)
|
def | __init__ (self, **kwargs) |
| Array constructor. More...
|
|
int | num_dims (self) |
| Getter for representing the number of dimensions in the array. More...
|
|
None | num_dims (self, int value) |
| Setter function for the number of dimensions for the array. More...
|
|
int | size (self) |
| Getter for representing the size of array. More...
|
|
None | size (self, int sz) |
| Setter for representing the size of the array. More...
|
|
None | set_size (self, int nd, list dim) |
| Set the size of each dimensions; also allocates array space. More...
|
|
str | get_data_structure_type (self) |
| Gets the data structure type. More...
|
|
List[int] | get_dimensions (self) |
| Get the size of each dimensions. More...
|
|
Element | get_element (self, *args, **kwargs) |
| Getter function for an element in the array at given position. More...
|
|
def | set_element (self, *args, **kwargs) |
| Setter function for an element in the array at given position. More...
|
|
def | __getitem__ (self, item) |
|
def | __setitem__ (self, key, value) |
|
dict | get_data_structure_representation (self) |
| Generating the JSON string for a bridges array object. More...
|
|
def bridges.array.Array.set_element |
( |
|
self, |
|
|
* |
args, |
|
|
** |
kwargs |
|
) |
| |
Setter function for an element in the array at given position.
(int) x,y,z: indices
(Element) el: element object to be assigned to index, always last position arg if using unnamed args
(Element) el: element object to be assigned to index
(int) index: the index of array to get in array
(int) x: column index into array
(int) y: row index into array
(int) z: slice index into array
- Returns
-
None