Harlinn.Windows 0.1
Loading...
Searching...
No Matches
Harlinn::Math::SquareMatrix< T, N > Class Template Reference

#include <VectorMath.h>

Inheritance diagram for Harlinn::Math::SquareMatrix< T, N >:
[legend]
Collaboration diagram for Harlinn::Math::SquareMatrix< T, N >:
[legend]

Public Types

using Base = Internal::MatrixBase
 
using ValueType = T
 
using value_type = ValueType
 
using Simd = SquareMatrixSimd<SquareMatrix, N>
 
using Traits = typename Simd::Traits
 
using MatrixData = typename Simd::ArrayType
 
using ArrayType = typename MatrixData::value_type
 

Public Member Functions

constexpr SquareMatrix () noexcept
 
 SquareMatrix (const value_type(&mat)[Size][Size])
 
 SquareMatrix (const value_type(&mat)[Size *Size])
 
template<SimpleSpanLike T>
requires std::is_same_v<typename T::value_type, value_type>
 SquareMatrix (const T &mat)
 
 SquareMatrix (const Simd &simd) noexcept
 
 SquareMatrix (const MatrixData &data) noexcept
 
SquareMatrixoperator= (const Simd &simd) noexcept
 
SquareMatrixoperator= (const MatrixData &data) noexcept
 
template<typename... Args>
requires ( sizeof...( Args ) == ( ( N * N ) - 1 ) )
 SquareMatrix (value_type v, Args... args)
 
const ArrayTypeoperator[] (size_t index) const
 
ArrayTypeoperator[] (size_t index)
 
Simd ToSimd () const noexcept
 
 operator Simd () const noexcept
 
bool operator== (const SquareMatrix &other) const
 
bool operator!= (const SquareMatrix &other) const
 
bool operator< (const SquareMatrix &other) const
 
bool IsIdentity () const
 
std::string ToString () const
 

Static Public Member Functions

static constexpr SquareMatrix Zero () noexcept
 
template<typename... Args>
static SquareMatrix Diag (value_type v, Args... args)
 

Static Public Attributes

static constexpr size_t Size = N
 

Static Private Member Functions

static constexpr MatrixData MakeDefaultValue () noexcept
 
template<SimpleSpanLike T>
requires std::is_same_v<typename T::value_type, value_type>
static MatrixData MakeData (const T &mat) noexcept
 
static MatrixData MakeData (const value_type mat[Size][Size]) noexcept
 

Private Attributes

MatrixData data_ = DefaultValue
 

Static Private Attributes

static constexpr MatrixData ZeroValue {}
 
static constexpr MatrixData DefaultValue = MakeDefaultValue( )
 

Friends

std::ostream & operator<< (std::ostream &stream, const SquareMatrix &m)
 

Member Typedef Documentation

◆ ArrayType

template<ArithmeticType T, size_t N>
using Harlinn::Math::SquareMatrix< T, N >::ArrayType = typename MatrixData::value_type

◆ Base

template<ArithmeticType T, size_t N>
using Harlinn::Math::SquareMatrix< T, N >::Base = Internal::MatrixBase

◆ MatrixData

template<ArithmeticType T, size_t N>
using Harlinn::Math::SquareMatrix< T, N >::MatrixData = typename Simd::ArrayType

◆ Simd

template<ArithmeticType T, size_t N>
using Harlinn::Math::SquareMatrix< T, N >::Simd = SquareMatrixSimd<SquareMatrix, N>

◆ Traits

template<ArithmeticType T, size_t N>
using Harlinn::Math::SquareMatrix< T, N >::Traits = typename Simd::Traits

◆ value_type

template<ArithmeticType T, size_t N>
using Harlinn::Math::SquareMatrix< T, N >::value_type = ValueType

◆ ValueType

template<ArithmeticType T, size_t N>
using Harlinn::Math::SquareMatrix< T, N >::ValueType = T

Constructor & Destructor Documentation

◆ SquareMatrix() [1/7]

template<ArithmeticType T, size_t N>
Harlinn::Math::SquareMatrix< T, N >::SquareMatrix ( )
inlineconstexprnoexcept

◆ SquareMatrix() [2/7]

template<ArithmeticType T, size_t N>
Harlinn::Math::SquareMatrix< T, N >::SquareMatrix ( const value_type(&) mat[Size][Size])
inline

◆ SquareMatrix() [3/7]

template<ArithmeticType T, size_t N>
Harlinn::Math::SquareMatrix< T, N >::SquareMatrix ( const value_type(&) mat[Size *Size])
inline

◆ SquareMatrix() [4/7]

template<ArithmeticType T, size_t N>
template<SimpleSpanLike T>
requires std::is_same_v<typename T::value_type, value_type>
Harlinn::Math::SquareMatrix< T, N >::SquareMatrix ( const T & mat)
inline

◆ SquareMatrix() [5/7]

template<ArithmeticType T, size_t N>
Harlinn::Math::SquareMatrix< T, N >::SquareMatrix ( const Simd & simd)
inlinenoexcept

◆ SquareMatrix() [6/7]

template<ArithmeticType T, size_t N>
Harlinn::Math::SquareMatrix< T, N >::SquareMatrix ( const MatrixData & data)
inlinenoexcept

◆ SquareMatrix() [7/7]

template<ArithmeticType T, size_t N>
template<typename... Args>
requires ( sizeof...( Args ) == ( ( N * N ) - 1 ) )
Harlinn::Math::SquareMatrix< T, N >::SquareMatrix ( value_type v,
Args... args )
inline

Member Function Documentation

◆ Diag()

template<ArithmeticType T, size_t N>
template<typename... Args>
static SquareMatrix Harlinn::Math::SquareMatrix< T, N >::Diag ( value_type v,
Args... args )
inlinestatic

◆ IsIdentity()

template<ArithmeticType T, size_t N>
bool Harlinn::Math::SquareMatrix< T, N >::IsIdentity ( ) const
inline

◆ MakeData() [1/2]

template<ArithmeticType T, size_t N>
template<SimpleSpanLike T>
requires std::is_same_v<typename T::value_type, value_type>
static MatrixData Harlinn::Math::SquareMatrix< T, N >::MakeData ( const T & mat)
inlinestaticprivatenoexcept

◆ MakeData() [2/2]

template<ArithmeticType T, size_t N>
static MatrixData Harlinn::Math::SquareMatrix< T, N >::MakeData ( const value_type mat[Size][Size])
inlinestaticprivatenoexcept

◆ MakeDefaultValue()

template<ArithmeticType T, size_t N>
static constexpr MatrixData Harlinn::Math::SquareMatrix< T, N >::MakeDefaultValue ( )
inlinestaticconstexprprivatenoexcept

◆ operator Simd()

template<ArithmeticType T, size_t N>
Harlinn::Math::SquareMatrix< T, N >::operator Simd ( ) const
inlinenoexcept

◆ operator!=()

template<ArithmeticType T, size_t N>
bool Harlinn::Math::SquareMatrix< T, N >::operator!= ( const SquareMatrix< T, N > & other) const
inline

◆ operator<()

template<ArithmeticType T, size_t N>
bool Harlinn::Math::SquareMatrix< T, N >::operator< ( const SquareMatrix< T, N > & other) const
inline

◆ operator=() [1/2]

template<ArithmeticType T, size_t N>
SquareMatrix & Harlinn::Math::SquareMatrix< T, N >::operator= ( const MatrixData & data)
inlinenoexcept

◆ operator=() [2/2]

template<ArithmeticType T, size_t N>
SquareMatrix & Harlinn::Math::SquareMatrix< T, N >::operator= ( const Simd & simd)
inlinenoexcept

◆ operator==()

template<ArithmeticType T, size_t N>
bool Harlinn::Math::SquareMatrix< T, N >::operator== ( const SquareMatrix< T, N > & other) const
inline

◆ operator[]() [1/2]

template<ArithmeticType T, size_t N>
ArrayType & Harlinn::Math::SquareMatrix< T, N >::operator[] ( size_t index)
inline

◆ operator[]() [2/2]

template<ArithmeticType T, size_t N>
const ArrayType & Harlinn::Math::SquareMatrix< T, N >::operator[] ( size_t index) const
inline

◆ ToSimd()

template<ArithmeticType T, size_t N>
Simd Harlinn::Math::SquareMatrix< T, N >::ToSimd ( ) const
inlinenoexcept

◆ ToString()

template<ArithmeticType T, size_t N>
std::string Harlinn::Math::SquareMatrix< T, N >::ToString ( ) const
inline

◆ Zero()

template<ArithmeticType T, size_t N>
static constexpr SquareMatrix Harlinn::Math::SquareMatrix< T, N >::Zero ( )
inlinestaticconstexprnoexcept

Friends And Related Symbol Documentation

◆ operator<<

template<ArithmeticType T, size_t N>
std::ostream & operator<< ( std::ostream & stream,
const SquareMatrix< T, N > & m )
friend

Member Data Documentation

◆ data_

template<ArithmeticType T, size_t N>
MatrixData Harlinn::Math::SquareMatrix< T, N >::data_ = DefaultValue
private

◆ DefaultValue

template<ArithmeticType T, size_t N>
MatrixData Harlinn::Math::SquareMatrix< T, N >::DefaultValue = MakeDefaultValue( )
staticconstexprprivate

◆ Size

template<ArithmeticType T, size_t N>
size_t Harlinn::Math::SquareMatrix< T, N >::Size = N
staticconstexpr

◆ ZeroValue

template<ArithmeticType T, size_t N>
MatrixData Harlinn::Math::SquareMatrix< T, N >::ZeroValue {}
staticconstexprprivate

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