Biogeme: Python Library
2.5
|
This class implements a matrix object designed to store the variance covariance matrix. More...
Public Member Functions | |
def | __init__ (self, dim, names, values) |
Constructor. More... | |
def | setvalue (self, rowname, colname, v) |
Set an entry of the matrix. More... | |
def | getvalue (self, rowname, colname) |
Get an entry of the matrix. More... | |
def | __str__ (self) |
Function called by the print statement. | |
Public Attributes | |
dim | |
Dimension of the (square) matrix. | |
names | |
keys | |
matrix | |
This class implements a matrix object designed to store the variance covariance matrix.
Definition at line 8 of file bioMatrix.py.
def bioMatrix.bioMatrix.__init__ | ( | self, | |
dim, | |||
names, | |||
values | |||
) |
Constructor.
dim | Dimension of the (square) matrix |
names | Array of dimension dim containing the names of the parameters |
values | Two-dimensional array of dimension dim x dim containing the entries of the matrix |
Example for the diagonal matrix
Definition at line 20 of file bioMatrix.py.
def bioMatrix.bioMatrix.getvalue | ( | self, | |
rowname, | |||
colname | |||
) |
Get an entry of the matrix.
rowname | Name of the row |
colname | Name of the column |
Definition at line 51 of file bioMatrix.py.
def bioMatrix.bioMatrix.setvalue | ( | self, | |
rowname, | |||
colname, | |||
v | |||
) |
Set an entry of the matrix.
If it is an off-diagonal entry, the symmetric entry is set to the same value to maintain the symmetry of the matrix.
rowname | Name of the row |
colname | Name of the column |
v | Value |
Definition at line 43 of file bioMatrix.py.