alpaqa 1.0.0a11
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Namespaces | Functions
sparse-ops.hpp File Reference
#include <alpaqa/config/config.hpp>
#include <alpaqa/util/demangled-typename.hpp>
#include <alpaqa/util/enumerate.hpp>
#include <alpaqa/util/iter-adapter.hpp>
#include <alpaqa/util/set-intersection.hpp>
#include <cassert>
#include <chrono>
#include <iostream>
#include <ranges>
#include <span>
#include <Eigen/Sparse>
+ Include dependency graph for sparse-ops.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  alpaqa
 
namespace  alpaqa::util
 
namespace  alpaqa::util::detail
 

Functions

template<class SpMat , class MaskVec >
auto select_rows_in_col (const SpMat &sp_mat, MaskVec &mask, auto column)
 Returns a range over the row indices in the given column of sp_mat that are also in mask.
 
template<class SpMat , class MaskVec >
auto select_rows_in_col_iota (const SpMat &sp_mat, MaskVec &mask, auto column)
 Like select_rows_in_col, but returns a range of tuples containing the Eigen InnerIterator and a linear index into the mask.
 
template<class SpMat , class Mat , class MaskVec >
void sparse_add_masked (const SpMat &R_full, Mat &&R, const MaskVec &mask)
 R += R_full(mask,mask)
 
template<class SpMat , class Mat , class MaskVec >
void sparse_add_masked_rows (const SpMat &S_full, Mat &&S, const MaskVec &mask)
 S += S_full(mask,:)
 
template<class SpMat , class CVec , class Vec , class MaskVec >
void sparse_matvec_add_masked_rows_cols (const SpMat &R, const CVec &v, Vec &&out, const MaskVec &mask_J, const MaskVec &mask_K)
 out += R(mask_J,mask_K) * v(mask_K);
 
template<class SpMat , class CVec , class Vec , class MaskVec >
void sparse_matvec_add_transpose_masked_rows (const SpMat &S, const CVec &v, Vec &&out, const MaskVec &mask)
 out += S(mask,:)ᵀ * v(mask);