Bridges-Python  3.4.4
Bridges(Python API)
Public Member Functions | Public Attributes | List of all members
bridges.array2d.Array2D Class Reference
Inheritance diagram for bridges.array2d.Array2D:
bridges.array.Array

Detailed Description

brief This class can be used to create 2D arrays of type Element.

Author
Kalpathi Subramanian, Matthew McQuaigue, Erik Saule
Date
10/8/16, 5/17/17, 5/30/18, 7/20/22

This class can be used to create 2D arrays of type Element. Element enables to store objects of any types and provide styling features for visualization purposes.

Array2D are internally represented as 1D arrays.

Example Tutorial at: https//:bridgesuncc.github.io/tutorials/Array.html (1D, 2D, and 3D Array)

Public Member Functions

def __init__ (self, rows=None, cols=None)
 Create an array object with the specified dimensions. More...
 
- Public Member Functions inherited from bridges.array.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...
 

Public Attributes

 num_rows
 
 num_cols
 
 size
 
- Public Attributes inherited from bridges.array.Array
 num_dims
 
 size
 

Additional Inherited Members

- Static Public Attributes inherited from bridges.array.Array
list dims = [1,1,1]
 

Constructor & Destructor Documentation

◆ __init__()

def bridges.array2d.Array2D.__init__ (   self,
  rows = None,
  cols = None 
)

Create an array object with the specified dimensions.

Parameters
rowsnumber of rows in array (int)
colsnumber of cols in array (int)

Member Data Documentation

◆ num_cols

bridges.array2d.Array2D.num_cols

◆ num_rows

bridges.array2d.Array2D.num_rows

◆ size

bridges.array2d.Array2D.size

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