g2o
Loading...
Searching...
No Matches
g2o::MatrixStructure Class Reference

representing the structure of a matrix in column compressed structure (only the upper triangular part of the matrix) More...

#include <matrix_structure.h>

Public Member Functions

 MatrixStructure ()
 ~MatrixStructure ()
void alloc (int n_, int nz)
void free ()
bool write (std::string_view filename) const
int nzMax () const
 max number of non-zeros blocks

Public Attributes

int n
 A is m-by-n. n must be >= 0.
int m
 A is m-by-n. m must be >= 0.
int * Ap
 column pointers for A, of size n+1
int * Aii
 row indices of A, of size nz = Ap [n]

Protected Attributes

int maxN
 size of the allocated memory
int maxNz
 size of the allocated memory

Detailed Description

representing the structure of a matrix in column compressed structure (only the upper triangular part of the matrix)

Definition at line 40 of file matrix_structure.h.

Constructor & Destructor Documentation

◆ MatrixStructure()

g2o::MatrixStructure::MatrixStructure ( )

Definition at line 45 of file matrix_structure.cpp.

References Aii, Ap, m, maxN, maxNz, and n.

◆ ~MatrixStructure()

g2o::MatrixStructure::~MatrixStructure ( )

Definition at line 48 of file matrix_structure.cpp.

References free().

Member Function Documentation

◆ alloc()

void g2o::MatrixStructure::alloc ( int n_,
int nz )

allocate space for the Matrix Structure. You may call this on an already allocated struct, it will then reallocate the memory + additional space (double the required space).

Definition at line 50 of file matrix_structure.cpp.

References Aii, Ap, maxN, maxNz, and n.

Referenced by g2o::SparseBlockMatrix< MatrixType >::fillBlockStructure().

◆ free()

void g2o::MatrixStructure::free ( )

Definition at line 71 of file matrix_structure.cpp.

References Aii, Ap, m, maxN, maxNz, and n.

Referenced by ~MatrixStructure().

◆ nzMax()

int g2o::MatrixStructure::nzMax ( ) const
inline

max number of non-zeros blocks

Definition at line 65 of file matrix_structure.h.

References maxNz.

◆ write()

bool g2o::MatrixStructure::write ( std::string_view filename) const

Write the matrix pattern to a file. File is also loadable by octave, e.g., then use spy(matrix)

Definition at line 82 of file matrix_structure.cpp.

References Aii, Ap, m, and n.

Member Data Documentation

◆ Aii

int* g2o::MatrixStructure::Aii

row indices of A, of size nz = Ap [n]

Definition at line 62 of file matrix_structure.h.

Referenced by alloc(), g2o::SparseBlockMatrix< MatrixType >::fillBlockStructure(), free(), MatrixStructure(), and write().

◆ Ap

int* g2o::MatrixStructure::Ap

column pointers for A, of size n+1

Definition at line 61 of file matrix_structure.h.

Referenced by alloc(), g2o::SparseBlockMatrix< MatrixType >::fillBlockStructure(), free(), MatrixStructure(), and write().

◆ m

int g2o::MatrixStructure::m

A is m-by-n. m must be >= 0.

Definition at line 60 of file matrix_structure.h.

Referenced by g2o::SparseBlockMatrix< MatrixType >::fillBlockStructure(), free(), MatrixStructure(), and write().

◆ maxN

int g2o::MatrixStructure::maxN
protected

size of the allocated memory

Definition at line 68 of file matrix_structure.h.

Referenced by alloc(), free(), and MatrixStructure().

◆ maxNz

int g2o::MatrixStructure::maxNz
protected

size of the allocated memory

Definition at line 69 of file matrix_structure.h.

Referenced by alloc(), free(), MatrixStructure(), and nzMax().

◆ n

int g2o::MatrixStructure::n

A is m-by-n. n must be >= 0.

Definition at line 59 of file matrix_structure.h.

Referenced by alloc(), free(), MatrixStructure(), and write().


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