Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
Aigen::Matrix4< Number > Class Template Reference

Owning, zero-initialized 4-by-4 column-major value matrix. More...

#include <compat.hpp>

Public Types

using Scalar = Number

Public Member Functions

constexpr int rows () const noexcept
 Row count.
constexpr int cols () const noexcept
 Column count.
constexpr int size () const noexcept
 Scalar count.
Scalar & operator() (int row, int column)
 Checked mutable element.
Scalar operator() (int row, int column) const
 Checked element.
bool allFinite () const
 Validate all entries.
Scalar trace () const
 Sum the diagonal.
Matrix4 transpose () const
 Return an owning transpose.
Matrix4 operator* (const Matrix4 &right) const
 Multiply two owning values.

Static Public Member Functions

static Matrix4 Zero ()
 Allocate a zero value.
static Matrix4 Constant (Scalar value)
 Construct a constant value.
static Matrix4 Identity ()
 Construct the identity.

Static Private Member Functions

static std::size_t offset (int row, int column)
 Validate an element address.

Private Attributes

std::array< Scalar, 16 > values_ {}

Detailed Description

template<class Number>
class Aigen::Matrix4< Number >

Owning, zero-initialized 4-by-4 column-major value matrix.

Storage is sixteen scalars on the stack; products return owning values and support aliasing assignments without expression-lifetime issues. This subset provides initialization, access, transpose, trace and products, not decompositions or a general Eigen expression API.

Template Parameters
NumberFloating-point scalar type.

Definition at line 167 of file compat.hpp.

Member Typedef Documentation

◆ Scalar

template<class Number>
using Aigen::Matrix4< Number >::Scalar = Number

Eigen-compatible scalar type.

Definition at line 171 of file compat.hpp.

Member Function Documentation

◆ allFinite()

template<class Number>
bool Aigen::Matrix4< Number >::allFinite ( ) const
inline

Validate all entries.

Returns
Whether finite.

Definition at line 197 of file compat.hpp.

◆ cols()

template<class Number>
int Aigen::Matrix4< Number >::cols ( ) const
inlineconstexprnoexcept

Column count.

Returns
Four.

Definition at line 175 of file compat.hpp.

◆ Constant()

template<class Number>
Matrix4 Aigen::Matrix4< Number >::Constant ( Scalar value)
inlinestatic

Construct a constant value.

Parameters
valueScalar.
Returns
Constant matrix.

Definition at line 185 of file compat.hpp.

◆ Identity()

template<class Number>
Matrix4 Aigen::Matrix4< Number >::Identity ( )
inlinestatic

Construct the identity.

Returns
Identity matrix.

Definition at line 191 of file compat.hpp.

◆ offset()

template<class Number>
std::size_t Aigen::Matrix4< Number >::offset ( int row,
int column )
inlinestaticprivate

Validate an element address.

Parameters
rowRow.
columnColumn.
Returns
Flat offset.

Definition at line 229 of file compat.hpp.

◆ operator()() [1/2]

template<class Number>
Scalar & Aigen::Matrix4< Number >::operator() ( int row,
int column )
inline

Checked mutable element.

Parameters
rowRow.
columnColumn.
Returns
Scalar reference.

Definition at line 179 of file compat.hpp.

◆ operator()() [2/2]

template<class Number>
Scalar Aigen::Matrix4< Number >::operator() ( int row,
int column ) const
inline

Checked element.

Parameters
rowRow.
columnColumn.
Returns
Scalar.

Definition at line 181 of file compat.hpp.

◆ operator*()

template<class Number>
Matrix4 Aigen::Matrix4< Number >::operator* ( const Matrix4< Number > & right) const
inline

Multiply two owning values.

Parameters
rightRight operand.
Returns
Product.

Definition at line 215 of file compat.hpp.

◆ rows()

template<class Number>
int Aigen::Matrix4< Number >::rows ( ) const
inlineconstexprnoexcept

Row count.

Returns
Four.

Definition at line 173 of file compat.hpp.

◆ size()

template<class Number>
int Aigen::Matrix4< Number >::size ( ) const
inlineconstexprnoexcept

Scalar count.

Returns
Sixteen.

Definition at line 177 of file compat.hpp.

◆ trace()

template<class Number>
Scalar Aigen::Matrix4< Number >::trace ( ) const
inline

Sum the diagonal.

Returns
Trace.

Definition at line 201 of file compat.hpp.

◆ transpose()

template<class Number>
Matrix4 Aigen::Matrix4< Number >::transpose ( ) const
inline

Return an owning transpose.

Returns
Transposed matrix.

Definition at line 207 of file compat.hpp.

◆ Zero()

template<class Number>
Matrix4 Aigen::Matrix4< Number >::Zero ( )
inlinestatic

Allocate a zero value.

Returns
Zero matrix.

Definition at line 183 of file compat.hpp.

Field Documentation

◆ values_

template<class Number>
std::array<Scalar, 16> Aigen::Matrix4< Number >::values_ {}
private

Zero-initialized, fixed-size column-major storage.

Definition at line 227 of file compat.hpp.


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