MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::sparse::util::csc_matrix< Value, SizeType > Struct Template Reference

Lightweight CSC (Compressed Sparse Column) representation. More...

#include <csc.hpp>

Public Member Functions

SizeType nnz () const
Value operator() (SizeType r, SizeType c) const
 Read-only access: binary search within column c for row r.

Public Attributes

SizeType nrows
SizeType ncols
std::vector< SizeType > col_ptr
std::vector< SizeType > row_ind
std::vector< Value > values

Detailed Description

template<typename Value, typename SizeType = std::size_t>
struct mtl::sparse::util::csc_matrix< Value, SizeType >

Lightweight CSC (Compressed Sparse Column) representation.

Owns its data. Column-oriented storage for sparse direct solvers.

Member Function Documentation

◆ nnz()

template<typename Value, typename SizeType = std::size_t>
SizeType mtl::sparse::util::csc_matrix< Value, SizeType >::nnz ( ) const
inline

◆ operator()()

template<typename Value, typename SizeType = std::size_t>
Value mtl::sparse::util::csc_matrix< Value, SizeType >::operator() ( SizeType r,
SizeType c ) const
inline

Read-only access: binary search within column c for row r.

Returns zero if element is absent.

Member Data Documentation

◆ col_ptr

template<typename Value, typename SizeType = std::size_t>
std::vector<SizeType> mtl::sparse::util::csc_matrix< Value, SizeType >::col_ptr

◆ ncols

template<typename Value, typename SizeType = std::size_t>
SizeType mtl::sparse::util::csc_matrix< Value, SizeType >::ncols

◆ nrows

template<typename Value, typename SizeType = std::size_t>
SizeType mtl::sparse::util::csc_matrix< Value, SizeType >::nrows

◆ row_ind

template<typename Value, typename SizeType = std::size_t>
std::vector<SizeType> mtl::sparse::util::csc_matrix< Value, SizeType >::row_ind

◆ values

template<typename Value, typename SizeType = std::size_t>
std::vector<Value> mtl::sparse::util::csc_matrix< Value, SizeType >::values

The documentation for this struct was generated from the following file:
  • /home/runner/work/mtl5/mtl5/include/mtl/sparse/util/csc.hpp