algebra/include/nil/crypto3/algebra/matrix/math.hpp
Go to the documentation of this file.
69 constexpr matrix<nil::crypto3::detail::remove_complex_t<T>, M, N> real(const matrix<T, M, N> &m) {
81 constexpr matrix<nil::crypto3::detail::remove_complex_t<T>, M, N> imag(const matrix<T, M, N> &m) {
119 return generate<M, P>([&a, &b](auto i, auto j) { return algebra::sum(a.row(i) * b.column(j)); });
156 return generate<M * P, N * Q>([&a, &b](auto i, auto j) { return a[i / P][j / Q] * b[i % P][j % Q]; });
187 constexpr std::tuple<matrix<T, M, N>, std::size_t, T> gauss_jordan_impl(matrix<T, M, N> m, T tolerance) {
246 constexpr std::tuple<matrix<T, M, N>, std::size_t, T> gauss_jordan_impl(const matrix<T, M, N> &m) {
constexpr matrix< T, M, N > rref(const matrix< T, M, N > &m)
Compute the reduced row echelon form.
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:262
constexpr matrix< T, M, M > inverse(const matrix< T, M, M > &m)
computes the matrix inverse
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:312
constexpr T det(const matrix< T, M, M > &m)
Compute the determinant.
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:299
constexpr T trace(const matrix< T, M, M > &m)
computes the trace
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:326
constexpr matrix< T, M, P > matmul(const matrix< T, M, N > &a, const matrix< T, N, P > &b)
computes the matrix product
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:118
constexpr matrix< T, N, M > hermitian(const matrix< T, M, N > &m)
computes the Hermitian transpose
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:105
constexpr matrix< T, M, N+P > horzcat(const matrix< T, M, N > &a, const matrix< T, M, P > &b)
horizontally concatenates two matrices
Definition: matrix/utility.hpp:186
constexpr std::size_t rank(const matrix< T, M, N > &m)
Compute the rank.
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:288
constexpr matrix< T, M *P, N *Q > kron(const matrix< T, M, N > &a, const matrix< T, P, Q > &b)
Computes the kronecker tensor product.
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:155
constexpr matrix< U, N, M > elementwise(F f, const matrix< T, N, M > &m, const Matrices &...matrices)
applies a function elementwise between many matrices
Definition: matrix/utility.hpp:55
constexpr matrix< T, N, M > transpose(const matrix< T, M, N > &m)
computes the transpose
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:93
constexpr matrix< nil::crypto3::detail::remove_complex_t< T >, M, N > imag(const matrix< T, M, N > &m)
computes the elementwise imag
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:81
constexpr matrix< T, M, N > conj(const matrix< T, M, N > &m)
computes the elementwise complex conjugate
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:57
constexpr T macs(const matrix< T, M, N > &m)
Computes the maximum absolute column sum norm.
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:168
constexpr vector< T, M > matvectmul(const matrix< T, M, N > &m, const vector< T, N > &v)
computes the product of matrix and vector
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:140
constexpr T mars(const matrix< T, M, N > &m)
Computes the maximum absolute row sum norm.
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:181
constexpr matrix< nil::crypto3::detail::remove_complex_t< T >, M, N > real(const matrix< T, M, N > &m)
computes the elementwise real
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:69
constexpr vector< T, N > vectmatmul(const vector< T, M > &v, const matrix< T, M, N > &m)
computes the product of vector and matrix
Definition: algebra/include/nil/crypto3/algebra/matrix/math.hpp:129
constexpr nil::crypto3::detail::remove_complex_t< T > abs(T x)
computes the absolute value
Definition: algebra/include/nil/crypto3/algebra/scalar/math.hpp:76
constexpr T sum(const vector< T, N > &v)
computes the sum of elements
Definition: algebra/include/nil/crypto3/algebra/vector/math.hpp:124
constexpr T max(const vector< T, N > &v)
computes the maximum valued element
Definition: algebra/include/nil/crypto3/algebra/vector/math.hpp:146
Definition: pair.hpp:31
constexpr vector< T, N > column(std::size_t i) const
access specified column
Definition: matrix.hpp:82
constexpr vector< T, M > row(std::size_t i) const
access specified row
Definition: matrix.hpp:70