Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::geometry::LinearMap< F, Rows, Cols > Class Template Referenceexport

A dense compile-time-sized linear map F^Cols -> F^Rows. More...

Public Types

using scalar_type = F
using Domain = Vector<F, Cols>
using Codomain = Vector<F, Rows>

Public Member Functions

constexpr LinearMap (std::initializer_list< std::initializer_list< F > > rows)
constexpr F coefficient (std::size_t row, std::size_t col) const
constexpr void set_coefficient (std::size_t row, std::size_t col, F value)
constexpr Codomain operator() (const Domain &v) const

Static Public Attributes

static constexpr std::size_t row_count = Rows
static constexpr std::size_t column_count = Cols

Friends

constexpr bool operator== (const LinearMap &, const LinearMap &)=default
template<IsMatrixScalar G, std::size_t R, std::size_t C>
constexpr LinearMap< G, R, C > operator+ (const LinearMap< G, R, C > &, const LinearMap< G, R, C > &)
template<IsMatrixScalar G, std::size_t R, std::size_t C>
constexpr LinearMap< G, R, C > operator- (const LinearMap< G, R, C > &)
template<IsMatrixScalar G, std::size_t R, std::size_t C>
constexpr LinearMap< G, R, C > operator- (const LinearMap< G, R, C > &, const LinearMap< G, R, C > &)
template<IsMatrixScalar G, std::size_t R, std::size_t C>
constexpr LinearMap< G, R, C > operator* (const G &, const LinearMap< G, R, C > &)
template<IsMatrixScalar G, std::size_t R, std::size_t C>
constexpr LinearMap< G, R, C > operator* (const LinearMap< G, R, C > &, const G &)
template<IsMatrixScalar G, std::size_t R, std::size_t Inner, std::size_t C>
constexpr LinearMap< G, R, C > operator* (const LinearMap< G, R, Inner > &, const LinearMap< G, Inner, C > &)

Detailed Description

template<IsMatrixScalar F, std::size_t Rows, std::size_t Cols>
class dedekind::geometry::LinearMap< F, Rows, Cols >

A dense compile-time-sized linear map F^Cols -> F^Rows.

Algebraic Role: LinearMap<F, R, C> is the concrete carrier for a Semimodule over the scalar semiring F. When instantiated with field scalars (e.g., double), it represents a Vector Space over that field.

The matrix structure is defined by:

  • Dense row-major coefficient storage: std::array<std::array<F, Cols>, Rows>
  • Vector application via matrix-vector multiplication
  • Matrix composition via matrix-matrix multiplication (for square matrices)
  • Additive structure: element-wise addition and scalar multiplication
Template Parameters
FThe scalar field/ring/semiring type.
RowsThe number of output dimensions.
ColsThe number of input dimensions.

Supports scalars meeting IsMatrixScalar. The surrounding documentation treats these carriers as field-like under the active numeric policy, rather than as a categorical field proof.


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