|
guanaqo
1.0.0-alpha.26
Utilities for scientific software
|
Dense matrix views and Eigen interop adapters.
Files | |
| file | span.hpp |
| Conversions between Eigen vector views and std::span. | |
| file | view.hpp |
| Conversions between Eigen expressions, maps and refs, and guanaqo::MatrixView. | |
| file | config.hpp |
| Common linear algebra index types. | |
| file | matrix-view.hpp |
| Non-owning view over values plus sparsity description. | |
| file | mat-view.hpp |
| Non-owning matrix view. | |
| file | matrix-view.hpp |
| Conversion between guanaqo::MatrixView and NumPy arrays for nanobind bindings. | |
Classes | |
| struct | guanaqo::linalg::MatrixView< T > |
| Non-owning view of dense and various formats of sparse matrix. More... | |
| struct | guanaqo::default_stride< S > |
| Get the default stride value for a given integer type (primary template). More... | |
| struct | guanaqo::default_stride< S > |
| Get the default stride value for a run-time integer type. More... | |
| struct | guanaqo::MatrixView< T, I, S, O > |
| A lightweight view of a 2D matrix. More... | |
| struct | nanobind::detail::type_caster< guanaqo::MatrixView< T, I, S, O > > |
| Nanobind type caster for guanaqo::MatrixView. More... | |
Typedefs | |
| using | guanaqo::linalg::index_t = std::ptrdiff_t |
| using | guanaqo::linalg::length_t = std::ptrdiff_t |
| template<class T, class I = ptrdiff_t, class S = std::integral_constant<I, 1>> | |
| using | guanaqo::MatrixViewRM = MatrixView<T, I, S, StorageOrder::RowMajor> |
| Convenience alias for a row-major MatrixView. | |
Enumerations | |
| enum class | guanaqo::StorageOrder : bool { guanaqo::StorageOrder::ColMajor , guanaqo::StorageOrder::RowMajor } |
| Storage order of matrices. More... | |
| enum class | guanaqo::Triangular { guanaqo::Triangular::Lower , guanaqo::Triangular::StrictlyLower , guanaqo::Triangular::Upper , guanaqo::Triangular::StrictlyUpper } |
| Triangular matrix structure. More... | |
Functions | |
| template<class Derived> | |
| auto | guanaqo::as_span (Eigen::DenseBase< Derived > &v) |
| Convert an Eigen vector view to a std::span. | |
| template<class Derived> | |
| auto | guanaqo::as_span (Eigen::DenseBase< Derived > &&v) |
| Convert an Eigen vector view to a std::span. | |
| template<class Derived> | |
| auto | guanaqo::as_span (const Eigen::DenseBase< Derived > &v) |
| Convert an Eigen vector view to a std::span. | |
| template<class T, size_t E> | |
| auto | guanaqo::as_eigen (std::span< T, E > s) |
| Convert a std::span to an Eigen::Vector view. | |
| template<class T, size_t E> | |
| auto | guanaqo::as_vec (std::span< T, E > s) |
| template<class Derived, class I = typename Derived::Index> | |
| auto | guanaqo::as_view (Eigen::DenseBase< Derived > &M, with_index_type_t< I >={}) |
| Convert an Eigen matrix view to a guanaqo::MatrixView. | |
| template<class Derived, class I = typename Derived::Index> | |
| auto | guanaqo::as_view (const Eigen::DenseBase< Derived > &M, with_index_type_t< I >={}) |
| Convert an Eigen matrix view to a guanaqo::MatrixView. | |
| template<class Derived, class I = typename Derived::Index> | |
| auto | guanaqo::as_view (Eigen::DenseBase< Derived > &&M, with_index_type_t< I >={}) |
| Convert an Eigen matrix view to a guanaqo::MatrixView. | |
| template<class Derived, class I = typename Derived::Index> | |
| auto | guanaqo::as_view (const Eigen::DenseBase< Derived > &&M, with_index_type_t< I >={}) |
| Convert an Eigen matrix view to a guanaqo::MatrixView. | |
| template<class T, class I, class S, StorageOrder O> | |
| auto | guanaqo::as_eigen (MatrixView< T, I, S, O > M) |
| Convert a guanaqo::MatrixView to an Eigen::Matrix view. | |
| constexpr StorageOrder | guanaqo::transpose (StorageOrder o) |
| Transpose the storage order (swaps row and column major). | |
| struct guanaqo::default_stride |
| using guanaqo::linalg::index_t = std::ptrdiff_t |
#include <guanaqo/linalg/config.hpp>
Definition at line 12 of file config.hpp.
| using guanaqo::linalg::length_t = std::ptrdiff_t |
#include <guanaqo/linalg/config.hpp>
Definition at line 14 of file config.hpp.
| using guanaqo::MatrixViewRM = MatrixView<T, I, S, StorageOrder::RowMajor> |
#include <guanaqo/mat-view.hpp>
Convenience alias for a row-major MatrixView.
Definition at line 429 of file mat-view.hpp.
|
strong |
#include <guanaqo/mat-view.hpp>
Storage order of matrices.
| Enumerator | |
|---|---|
| ColMajor | Column-major storage order (Fortran-style, layout left, unit row stride). |
| RowMajor | Row-major storage order (C-style, layout right, unit column stride). |
Definition at line 20 of file mat-view.hpp.
|
strong |
#include <guanaqo/mat-view.hpp>
Triangular matrix structure.
Definition at line 35 of file mat-view.hpp.
| auto guanaqo::as_span | ( | Eigen::DenseBase< Derived > & | v | ) |
#include <guanaqo/eigen/span.hpp>
Convert an Eigen vector view to a std::span.
| auto guanaqo::as_span | ( | Eigen::DenseBase< Derived > && | v | ) |
#include <guanaqo/eigen/span.hpp>
Convert an Eigen vector view to a std::span.
| auto guanaqo::as_span | ( | const Eigen::DenseBase< Derived > & | v | ) |
#include <guanaqo/eigen/span.hpp>
Convert an Eigen vector view to a std::span.
| auto guanaqo::as_eigen | ( | std::span< T, E > | s | ) |
#include <guanaqo/eigen/span.hpp>
Convert a std::span to an Eigen::Vector view.
Definition at line 62 of file span.hpp.
| auto guanaqo::as_vec | ( | std::span< T, E > | s | ) |
#include <guanaqo/eigen/span.hpp>
Definition at line 74 of file span.hpp.
| auto guanaqo::as_view | ( | Eigen::DenseBase< Derived > & | M, |
| with_index_type_t< I > | = {} ) |
#include <guanaqo/eigen/view.hpp>
Convert an Eigen matrix view to a guanaqo::MatrixView.
| auto guanaqo::as_view | ( | const Eigen::DenseBase< Derived > & | M, |
| with_index_type_t< I > | = {} ) |
#include <guanaqo/eigen/view.hpp>
Convert an Eigen matrix view to a guanaqo::MatrixView.
|
delete |
#include <guanaqo/eigen/view.hpp>
Convert an Eigen matrix view to a guanaqo::MatrixView.
|
delete |
#include <guanaqo/eigen/view.hpp>
Convert an Eigen matrix view to a guanaqo::MatrixView.
| auto guanaqo::as_eigen | ( | MatrixView< T, I, S, O > | M | ) |
#include <guanaqo/eigen/view.hpp>
Convert a guanaqo::MatrixView to an Eigen::Matrix view.
|
constexpr |
#include <guanaqo/mat-view.hpp>
Transpose the storage order (swaps row and column major).
Definition at line 28 of file mat-view.hpp.