![]() |
Bridges-Java-3.0.2
3.0.2
Bridges(JavaAPI)
|
This is a class in BRIDGES for representing an (m x n) grid.
Public Member Functions | |
| String | getDataStructType () |
| Grid () | |
| Grid (int size) | |
| Grid (int rows, int cols) | |
| Grid (int[] size) | |
| int [] | getDimensions () |
| E | get (Integer row, Integer col) |
| void | set (Integer row, Integer col, E val) |
| String | getDataStructureRepresentation () |
Public Member Functions inherited from bridges.base.DataStruct | |
| abstract String | getDataStructType () |
| abstract String | getDataStructureRepresentation () |
Protected Attributes | |
| ArrayList< ArrayList< E > > | grid |
| int [] | gridSize |
Protected Attributes inherited from bridges.base.DataStruct | |
| String | QUOTE = "\"" |
Static Protected Attributes | |
| static final int [] | defaultGridSize = {10, 10} |
| static int [] | maxGridSize = {1080, 1920} |
| bridges.base.Grid< E >.Grid | ( | ) |
Construct a grid with default sizes
| bridges.base.Grid< E >.Grid | ( | int | size | ) |
Construct a size x size grid
| bridges.base.Grid< E >.Grid | ( | int | rows, |
| int | cols | ||
| ) |
Construct a rows x cols size grid
| rows | number of rows in grid |
| cols | number of rows in grid |
| bridges.base.Grid< E >.Grid | ( | int [] | size | ) |
Construct a size[0] by size[1] sized grid
| size[] | specifies rows and column sizes of the grid |
| E bridges.base.Grid< E >.get | ( | Integer | row, |
| Integer | col | ||
| ) |
Get the (row, col) element in the grid
| row | row number |
| col | number |
| String bridges.base.Grid< E >.getDataStructType | ( | ) |
Get data structure name
| String bridges.base.Grid< E >.getDataStructureRepresentation | ( | ) |
Get data structure representation
| int [] bridges.base.Grid< E >.getDimensions | ( | ) |
Get the grid dimensions
| void bridges.base.Grid< E >.set | ( | Integer | row, |
| Integer | col, | ||
| E | val | ||
| ) |
Set the (row, col) element in the grid
| row,col | cell to change |
| val | the value to be set to |
|
staticprotected |
|
protected |
|
protected |
|
staticprotected |
1.8.14