public class PGEMatrix extends Object
A PGEMatrix is a set of rows and columns with values in each cell defined by a row number and column number.
Constructor and Description |
---|
PGEMatrix()
Constructs a new PGEMatrix with no rows or columns.
|
PGEMatrix(String name,
int numrows,
int numcols)
Constructs a new PGEMatrix with the specified
numrows and
numcols . |
Modifier and Type | Method and Description |
---|---|
void |
addValue(Object value,
int row,
int col) |
String |
getName() |
int |
getNumCols() |
List<List<Object>> |
getRows() |
Object |
getValue(int row,
int col) |
void |
setName(String name) |
void |
setNumCols(int numCols) |
void |
setRows(List<List<Object>> rows) |
public PGEMatrix()
Constructs a new PGEMatrix with no rows or columns.
public PGEMatrix(String name, int numrows, int numcols)
Constructs a new PGEMatrix with the specified numrows
and
numcols
.
numrows
- The number of rows in the matrix.numcols
- The number of columns for each row in the matrix.public void addValue(Object value, int row, int col)
public Object getValue(int row, int col)
public String getName()
public void setName(String name)
name
- The name to set.public int getNumCols()
public void setNumCols(int numCols)
numCols
- The numCols to set.Copyright © 1999–2017 Apache OODT. All rights reserved.