iSAM
isam::OrderedSparseMatrix Class Reference
Inheritance diagram for isam::OrderedSparseMatrix:
Collaboration diagram for isam::OrderedSparseMatrix:

List of all members.

Public Member Functions

 OrderedSparseMatrix (int num_rows, int num_cols)
 OrderedSparseMatrix (const OrderedSparseMatrix &mat)
 OrderedSparseMatrix (const OrderedSparseMatrix &mat, int num_rows, int num_cols, int first_row=0, int first_col=0)
 OrderedSparseMatrix (int num_rows, int num_cols, SparseVector_p *rows)
virtual ~OrderedSparseMatrix ()
const OrderedSparseMatrixoperator= (const OrderedSparseMatrix &mat)
void set_row (int row, const SparseVector &new_row)
void import_rows_ordered (int num_rows, int num_cols, SparseVector_p *rows, int *r_to_a)
void append_new_cols (int num)
virtual const int * a_to_r () const
virtual const int * r_to_a () const

Detailed Description

Definition at line 39 of file OrderedSparseMatrix.h.


Constructor & Destructor Documentation

isam::OrderedSparseMatrix::OrderedSparseMatrix ( int  num_rows,
int  num_cols 
)

Constructor.

Parameters:
num_rowsInitial number of rows.
num_colsInitial number of columns.

Definition at line 78 of file OrderedSparseMatrix.cpp.

Copy constructor.

Parameters:
matMatrix to copy.

Definition at line 82 of file OrderedSparseMatrix.cpp.

isam::OrderedSparseMatrix::OrderedSparseMatrix ( const OrderedSparseMatrix mat,
int  num_rows,
int  num_cols,
int  first_row = 0,
int  first_col = 0 
)

Submatrix copy constructor.

Parameters:
matMatrix to copy.
num_rowsNumber of rows to copy.
num_colsNumber of columns to copy.
first_rowRow offset.
first_colColumn offset.

Definition at line 86 of file OrderedSparseMatrix.cpp.

Destructor.

Definition at line 99 of file OrderedSparseMatrix.cpp.


Member Function Documentation

const int * isam::OrderedSparseMatrix::a_to_r ( ) const [virtual]

Return variable ordering

Returns:
Array of integers that specifies for each column in A which column it now corresponds to in R.

Definition at line 158 of file OrderedSparseMatrix.cpp.

void isam::OrderedSparseMatrix::append_new_cols ( int  num) [virtual]

Expand matrix to include new columns.

Parameters:
numNumber of columns to add.

Reimplemented from isam::SparseMatrix.

Definition at line 134 of file OrderedSparseMatrix.cpp.

void isam::OrderedSparseMatrix::import_rows_ordered ( int  num_rows,
int  num_cols,
SparseVector_p rows,
int *  r_to_a 
)

Import externally allocated rows, and also set the ordering.

Parameters:
num_rowsNumber of rows of new matrix.
num_colsNumber of columns of new matrix.
rowsArray of SparseVector of length num_rows.
r_to_aVariable ordering.

Definition at line 127 of file OrderedSparseMatrix.cpp.

const OrderedSparseMatrix & isam::OrderedSparseMatrix::operator= ( const OrderedSparseMatrix mat)

Assignment operator.

Parameters:
matRight-hand-side matrix in assignment
Returns:
self.

Definition at line 103 of file OrderedSparseMatrix.cpp.

const int * isam::OrderedSparseMatrix::r_to_a ( ) const [virtual]

Return inverse variable ordering

Returns:
Array of integers that specifies for each column in R which column it originally came from in A.

Definition at line 162 of file OrderedSparseMatrix.cpp.

void isam::OrderedSparseMatrix::set_row ( int  row,
const SparseVector new_row 
) [virtual]

Replace the given row. Also reorders the new vector according to internal ordering.

Parameters:
rowNumber of row to replace.
new_rowNew row vector.

Reimplemented from isam::SparseMatrix.

Definition at line 115 of file OrderedSparseMatrix.cpp.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables