Lugdunum  0.1.0
Public Types | Public Member Functions | List of all members
lug::Math::Vector< Rows, T > Class Template Reference

#include <Vector.hpp>

Inheritance diagram for lug::Math::Vector< Rows, T >:
[legend]
Collaboration diagram for lug::Math::Vector< Rows, T >:
[legend]

Public Types

using BaseMatrix = Matrix< Rows, 1, T >
 
- Public Types inherited from lug::Math::Matrix< Rows, 1, T >
using Values = ValArray< Rows *Columns, T >
 

Public Member Functions

constexpr Vector ()=default
 
constexpr Vector (T value)
 
 Vector (std::initializer_list< T > list)
 
 Vector (const BaseMatrix &matrix)
 
 Vector (BaseMatrix &&matrix)
 
 Vector (const Vector< Rows - 1, T > &vector, T value=0)
 
 Vector (const Vector< Rows+1, T > &vector)
 
 Vector (const Vector< Rows, T > &vector)=default
 
 Vector (Vector< Rows, T > &&vector)=default
 
Vector< Rows, T > & operator= (const Vector< Rows, T > &vector)=default
 
Vector< Rows, T > & operator= (Vector< Rows, T > &&vector)=default
 
 ~Vector ()=default
 
Vector< Rows, T > operator*= (const Matrix< Rows, Rows, T > &rhs)
 
Vector< Rows, T > operator*= (const Vector< Rows, T > &rhs)
 
Vector< Rows, T > operator/= (const Vector< Rows, T > &rhs)
 
constexpr T length () const
 
constexpr T squaredLength () const
 
void normalize ()
 
- Public Member Functions inherited from lug::Math::Matrix< Rows, 1, T >
constexpr Matrix ()=default
 
 Matrix (T value)
 
 Matrix (const Values &values)
 
 Matrix (std::initializer_list< T > list)
 
 Matrix (const Matrix< Rows, Columns, T > &matrix)=default
 
 Matrix (Matrix< Rows, Columns, T > &&matrix)=default
 
Matrix< Rows, Columns, T > & operator= (const Matrix< Rows, Columns, T > &rhs)=default
 
Matrix< Rows, Columns, T > & operator= (Matrix< Rows, Columns, T > &&rhs)=default
 
 ~Matrix ()=default
 
constexpr uint8_t getRows () const
 
constexpr uint8_t getColumns () const
 
ValuesgetValues ()
 
constexpr const ValuesgetValues () const
 
T & operator() (uint8_t row, uint8_t col=0)
 
constexpr const T & operator() (uint8_t row, uint8_t col=0) const
 
Matrix< Rows, Columns, T > & operator+= (T rhs)
 
Matrix< Rows, Columns, T > & operator+= (const Matrix< Rows, Columns, T > &rhs)
 
Matrix< Rows, Columns, T > & operator-= (T rhs)
 
Matrix< Rows, Columns, T > & operator-= (const Matrix< Rows, Columns, T > &rhs)
 
Matrix< Rows, Columns, T > & operator*= (T rhs)
 
std::enable_if<(Rows==Columns) &&EnableBool, Matrix< Rows, Columns, T > >::type & operator*= (const Matrix< Rows, Columns, T > &rhs)
 
std::enable_if<(Rows==Columns) &&EnableBool, Matrix< Rows, Columns, T > >::type & operator*= (const Matrix< Rows, Columns, T > &rhs)
 
Matrix< Rows, Columns, T > & operator/= (T rhs)
 
std::enable_if<(Rows==Columns) &&EnableBool, Matrix< Rows, Columns, T > >::type & operator/= (const Matrix< Rows, Columns, T > &rhs)
 
std::enable_if<(Rows==Columns) &&EnableBool, Matrix< Rows, Columns, T > >::type & operator/= (const Matrix< Rows, Columns, T > &rhs)
 
std::enable_if<(Rows==1) &&EnableBool, Matrix< Rows, Columns, T > >::type inverse () const
 
std::enable_if<(Rows==2) &&EnableBool, Matrix< Rows, Columns, T > >::type inverse () const
 
std::enable_if<(Rows==3) &&EnableBool, Matrix< Rows, Columns, T > >::type inverse () const
 
std::enable_if<(Rows==4) &&EnableBool, Matrix< Rows, Columns, T > >::type inverse () const
 
std::enable_if<(Rows==1) &&EnableBool, Matrix< Rows, Columns, T > >::type inverse () const
 
std::enable_if<(Rows==2) &&EnableBool, Matrix< Rows, Columns, T > >::type inverse () const
 
std::enable_if<(Rows==3) &&EnableBool, Matrix< Rows, Columns, T > >::type inverse () const
 
std::enable_if<(Rows==4) &&EnableBool, Matrix< Rows, Columns, T > >::type inverse () const
 
Matrix< Columns, Rows, T > transpose () const
 
std::enable_if<(Rows==1) &&EnableBool, T >::type det () const
 
std::enable_if<(Rows==2) &&EnableBool, T >::type det () const
 
std::enable_if<(Rows==3) &&EnableBool, T >::type det () const
 
std::enable_if<(Rows==4) &&EnableBool, T >::type det () const
 
std::enable_if<(Rows > 4) &&EnableBool, T >::type det () const
 
std::enable_if<(Rows==1) &&EnableBool, T >::type det () const
 
std::enable_if<(Rows==2) &&EnableBool, T >::type det () const
 
std::enable_if<(Rows==3) &&EnableBool, T >::type det () const
 
std::enable_if<(Rows==4) &&EnableBool, T >::type det () const
 
std::enable_if<(Rows > 4) &&EnableBool, T >::type det () const
 
std::enable_if<(Rows==Columns) &&EnableBool, Matrix< Rows, Columns, T > >::type identity ()
 

Additional Inherited Members

- Static Public Member Functions inherited from lug::Math::Matrix< Rows, 1, T >
static std::enable_if<(Rows==Columns) &&EnableBool, Matrix< Rows, Columns, T > >::type identity ()
 
- Protected Attributes inherited from lug::Math::Matrix< Rows, 1, T >
Values _values
 

Detailed Description

template<uint8_t Rows, typename T = float>
class lug::Math::Vector< Rows, T >

Definition at line 12 of file Vector.hpp.

Member Typedef Documentation

◆ BaseMatrix

template<uint8_t Rows, typename T = float>
using lug::Math::Vector< Rows, T >::BaseMatrix = Matrix<Rows, 1, T>

Definition at line 14 of file Vector.hpp.

Constructor & Destructor Documentation

◆ Vector() [1/9]

template<uint8_t Rows, typename T = float>
constexpr lug::Math::Vector< Rows, T >::Vector ( )
default

◆ Vector() [2/9]

template<uint8_t Rows, typename T = float>
constexpr Vector::Vector ( value)
inlineexplicit

Definition at line 2 of file Vector.inl.

◆ Vector() [3/9]

template<uint8_t Rows, typename T = float>
Vector::Vector ( std::initializer_list< T >  list)
inline

Definition at line 5 of file Vector.inl.

◆ Vector() [4/9]

template<uint8_t Rows, typename T = float>
lug::Math::Vector< Rows, T >::Vector ( const BaseMatrix matrix)

◆ Vector() [5/9]

template<uint8_t Rows, typename T = float>
lug::Math::Vector< Rows, T >::Vector ( BaseMatrix &&  matrix)

◆ Vector() [6/9]

template<uint8_t Rows, typename T = float>
lug::Math::Vector< Rows, T >::Vector ( const Vector< Rows - 1, T > &  vector,
value = 0 
)

◆ Vector() [7/9]

template<uint8_t Rows, typename T = float>
Vector::Vector ( const Vector< Rows+1, T > &  vector)
inline

Definition at line 23 of file Vector.inl.

◆ Vector() [8/9]

template<uint8_t Rows, typename T = float>
lug::Math::Vector< Rows, T >::Vector ( const Vector< Rows, T > &  vector)
default

◆ Vector() [9/9]

template<uint8_t Rows, typename T = float>
lug::Math::Vector< Rows, T >::Vector ( Vector< Rows, T > &&  vector)
default

◆ ~Vector()

template<uint8_t Rows, typename T = float>
lug::Math::Vector< Rows, T >::~Vector ( )
default

Member Function Documentation

◆ operator=() [1/2]

template<uint8_t Rows, typename T = float>
Vector<Rows, T>& lug::Math::Vector< Rows, T >::operator= ( const Vector< Rows, T > &  vector)
default

◆ operator=() [2/2]

template<uint8_t Rows, typename T = float>
Vector<Rows, T>& lug::Math::Vector< Rows, T >::operator= ( Vector< Rows, T > &&  vector)
default

◆ operator*=() [1/2]

template<uint8_t Rows, typename T = float>
Vector< Rows, T > Vector::operator*= ( const Matrix< Rows, Rows, T > &  rhs)
inline

Definition at line 30 of file Vector.inl.

◆ operator*=() [2/2]

template<uint8_t Rows, typename T = float>
Vector< Rows, T > Vector::operator*= ( const Vector< Rows, T > &  rhs)
inline

Definition at line 45 of file Vector.inl.

◆ operator/=()

template<uint8_t Rows, typename T = float>
Vector< Rows, T > Vector::operator/= ( const Vector< Rows, T > &  rhs)
inline

Definition at line 51 of file Vector.inl.

◆ length()

template<uint8_t Rows, typename T = float>
constexpr T Vector::length ( ) const
inline

Definition at line 57 of file Vector.inl.

◆ squaredLength()

template<uint8_t Rows, typename T = float>
constexpr T Vector::squaredLength ( ) const
inline

Definition at line 62 of file Vector.inl.

◆ normalize()

template<uint8_t Rows, typename T = float>
void Vector::normalize ( )
inline

Definition at line 67 of file Vector.inl.


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