Bridges-Python 3.5.1
Bridges(Python API)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
bridges.array1d.Array1D Class Reference

This is a class can be used to create 1 dimensional arrays of type Element. More...

Inheritance diagram for bridges.array1d.Array1D:
bridges.array.Array

Public Member Functions

 __init__ (self, sz=None)
 Create a 1D array object.
 
- Public Member Functions inherited from bridges.array.Array
None set_size (self, int nd, list dim)
 Set the size of each dimensions; also allocates array space.
 
str get_data_structure_type (self)
 Gets the data structure type.
 
List[int] get_dimensions (self)
 Get the size of each dimensions.
 
Element get_element (self, *args, **kwargs)
 Getter function for an element in the array at given position.
 
 set_element (self, *args, **kwargs)
 Setter function for an element in the array at given position.
 
 __getitem__ (self, item)
 
 __setitem__ (self, key, value)
 
dict get_data_structure_representation (self)
 Generating the JSON string for a bridges array object.
 

Public Attributes

 size
 

Additional Inherited Members

- Static Public Attributes inherited from bridges.array.Array
list dims = [1,1,1]
 
- Protected Attributes inherited from bridges.array.Array
 _dims
 
 _array_data
 
 _num_dims
 
 _size
 
- Properties inherited from bridges.array.Array
 num_dims = property
 Getter for representing the number of dimensions in the array.
 
 size = property
 Getter for representing the size of array.
 

Detailed Description

This is a class can be used to create 1 dimensional arrays of type Element.

Author
Kalpathi Subramanian, Matthew McQuaigue
Date
7/18/19

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

Array1D has iterator semantic to enable range for loops. For instance,

@code
arr = Array1D(3)
arr[0] = Element("a")
arr[1] = Element("b")
arr[2] = Element("c")
This is a class can be used to create 1 dimensional arrays of type Element.
Definition array1d.py:29
This is the main superclass in BRIDGES for deriving a number of elements used in building data struct...
Definition element.py:38

for el in arr: print(el.label)

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

Constructor & Destructor Documentation

◆ __init__()

bridges.array1d.Array1D.__init__ (   self,
  sz = None 
)

Create a 1D array object.

Parameters
sznumber of elements in the array

Reimplemented from bridges.array.Array.

Member Data Documentation

◆ size

bridges.array1d.Array1D.size

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