cyqlone develop
Fast, parallel and vectorized solver for linear systems with optimal control structure.
Loading...
Searching...
No Matches
cyqlone::SparseMatrixBuilder Struct Reference

#include <cyqlone/sparse.hpp>

Detailed Description

A builder for constructing a SparseMatrix incrementally.

Definition at line 37 of file sparse.hpp.

Public Member Functions

void add (index_t row, index_t col, real_t value)
template<std::convertible_to< real_t > T, class I, class S, guanaqo::StorageOrder O>
void add (index_t row, index_t col, guanaqo::MatrixView< T, I, S, O > dense, std::remove_cvref_t< T > scale=1, batmat::linalg::MatrixStructure structure=batmat::linalg::MatrixStructure::General)
void add_diag (index_t row, index_t col, real_t value, index_t n)
SparseMatrix build () const &
SparseMatrix build () &&

Public Attributes

index_t rows = -1
index_t cols = -1
Symmetry symmetry = Symmetry::Unsymmetric
std::vector< index_t > row_indices {}
std::vector< index_t > col_indices {}
std::vector< real_t > values {}

Member Function Documentation

◆ add() [1/2]

void cyqlone::SparseMatrixBuilder::add ( index_t row,
index_t col,
real_t value )
inline

Definition at line 43 of file sparse.hpp.

◆ add() [2/2]

template<std::convertible_to< real_t > T, class I, class S, guanaqo::StorageOrder O>
void cyqlone::SparseMatrixBuilder::add ( index_t row,
index_t col,
guanaqo::MatrixView< T, I, S, O > dense,
std::remove_cvref_t< T > scale = 1,
batmat::linalg::MatrixStructure structure = batmat::linalg::MatrixStructure::General )
inline

Definition at line 56 of file sparse.hpp.

◆ add_diag()

void cyqlone::SparseMatrixBuilder::add_diag ( index_t row,
index_t col,
real_t value,
index_t n )
inline

Definition at line 84 of file sparse.hpp.

◆ build() [1/2]

SparseMatrix cyqlone::SparseMatrixBuilder::build ( ) const &
inlinenodiscard

Definition at line 93 of file sparse.hpp.

◆ build() [2/2]

SparseMatrix cyqlone::SparseMatrixBuilder::build ( ) &&
inlinenodiscard

Definition at line 104 of file sparse.hpp.

Member Data Documentation

◆ rows

index_t cyqlone::SparseMatrixBuilder::rows = -1

Definition at line 38 of file sparse.hpp.

◆ cols

index_t cyqlone::SparseMatrixBuilder::cols = -1

Definition at line 38 of file sparse.hpp.

◆ symmetry

Symmetry cyqlone::SparseMatrixBuilder::symmetry = Symmetry::Unsymmetric

Definition at line 39 of file sparse.hpp.

◆ row_indices

std::vector<index_t> cyqlone::SparseMatrixBuilder::row_indices {}

Definition at line 40 of file sparse.hpp.

◆ col_indices

std::vector<index_t> cyqlone::SparseMatrixBuilder::col_indices {}

Definition at line 40 of file sparse.hpp.

◆ values

std::vector<real_t> cyqlone::SparseMatrixBuilder::values {}

Definition at line 41 of file sparse.hpp.


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