![]() |
Bridges-Python-3.0.2
3.0.2
Bridges(PythonAPI)
|
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.
Arrays are internally represented as 1D arrays; currently 1D, 2D and 3D arrays are supported.
Example Tutorial at: http://bridgesuncc.github.io/tutorials/Array.html (1D, 2D, and 3D Array)
Public Member Functions | |
def | __init__ (self, kwargs) |
Array constructor. More... | |
def | num_dims (self) |
Getter for representing the number of dimensions in the array. More... | |
def | num_dims |
Setter function for the number of dimensions for the array. More... | |
def | size (self) |
Getter for representing the size of array. More... | |
def | size |
Setter for representing the size of the array. More... | |
def | set_size |
Set the size of each dimensions; also allocates array space. More... | |
def | get_data_structure_type (self) |
Gets the data structure type. More... | |
def | get_dimensions (self) |
Get the size of each dimensions. More... | |
def | 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) |
def | get_data_structure_representation (self) |
Generating the JSON string for a bridges array object. More... | |
Public Attributes | |
num_dims | |
size | |
Static Public Attributes | |
list | dims = [1,1,1] |
def bridges.array.Array.__init__ | ( | self, | |
kwargs | |||
) |
Array constructor.
dims | size of each dimension (array) |
num_dims | The dimensions of the array (1-3). Defaults to 1 dimension (int) |
def bridges.array.Array.__getitem__ | ( | self, | |
item | |||
) |
def bridges.array.Array.__setitem__ | ( | self, | |
key, | |||
value | |||
) |
def bridges.array.Array.get_data_structure_representation | ( | self, | |
dict | |||
) |
Generating the JSON string for a bridges array object.
def bridges.array.Array.get_data_structure_type | ( | self, | |
str | |||
) |
Gets the data structure type.
ValueError | if number of dimensions is < 1 or > 3 |
def bridges.array.Array.get_dimensions | ( | self, | |
list | |||
) |
Get the size of each dimensions.
def bridges.array.Array.get_element | ( | self, | |
args, | |||
kwargs | |||
) |
Getter function for an element in the array at given position.
(int) x,y,z,: indices
(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
def bridges.array.Array.num_dims | ( | self, | |
int | |||
) |
Getter for representing the number of dimensions in the array.
def bridges.array.Array.num_dims | ( | self, | |
value | |||
) |
Setter function for the number of dimensions for the array.
value | An integer for the number of dimensions (Between 1 and 3 inclusive) |
ValueError | if dimension passed in is < 1 or > 3 |
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
def bridges.array.Array.set_size | ( | self, | |
nd | |||
) |
Set the size of each dimensions; also allocates array space.
(int) nd: number of dimensions (list) dim: size of each dimension
def bridges.array.Array.size | ( | self, | |
int | |||
) |
Getter for representing the size of array.
def bridges.array.Array.size | ( | self, | |
sz | |||
) |
Setter for representing the size of the array.
(int) sz: The size to be set for array
|
static |
bridges.array.Array.num_dims |
bridges.array.Array.size |