template<typename T1, typename T2 = T1>
numeric::matrix2 class

matrix2

Base classes

template<typename T1, typename T2 = T1>
class vector2<T1, T1>
vector2

Constructors, destructors, conversion operators

matrix2(T1&& x, T2&& y) constexpr noexcept
Construct a new matrix2 object.
matrix2(const T1& x, const T2& y) constexpr
Construct a new matrix2 object.

Arithmetic operators

definie +, -, *, /, +=, -=, *=, /=, etc.

auto operator-() const -> matrix2 -> auto constexpr
Negate.
template<typename U1, typename U2>
auto operator+=(const matrix2<U1, U2>& other) -> matrix2 & -> auto constexpr
Add.
template<typename U1, typename U2>
auto operator-=(const matrix2<U1, U2>& other) -> matrix2 & -> auto constexpr
Substract.
template<typename R>
auto operator*=(const R& alpha) -> matrix2 & -> auto constexpr
Multiply.
template<typename R>
auto operator/=(const R& alpha) -> matrix2 & -> auto constexpr
Divide.
template<typename U1, typename U2>
auto mdot(const vector2<U1, U2>& other) const -> auto constexpr
auto det() const -> auto constexpr
template<typename U1, typename U2>
auto solve(const vector2<U1, U2>& v) -> auto constexpr
template<typename U1, typename U2>
auto operator+(matrix2 x, const matrix2<U1, U2>& y) -> matrix2 -> friend auto constexpr
Add.
template<typename U1, typename U2>
auto operator-(matrix2 x, const matrix2<U1, U2>& y) -> matrix2 -> friend auto constexpr
Substract.
template<typename R>
auto operator*(matrix2 x, const R& alpha) -> matrix2 -> friend auto constexpr
Multiply by a scalar.
template<typename R>
auto operator*(const R& alpha, matrix2 x) -> matrix2 -> friend auto constexpr
Multiply (by a scalar)
template<typename R>
auto operator/(matrix2 x, const R& alpha) -> matrix2 -> friend auto constexpr
Divide (by a scalar)

Function documentation

template<typename T1, typename T2>
numeric::matrix2<T1, T2>::matrix2(T1&& x, T2&& y) constexpr noexcept

Construct a new matrix2 object.

Parameters
x
y

template<typename T1, typename T2>
numeric::matrix2<T1, T2>::matrix2(const T1& x, const T2& y) constexpr

Construct a new matrix2 object.

Parameters
x
y

template<typename T1, typename T2>
auto numeric::matrix2<T1, T2>::operator-() const -> matrix2 constexpr

Negate.

Returns matrix2

template<typename T1, typename T2> template<typename U1, typename U2>
auto numeric::matrix2<T1, T2>::operator+=(const matrix2<U1, U2>& other) -> matrix2 & constexpr

Add.

Template parameters
U1
U2
Parameters
other in
Returns matrix2&

template<typename T1, typename T2> template<typename U1, typename U2>
auto numeric::matrix2<T1, T2>::operator-=(const matrix2<U1, U2>& other) -> matrix2 & constexpr

Substract.

Template parameters
U1
U2
Parameters
other in
Returns matrix2&

template<typename T1, typename T2> template<typename R>
auto numeric::matrix2<T1, T2>::operator*=(const R& alpha) -> matrix2 & constexpr

Multiply.

Template parameters
R
Parameters
alpha in
Returns matrix2&

template<typename T1, typename T2> template<typename R>
auto numeric::matrix2<T1, T2>::operator/=(const R& alpha) -> matrix2 & constexpr

Divide.

Template parameters
R
Parameters
alpha in
Returns matrix2&

template<typename T1, typename T2> template<typename U1, typename U2>
auto numeric::matrix2<T1, T2>::mdot(const vector2<U1, U2>& other) const constexpr

Template parameters
U1
U2
Parameters
other in
Returns constexpr auto

template<typename T1, typename T2>
auto numeric::matrix2<T1, T2>::det() const constexpr

Returns constexpr auto

template<typename T1, typename T2> template<typename U1, typename U2>
auto numeric::matrix2<T1, T2>::solve(const vector2<U1, U2>& v) constexpr

Template parameters
U1
U2
Returns constexpr auto

template<typename T1, typename T2> template<typename U1, typename U2>
friend auto numeric::matrix2<T1, T2>::operator+(matrix2 x, const matrix2<U1, U2>& y) -> matrix2 constexpr

Add.

Template parameters
U1
U2
Parameters
in
in
Returns matrix2

template<typename T1, typename T2> template<typename U1, typename U2>
friend auto numeric::matrix2<T1, T2>::operator-(matrix2 x, const matrix2<U1, U2>& y) -> matrix2 constexpr

Substract.

Template parameters
U1
U2
Parameters
in
in
Returns matrix2

template<typename T1, typename T2> template<typename R>
friend auto numeric::matrix2<T1, T2>::operator*(matrix2 x, const R& alpha) -> matrix2 constexpr

Multiply by a scalar.

Template parameters
R
Parameters
in
alpha in
Returns matrix2

template<typename T1, typename T2> template<typename R>
friend auto numeric::matrix2<T1, T2>::operator*(const R& alpha, matrix2 x) -> matrix2 constexpr

Multiply (by a scalar)

Template parameters
R
Parameters
alpha in
in
Returns matrix2

template<typename T1, typename T2> template<typename R>
friend auto numeric::matrix2<T1, T2>::operator/(matrix2 x, const R& alpha) -> matrix2 constexpr

Divide (by a scalar)

Template parameters
R
Parameters
in
alpha in
Returns matrix2