Ravelin
Public Member Functions | Protected Attributes | List of all members
Ravelin::SPARSEVECTORN Class Reference

A sparse vector represented in 'CSR' format. More...

#include <SparseVectorNd.h>

Public Member Functions

 SPARSEVECTORN (unsigned n, const std::map< unsigned, REAL > &values)
 
 SPARSEVECTORN (unsigned n, unsigned nnz, boost::shared_array< unsigned > indices, boost::shared_array< REAL > data)
 
 SPARSEVECTORN (const VECTORN &v)
 
REAL dot (const VECTORN &x) const
 
REAL square () const
 
unsigned size () const
 
unsigned num_elements () const
 
unsigned * get_indices ()
 
REAL * get_data ()
 
const unsigned * get_indices () const
 
const REAL * get_data () const
 
VECTORNto_dense (VECTORN &result) const
 
SPARSEVECTORNnegate ()
 
SPARSEVECTORNoperator*= (REAL scalar)
 
SPARSEVECTORNmult (REAL scalar, SPARSEVECTORN &result) const
 
 SPARSEVECTORN (unsigned n, const std::map< unsigned, REAL > &values)
 
 SPARSEVECTORN (unsigned n, unsigned nnz, boost::shared_array< unsigned > indices, boost::shared_array< REAL > data)
 
 SPARSEVECTORN (const VECTORN &v)
 
REAL dot (const VECTORN &x) const
 
REAL square () const
 
unsigned size () const
 
unsigned num_elements () const
 
unsigned * get_indices ()
 
REAL * get_data ()
 
const unsigned * get_indices () const
 
const REAL * get_data () const
 
VECTORNto_dense (VECTORN &result) const
 
SPARSEVECTORNnegate ()
 
SPARSEVECTORNoperator*= (REAL scalar)
 
SPARSEVECTORNmult (REAL scalar, SPARSEVECTORN &result) const
 

Protected Attributes

boost::shared_array< unsigned > _indices
 
boost::shared_array< REAL > _data
 
unsigned _size
 
unsigned _nelm
 

Detailed Description

A sparse vector represented in 'CSR' format.


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