Public Member Functions | Private Member Functions | Private Attributes
isam::OrderedSparseMatrix Class Reference

#include <OrderedSparseMatrix.h>

Inheritance diagram for isam::OrderedSparseMatrix:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual const int * a_to_r () const
void append_new_cols (int num)
void import_rows_ordered (int num_rows, int num_cols, SparseVector_p *rows, int *r_to_a)
const OrderedSparseMatrixoperator= (const OrderedSparseMatrix &mat)
 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 const int * r_to_a () const
void set_row (int row, const SparseVector &new_row)
virtual ~OrderedSparseMatrix ()

Private Member Functions

void _allocate_OrderedSparseMatrix (bool init_order=true)
void _calc_reverse_order (int num, const int *order, int *reverse_order) const
void _copy_from_OrderedSparseMatrix (const OrderedSparseMatrix &mat)
void _dealloc_OrderedSparseMatrix ()
void _set_order (const int *r_to_a)

Private Attributes

int * _a_to_r
int * _r_to_a

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.

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

Definition at line 93 of file OrderedSparseMatrix.cpp.

Destructor.

Definition at line 99 of file OrderedSparseMatrix.cpp.


Member Function Documentation

void isam::OrderedSparseMatrix::_allocate_OrderedSparseMatrix ( bool  init_order = true) [private]

Allocate memory - private.

Parameters:
init_tableDetermines if index table is initialized with identity.

Definition at line 42 of file OrderedSparseMatrix.cpp.

void isam::OrderedSparseMatrix::_calc_reverse_order ( int  num,
const int *  order,
int *  reverse_order 
) const [private]

Calculate reverse ordering for O(1) access.

Parameters:
numNumber of entries in ordering
orderInput order.
reverse_orderOutput reverse order.

Definition at line 67 of file OrderedSparseMatrix.cpp.

Copy data from one sparse matrix to a new one - private.

Parameters:
vecExisting sparse vector to copy from.

Definition at line 54 of file OrderedSparseMatrix.cpp.

Deallocate memory - private.

Definition at line 60 of file OrderedSparseMatrix.cpp.

void isam::OrderedSparseMatrix::_set_order ( const int *  r_to_a) [private]

Sets the variable order, for example after batch reordering.

Parameters:
orderPointer to list of integer IDs as used by CSparse.

Definition at line 73 of file OrderedSparseMatrix.cpp.

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.


Member Data Documentation

Definition at line 41 of file OrderedSparseMatrix.h.

Definition at line 40 of file OrderedSparseMatrix.h.


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


demo_rgbd
Author(s): Ji Zhang
autogenerated on Tue Mar 3 2015 18:01:08