guanaqo main
Utilities for scientific software
Loading...
Searching...
No Matches
guanaqo::linalg::sparsity Namespace Reference

Namespaces

namespace  detail

Classes

struct  unsupported_conversion
 The requested conversion between sparsity structures could not be performed (most likely because certain compiler or standard library features were unavailable when the library was built). More...
struct  SparsityConverter
 Converts one matrix storage format to another. More...
struct  SparsityConversionRequest
 Additional options for the conversion performed by SparsityConverter. More...
struct  SparsityConversionRequest< Dense >
 Conversion to dense format does not require any additional options. More...
struct  SparsityConverter< Dense, Dense >
 Conversion from dense to dense is trivial. More...
struct  SparsityConverter< SparseCSC< Index, StorageIndex >, Dense >
 Conversion from CSC to dense format. More...
struct  SparsityConverter< SparseCOO< Index >, Dense >
 Conversion from COO to dense format. More...
struct  SparsityConversionRequest< SparseCOO< Index > >
 Conversion to COO format allows customization of the index offset (zero-based or one-based). More...
struct  SparsityConverter< Dense, SparseCOO< Index > >
 Conversion from dense to COO format. More...
struct  SparsityConverter< SparseCSC< IndexFrom, StorageIndexFrom >, SparseCOO< IndexTo > >
 Conversion from CSC to COO format. More...
struct  SparsityConverter< SparseCOO< IndexFrom >, SparseCOO< IndexTo > >
 Conversion from COO to COO format (with possibly different index types and offsets). More...
struct  SparsityConversionRequest< SparseCSC< Index, StorageIndex > >
 Conversion to CSC format allows sorting the indices in the output if desired. More...
struct  SparsityConverter< SparseCOO< IndexFrom >, SparseCSC< IndexTo, StorageIndexTo > >
 Conversion from COO to CSC format. More...
struct  SparsityConverter< SparseCSC< IndexFrom, StorageIndexFrom >, SparseCSC< IndexTo, StorageIndexTo > >
 Conversion from CSC to CSC format (with possibly different index types and sorting). More...
struct  SparsityConverter< Dense, SparseCSC< Index, StorageIndex > >
 Conversion from dense to CSC format. More...
struct  SparsityConverter< Sparsity, To >
 Converts any supported matrix storage format to the given format. More...
struct  Dense
 Dense matrix structure. More...
struct  SparseCSC
 Sparse compressed-column structure (CCS or CSC). More...
struct  SparseCOO
 Sparse coordinate list structure (COO). More...
struct  Sparsity
 Stores any of the supported sparsity patterns. More...

Typedefs

template<class To>
using ConverterVariant
using SparsityVariant
 Helper for Sparsity.

Enumerations

enum class  Symmetry : uint8_t { Symmetry::Unsymmetric = 0 , Symmetry::Upper = 1 , Symmetry::Lower = 2 }
 Describes the symmetry of matrices. More...

Functions

template<class I, class T>
auto as_eigen (const SparseCSC< I, I > sparsity, std::span< T > values)
 Convert a guanaqo::MatrixView to an Eigen::Matrix view.
template<class Derived>
auto as_sparsity (const Eigen::SparseMatrixBase< Derived > &M, Symmetry symmetry=Symmetry::Unsymmetric)
 Convert an Eigen::SparseMatrix to a guanaqo::SparseCSC view.
constexpr size_t cast_sz (auto i)
const char * enum_name (Symmetry s)
bool is_dense (const Sparsity &sp)
 Returns true if the sparsity pattern represents a dense matrix.
length_t get_nnz (const Sparsity &sp)
 Get the number of structurally nonzero elements.
Symmetry get_symmetry (const Sparsity &sp)
 Returns the symmetry of the sparsity pattern.
length_t num_rows (const Sparsity &sp)
 Returns the number of rows of the sparsity pattern.
length_t num_cols (const Sparsity &sp)
 Returns the number of rows of the sparsity pattern.

Function Documentation

◆ cast_sz()

size_t guanaqo::linalg::sparsity::cast_sz ( auto i)
constexpr

Definition at line 23 of file sparsity-conversions.hpp.

Here is the caller graph for this function: