MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
sfm::ba::SparseMatrix< T > Class Template Reference

Sparse matrix class in Yale format for column-major matrices. More...

#include <ba_sparse_matrix.h>

Classes

struct  Triplet
 Triplet with row/col index, and the actual value. More...
 

Public Types

typedef std::vector< TripletTriplets
 List of triplets.
 

Public Member Functions

 SparseMatrix (std::size_t rows, std::size_t cols)
 
 SparseMatrix (void)
 
void allocate (std::size_t rows, std::size_t cols)
 
T * begin (void)
 
void column_nonzeros (std::size_t col, DenseVector< T > *vector) const
 
void cwise_invert (void)
 
void debug (void) const
 
SparseMatrix diagonal_matrix (void) const
 
T * end (void)
 
void mult_diagonal (T const &factor)
 
DenseVector< T > multiply (DenseVector< T > const &rhs) const
 
SparseMatrix multiply (SparseMatrix const &rhs) const
 
std::size_t num_cols (void) const
 
std::size_t num_non_zero (void) const
 
std::size_t num_rows (void) const
 
SparseMatrix parallel_multiply (SparseMatrix const &rhs) const
 
void reserve (std::size_t num_elements)
 
SparseMatrix sequential_multiply (SparseMatrix const &rhs) const
 
void set_from_triplets (Triplets const &triplets)
 
SparseMatrix subtract (SparseMatrix const &rhs) const
 
SparseMatrix transpose (void) const
 

Detailed Description

template<typename T>
class sfm::ba::SparseMatrix< T >

Sparse matrix class in Yale format for column-major matrices.

Definition at line 28 of file ba_sparse_matrix.h.

Member Typedef Documentation

◆ Triplets

template<typename T >
typedef std::vector<Triplet> sfm::ba::SparseMatrix< T >::Triplets

List of triplets.

Definition at line 43 of file ba_sparse_matrix.h.

Constructor & Destructor Documentation

◆ SparseMatrix() [1/2]

template<typename T >
sfm::ba::SparseMatrix< T >::SparseMatrix ( void  )

Definition at line 99 of file ba_sparse_matrix.h.

◆ SparseMatrix() [2/2]

template<typename T >
sfm::ba::SparseMatrix< T >::SparseMatrix ( std::size_t  rows,
std::size_t  cols 
)

Definition at line 106 of file ba_sparse_matrix.h.

Member Function Documentation

◆ allocate()

template<typename T >
void sfm::ba::SparseMatrix< T >::allocate ( std::size_t  rows,
std::size_t  cols 
)

Definition at line 113 of file ba_sparse_matrix.h.

◆ begin()

template<typename T >
T * sfm::ba::SparseMatrix< T >::begin ( void  )
inline

Definition at line 492 of file ba_sparse_matrix.h.

◆ column_nonzeros()

template<typename T >
void sfm::ba::SparseMatrix< T >::column_nonzeros ( std::size_t  col,
DenseVector< T > *  vector 
) const

Definition at line 460 of file ba_sparse_matrix.h.

◆ cwise_invert()

template<typename T >
void sfm::ba::SparseMatrix< T >::cwise_invert ( void  )

Definition at line 452 of file ba_sparse_matrix.h.

◆ debug()

template<typename T >
void sfm::ba::SparseMatrix< T >::debug ( void  ) const

Definition at line 506 of file ba_sparse_matrix.h.

◆ diagonal_matrix()

template<typename T >
SparseMatrix< T > sfm::ba::SparseMatrix< T >::diagonal_matrix ( void  ) const

Definition at line 415 of file ba_sparse_matrix.h.

◆ end()

template<typename T >
T * sfm::ba::SparseMatrix< T >::end ( void  )
inline

Definition at line 499 of file ba_sparse_matrix.h.

◆ mult_diagonal()

template<typename T >
void sfm::ba::SparseMatrix< T >::mult_diagonal ( T const &  factor)

Definition at line 438 of file ba_sparse_matrix.h.

◆ multiply() [1/2]

template<typename T >
DenseVector< T > sfm::ba::SparseMatrix< T >::multiply ( DenseVector< T > const &  rhs) const

Definition at line 401 of file ba_sparse_matrix.h.

◆ multiply() [2/2]

template<typename T >
SparseMatrix< T > sfm::ba::SparseMatrix< T >::multiply ( SparseMatrix< T > const &  rhs) const

Definition at line 261 of file ba_sparse_matrix.h.

◆ num_cols()

template<typename T >
std::size_t sfm::ba::SparseMatrix< T >::num_cols ( void  ) const
inline

Definition at line 485 of file ba_sparse_matrix.h.

◆ num_non_zero()

template<typename T >
std::size_t sfm::ba::SparseMatrix< T >::num_non_zero ( void  ) const
inline

Definition at line 471 of file ba_sparse_matrix.h.

◆ num_rows()

template<typename T >
std::size_t sfm::ba::SparseMatrix< T >::num_rows ( void  ) const
inline

Definition at line 478 of file ba_sparse_matrix.h.

◆ parallel_multiply()

template<typename T >
SparseMatrix< T > sfm::ba::SparseMatrix< T >::parallel_multiply ( SparseMatrix< T > const &  rhs) const

Definition at line 319 of file ba_sparse_matrix.h.

◆ reserve()

template<typename T >
void sfm::ba::SparseMatrix< T >::reserve ( std::size_t  num_elements)

Definition at line 125 of file ba_sparse_matrix.h.

◆ sequential_multiply()

template<typename T >
SparseMatrix< T > sfm::ba::SparseMatrix< T >::sequential_multiply ( SparseMatrix< T > const &  rhs) const

Definition at line 272 of file ba_sparse_matrix.h.

◆ set_from_triplets()

template<typename T >
void sfm::ba::SparseMatrix< T >::set_from_triplets ( Triplets const &  triplets)

Definition at line 133 of file ba_sparse_matrix.h.

◆ subtract()

template<typename T >
SparseMatrix< T > sfm::ba::SparseMatrix< T >::subtract ( SparseMatrix< T > const &  rhs) const

Definition at line 205 of file ba_sparse_matrix.h.

◆ transpose()

template<typename T >
SparseMatrix< T > sfm::ba::SparseMatrix< T >::transpose ( void  ) const

Definition at line 170 of file ba_sparse_matrix.h.


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