Go to the documentation of this file. 1 #pragma once // Ensure that file is included only once in a single compilation.
20 const char*
what()
const throw() {
return "Division by zero in dense linear algebra."; }
33 template <
unsigned int n_rowsT,
unsigned int n_colsT = n_rowsT,
typename mat_entry_t =
double>
42 static constexpr
unsigned int n_rows() {
return n_rowsT; }
48 static constexpr
unsigned int n_cols() {
return n_colsT; }
54 static constexpr
unsigned int size() {
return n_rowsT * n_colsT; }
60 static constexpr std::array<unsigned int, 2>
dimensions()
62 return std::array<unsigned int, 2>{n_rowsT, n_colsT};
88 static inline unsigned int loc_matrix_index(
const unsigned int row,
const unsigned int column)
90 static_assert(n_rowsT > 0,
"Matrix must have at least one row");
91 static_assert(n_colsT > 0,
"Matrix must have at least one column");
93 hy_assert(row < n_rowsT,
"Row index must be smaller than number of rows.");
94 hy_assert(column < n_colsT,
"Column index must be smaller than number of columns.");
96 return column * n_rowsT + row;
138 hy_assert(entries.size() ==
size(),
"std::vector and SmallMat must have compatible sizes!");
139 for (
unsigned int i = 0; i <
size(); ++i)
150 template <
typename other_entry_t>
153 for (
unsigned int i = 0; i <
size(); ++i)
160 :
entries_(std::move(other.entries_))
169 for (
unsigned int i = 0; i <
size(); ++i)
179 std::swap(
entries_, other.entries_);
208 hy_assert(col < n_colsT,
"The column you requested does not exist!");
210 for (
unsigned int i = 0; i < n_rowsT; ++i)
211 column[i] =
operator()(i, col);
222 for (
unsigned int i = 0; i < n_rowsT; ++i)
223 operator()(i, col) = col_vec[i];
232 inline mat_entry_t
operator()(
const unsigned int row,
const unsigned int column)
const
243 inline mat_entry_t&
operator()(
const unsigned int row,
const unsigned int column)
256 "You can only access entries of a SmallMat's entries that have non-negaitive "
257 <<
"index that is smaller than its size (which is " <<
size() <<
")."
258 <<
" However, you tried to access the " <<
index <<
"-th entry.");
270 "You can only access entries of a SmallMat's entries that have non-negaitive "
271 <<
"index that is smaller than its size (which is " <<
size() <<
")."
272 <<
" However, you tried to access the " <<
index <<
"-th entry.");
400 template <
unsigned int n_cols_other>
404 static_assert(n_cols_other == n_colsT || n_cols_other == 1,
405 "Addition is only defined for equal matrices or matrix plus vector.");
407 if constexpr (n_cols_other == n_colsT)
410 else if constexpr (n_cols_other == 1)
411 for (
unsigned int j = 0; j < n_colsT; ++j)
412 for (
unsigned int i = 0; i < n_rowsT; ++i)
413 this->
operator()(i, j) += other[i];
423 template <
unsigned int n_cols_other>
427 static_assert(n_cols_other == n_colsT || n_cols_other == 1,
428 "Subtration is only defined for equal matrices or matrix plus vector.");
430 if constexpr (n_cols_other == n_colsT)
433 else if constexpr (n_cols_other == 1)
434 for (
unsigned int j = 0; j < n_colsT; ++j)
435 for (
unsigned int i = 0; i < n_rowsT; ++i)
436 this->
operator()(i, j) -= other[i];
464 if (other[
index] == 0.)
490 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
493 constexpr
unsigned int rank = std::min(n_rows, n_cols);
495 for (
unsigned int i = 0; i < rank; ++i)
496 diag_mat(i, i) = diag_value;
505 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t,
unsigned int n_vec>
508 constexpr
unsigned int rank = std::min(n_rows, n_cols);
509 static_assert(n_vec <= rank,
"There must not be more diagonal values than entries!");
511 for (
unsigned int i = 0; i < n_vec; ++i)
512 diag_mat(i, i) = diag[i];
521 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
525 for (
unsigned int j = 0; j < n_cols; ++j)
526 for (
unsigned int i = 0; i < n_rows; ++i)
537 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
542 for (
unsigned int j = 0; j < n_cols; ++j)
543 for (
unsigned int i = 0; i < n_rows; ++i)
544 dyad_prod(i, j) = left[i] * right[j];
553 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
557 for (
unsigned int j = 0; j < n_cols; ++j)
558 for (
unsigned int i = 0; i < n_rows; ++i)
570 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
587 template <
unsigned int n_rows,
588 unsigned int n_cols_left,
589 unsigned int n_cols_right,
590 typename mat_entry_t>
595 static_assert(n_cols_left == n_cols_right || n_cols_left == 1 || n_cols_right == 1,
596 "Function only implemented for these three cases.");
598 if constexpr (n_cols_left == n_cols_right || n_cols_right == 1)
603 else if constexpr (n_cols_left == 1)
612 template <
unsigned int n_rows,
613 unsigned int n_cols_left,
614 unsigned int n_cols_right,
615 typename mat_entry_t>
620 static_assert(n_cols_left == n_cols_right || n_cols_left == 1 || n_cols_right == 1,
621 "Function only implemented for these three cases.");
623 if constexpr (n_cols_left == n_cols_right || n_cols_right == 1)
626 return difference -= right;
628 else if constexpr (n_cols_left == 1)
631 for (
unsigned int i = 0; i < n_cols_right; ++i)
639 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
644 return product *= right;
649 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
654 return quotient /= right;
664 template <
unsigned int n_rowsA,
unsigned int n_colsA,
unsigned int n_colsB,
typename mat_entry_t>
669 for (
unsigned int colB = 0; colB < n_colsB; ++colB)
670 for (
unsigned int colA = 0; colA < n_colsA; ++colA)
671 for (
unsigned int rowA = 0; rowA < n_rowsA; ++rowA)
672 result(rowA, colB) +=
A(rowA, colA) * B(colA, colB);
678 template <
unsigned int n_rowsA,
679 unsigned int n_colsA,
680 unsigned int n_rowsB,
681 unsigned int n_colsB,
682 typename mat_entry_t>
687 static constexpr
unsigned int rank = std::min(n_colsA, n_rowsB);
689 for (
unsigned int colB = 0; colB < n_colsB; ++colB)
690 for (
unsigned int colA = 0; colA < rank; ++colA)
691 for (
unsigned int rowA = 0; rowA < n_rowsA; ++rowA)
692 result(rowA, colB) +=
A(rowA, colA) * B(colA, colB);
698 template <
unsigned int n_rowsA,
unsigned int n_colsA,
unsigned int n_colsB,
typename mat_entry_t>
704 for (
unsigned int colB = 0; colB < n_colsB; ++colB)
705 for (
unsigned int colA = 0; colA < n_colsA; ++colA)
706 for (
unsigned int rowA = 0; rowA < n_rowsA; ++rowA)
707 result(colA, colB) +=
A(rowA, colA) * B(rowA, colB);
713 template <
unsigned int n_rowsA,
unsigned int n_colsA,
unsigned int n_rowsB,
typename mat_entry_t>
719 for (
unsigned int rowB = 0; rowB < n_rowsB; ++rowB)
720 for (
unsigned int colA = 0; colA < n_colsA; ++colA)
721 for (
unsigned int rowA = 0; rowA < n_rowsA; ++rowA)
722 result(colA, rowB) +=
A(rowA, colA) * B(rowB, rowA);
733 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
738 return sum += scalar;
743 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
745 const mat_entry_t& scalar)
748 return sum += scalar;
753 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
765 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
767 const mat_entry_t& scalar)
770 return difference -= scalar;
775 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
780 return product *= scalar;
785 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
787 const mat_entry_t& scalar)
790 return product *= scalar;
795 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
802 if (mat[
index] == 0.)
811 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
813 const mat_entry_t& scalar)
816 return quotient /= scalar;
826 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
829 if constexpr (n_cols == 1)
831 mat_entry_t norm = 0.;
833 norm += std::abs(mat[
index]);
838 mat_entry_t max_norms = 0., norm;
839 for (
unsigned int col = 0; col < n_cols; ++col)
842 for (
unsigned int row = 0; row < n_rows; ++row)
843 norm += std::abs(mat(row, col));
844 if (norm > max_norms)
853 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
856 static_assert(n_cols == 1,
"This is only implemented for vectors.");
862 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
865 if constexpr (n_cols == 1)
867 mat_entry_t norm = std::abs(mat[0]);
869 norm = std::max(norm, std::abs(mat[
index]));
874 mat_entry_t max_norms = 0., norm;
875 for (
unsigned int row = 0; row < n_rows; ++row)
878 for (
unsigned int col = 0; col < n_cols; ++col)
879 norm += std::abs(mat(row, col));
880 if (norm > max_norms)
889 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
892 static_assert(n_cols == 1,
"This is only implemented for vectors.");
893 mat_entry_t norm = 0.;
895 norm += std::pow(std::abs(mat[
index]), power);
896 return std::pow(norm, 1. / power);
901 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
904 mat_entry_t product = 1.;
906 product *= mat[
index];
917 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
920 if constexpr (n_cols == 1)
922 for (
unsigned int row = 0; row < n_rows; ++row)
923 stream <<
" " << mat[row] <<
" ";
928 for (
unsigned int row = 0; row < n_rows; ++row)
930 for (
unsigned int col = 0; col < n_cols; ++col)
931 stream <<
" " << mat(row, col) <<
" ";
949 template <
unsigned int n_rows,
typename mat_entry_t =
double>
954 template <
unsigned int n_rows,
typename mat_entry_t =
double>
959 template <
unsigned int n_rows,
typename mat_entry_t =
float>
981 template <
unsigned int n_rowsA,
unsigned int n_colsB,
typename mat_entry_t>
985 return Wrapper::lapack_solve<n_rowsA, n_colsB, mat_entry_t>(
A.data(), b.
data());
990 template <
unsigned int n_rowsA,
unsigned int n_colsB,
typename mat_entry_t>
996 return helperb / helperA;
1008 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
1011 return Wrapper::lapack_qr_decomp_q<n_rows, n_cols, mat_entry_t>(mat.
data());
1018 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
1038 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
1043 static_assert(n_cols <= n_rows,
"Function only defined for these matrices!");
1044 Wrapper::lapack_qr_decomp<n_rows, n_cols, mat_entry_t>(mat.
data(), mat_q.
data(), mat_r.
data());
1046 bool switch_necessary =
false;
1049 if (n_rows % 2 == 1)
1051 if (n_cols == n_rows)
1054 factors[n_rows - 1] *= -1.;
1059 for (
unsigned int i = 1; i < n_cols; ++i)
1060 if (mat_r(i, i) < 0.)
1063 switch_necessary = !switch_necessary;
1068 if (switch_necessary)
1072 for (
unsigned int i = 0; i < n_rows; ++i)
1073 if (factors[i] < 0.)
1074 for (
unsigned int j = 0; j < n_rows; ++j)
1075 mat_q(j, i) *= factors[i];
1078 for (
unsigned int i = 0; i < n_cols; ++i)
1079 if (factors[i] < 0.)
1080 for (
unsigned int j = 0; j < n_cols; ++j)
1081 mat_r(i, j) *= factors[i];
1096 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
1120 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
1123 return Wrapper::lapack_det<n_rows, n_cols, mat_entry_t>(mat.
data());
1133 template <
unsigned int n_rows,
unsigned int n_cols,
typename mat_entry_t>
mat_entry_t value_type
Define value_type of SmallMat as the typename of its entries!
Definition: dense_la.hxx:67
SmallMat< n_rowsA, n_colsB, mat_entry_t > mat_times_mat_unfit(const SmallMat< n_rowsA, n_colsA, mat_entry_t > &A, const SmallMat< n_rowsB, n_colsB, mat_entry_t > &B)
Standard matrix–matrix multiplication with non-fitting dimensions.
Definition: dense_la.hxx:683
SmallMat< n_rowsT, n_colsT, mat_entry_t > & operator+=(const mat_entry_t scalar)
Add scalar to a given SmallMat.
Definition: dense_la.hxx:345
This file provides the function hy_assert.
void qr_decomp(SmallMat< n_rows, n_cols, mat_entry_t > &mat, SmallSquareMat< n_rows, mat_entry_t > &mat_q, SmallSquareMat< n_cols, mat_entry_t > &mat_r)
Normalized QR decomposition.
Definition: dense_la.hxx:1039
SmallMat< n_rowsT, n_colsT, mat_entry_t > & operator=(SmallMat< n_rowsT, n_colsT, mat_entry_t > &&other) noexcept
Move assignment.
Definition: dense_la.hxx:176
SmallMat(const mat_entry_t entry_value)
Construct SmallMat that contains specified value.
Definition: dense_la.hxx:115
index
Definition: check_push_test.py:10
mat_entry_t operator()(const unsigned int row, const unsigned int column) const
Return single entry of a constant SmallMat.
Definition: dense_la.hxx:232
SmallMat< n_rows, n_cols, mat_entry_t > operator/(const mat_entry_t &scalar, const SmallMat< n_rows, n_cols, mat_entry_t > &mat)
Divide scalar by small/dense matrix.
Definition: dense_la.hxx:796
const std::array< mat_entry_t, size()> & data() const
Return data array of a constant SmallMat.
Definition: dense_la.hxx:194
SmallMat< n_rows, n_cols, mat_entry_t > dyadic_product(const SmallMat< n_rows, 1, mat_entry_t > &left, const SmallMat< n_cols, 1, mat_entry_t > &right)
Create dyadic product of two small vectors.
Definition: dense_la.hxx:538
SmallMat(std::array< mat_entry_t, size()> &&entries) noexcept
Move constructor from array.
Definition: dense_la.hxx:128
SmallMat< n_rowsA, n_colsB, mat_entry_t > operator*(const SmallMat< n_rowsA, n_colsA, mat_entry_t > &A, const SmallMat< n_colsA, n_colsB, mat_entry_t > &B)
Standard matrix–matrix multiplication.
Definition: dense_la.hxx:665
SmallMat< n_rows, n_cols, mat_entry_t > rep_mat(const SmallMat< n_rows, 1, mat_entry_t > rep_vec)
Create SmallMat that repeats given column vector.
Definition: dense_la.hxx:522
SmallMat(SmallMat< n_rowsT, n_colsT, mat_entry_t > &&other) noexcept
Move constructor.
Definition: dense_la.hxx:159
std::array< mat_entry_t, size()> entries_
Array containing the entries of the SmallMat.
Definition: dense_la.hxx:73
SmallMat< n_rows, n_cols, mat_entry_t > hada_prod(const SmallMat< n_rows, n_cols, mat_entry_t > &left, const SmallMat< n_rows, n_cols, mat_entry_t > &right)
Hadamard product of two small/dense matrices.
Definition: dense_la.hxx:640
SmallMat< n_rows, std::max(n_cols_left, n_cols_right), mat_entry_t > operator-(const SmallMat< n_rows, n_cols_left, mat_entry_t > &left, const SmallMat< n_rows, n_cols_right, mat_entry_t > &right)
Subtract second small/dense matrix from first.
Definition: dense_la.hxx:616
static constexpr unsigned int size()
Return size a SmallMat.
Definition: dense_la.hxx:54
mat_entry_t operator[](const unsigned int index) const
Return single entry of a constant SmallMat.
Definition: dense_la.hxx:253
mat_entry_t & operator()(const unsigned int row, const unsigned int column)
Return reference to single entry of a SmallMat.
Definition: dense_la.hxx:243
std::ostream & operator<<(std::ostream &stream, const SmallMat< n_rows, n_cols, mat_entry_t > &mat)
Fill std::ostream with small/dense matrix.
Definition: dense_la.hxx:918
SmallMat< n_rows, std::max(n_cols_left, n_cols_right), mat_entry_t > operator+(const SmallMat< n_rows, n_cols_left, mat_entry_t > &left, const SmallMat< n_rows, n_cols_right, mat_entry_t > &right)
Add two small / dense matrices.
Definition: dense_la.hxx:591
mat_entry_t norm_infty(const SmallMat< n_rows, n_cols, mat_entry_t > &mat)
Row sum norm of a small/dense matrix.
Definition: dense_la.hxx:863
if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special exception
Definition: License.txt:320
SmallMat(const SmallMat< n_rowsT, n_colsT, mat_entry_t > &other)
Copy constructor.
Definition: dense_la.hxx:145
mat_entry_t norm_p(const SmallMat< n_rows, n_cols, mat_entry_t > &mat, const mat_entry_t power)
p-norm of a small/dense vector.
Definition: dense_la.hxx:890
SmallMat< n_rowsT, n_colsT, mat_entry_t > & operator+=(const SmallMat< n_rowsT, n_cols_other, mat_entry_t > &other)
Add SmallMat to given SmallMat.
Definition: dense_la.hxx:401
mat_entry_t norm_1(const SmallMat< n_rows, n_cols, mat_entry_t > &mat)
Column sum norm of a small/dense matrix.
Definition: dense_la.hxx:827
SmallMat< n_rows, n_cols, mat_entry_t > diagonal(const mat_entry_t diag_value)
Create SmallMat that is a diagonal matrix with specified value on diagonal.
Definition: dense_la.hxx:491
SmallMat< n_rowsT, n_colsT, mat_entry_t > & operator*=(const SmallMat< n_rowsT, n_colsT, mat_entry_t > &other)
Hadamard product with given SmallMat.
Definition: dense_la.hxx:446
SmallMat(const std::array< mat_entry_t, size()> &entries)
Construct SmallMat from array of entries.
Definition: dense_la.hxx:123
mat_entry_t entries_product(const SmallMat< n_rows, n_cols, mat_entry_t > &mat)
Return product of all entries.
Definition: dense_la.hxx:902
SmallMat< n_rowsA, n_rowsB, mat_entry_t > mat_times_transposed_mat(const SmallMat< n_rowsA, n_colsA, mat_entry_t > &A, const SmallMat< n_rowsB, n_colsA, mat_entry_t > &B)
Multiply first matrix with transposed of second second.
Definition: dense_la.hxx:714
static unsigned int loc_matrix_index(const unsigned int row, const unsigned int column)
Translate row and column indices to local index of entry in matrix' array entries_.
Definition: dense_la.hxx:88
std::array< mat_entry_t, size()> & data()
Return data array that allows to manipulate the SmallMat.
Definition: dense_la.hxx:190
SmallMat< n_rowsT, n_colsT, mat_entry_t > & operator-=(const SmallMat< n_rowsT, n_cols_other, mat_entry_t > &other)
Subtract other SmallMat from SmallMat.
Definition: dense_la.hxx:424
const char * what() const
Definition: dense_la.hxx:20
SmallMat< n_rowsT, n_colsT, mat_entry_t > & operator=(const SmallMat< n_rowsT, n_colsT, mat_entry_t > &other)
Copy assignment.
Definition: dense_la.hxx:166
bool operator!=(const SmallMat< n_rowsT, n_colsT, mat_entry_t > &other) const
Find out whether two SmallMats do not have (exactly) the same entries.
Definition: dense_la.hxx:307
SmallMat< n_rowsT, n_colsT, mat_entry_t > & operator-=(const mat_entry_t scalar)
Subtract scalar from a given SmallMat.
Definition: dense_la.hxx:357
SmallMat< n_rowsT, n_colsT, mat_entry_t > & operator/=(const SmallMat< n_rowsT, n_colsT, mat_entry_t > &other)
Hadamard division by given SmallMat.
Definition: dense_la.hxx:459
SmallMat< n_rowsT, n_colsT, mat_entry_t > & operator*=(const mat_entry_t scalar)
Multiply SmallMat by a given scalar.
Definition: dense_la.hxx:369
mat_entry_t scalar_product(const SmallMat< n_rows, n_cols, mat_entry_t > &left, const SmallMat< n_rows, n_cols, mat_entry_t > &right)
Euclidean scalar product of two SmallVecs / Frobenius scalar product for two SmallMats.
Definition: dense_la.hxx:571
mat_entry_t norm_2(const SmallMat< n_rows, n_cols, mat_entry_t > &mat)
Euclidean norm of a small/dense vector.
Definition: dense_la.hxx:854
SmallMat()
Empty constructor for a SmallMat.
Definition: dense_la.hxx:109
SmallMat(const std::vector< mat_entry_t > &entries)
Construct SmallMat from std::vector of entries.
Definition: dense_la.hxx:136
static constexpr unsigned int n_rows()
Return number of rows of the matrix.
Definition: dense_la.hxx:42
bool operator==(const SmallMat< n_rowsT, n_colsT, mat_entry_t > &other) const
Find out whether two SmallMats have (exactly) the same entries.
Definition: dense_la.hxx:290
#define hy_assert(Expr, Msg)
The assertion to be used within HyperHDG — deactivate using -DNDEBUG compile flag.
Definition: hy_assert.hxx:38
static constexpr unsigned int n_cols()
Return number of columns of the matrix.
Definition: dense_la.hxx:48
SmallMat< n_rows, n_rows, mat_entry_t > qr_decomp_q(SmallMat< n_rows, n_cols, mat_entry_t > &mat)
Matrix Q of Householder QR decomposition.
Definition: dense_la.hxx:1009
SmallMat< n_colsA, n_colsB, mat_entry_t > transposed_mat_times_mat(const SmallMat< n_rowsA, n_colsA, mat_entry_t > &A, const SmallMat< n_rowsA, n_colsB, mat_entry_t > &B)
Transpose first small/dense matrix and multiply it with second.
Definition: dense_la.hxx:699
SmallMat< n_rows, n_cols, mat_entry_t > hada_divi(const SmallMat< n_rows, n_cols, mat_entry_t > &left, const SmallMat< n_rows, n_cols, mat_entry_t > &right)
Divide first small/dense matrix element-wise by second.
Definition: dense_la.hxx:650
static constexpr std::array< unsigned int, 2 > dimensions()
Return dimensions a SmallMat.
Definition: dense_la.hxx:60
Exception to be thrown if division by zero appears.
Definition: dense_la.hxx:18
SmallMat< n_rowsT, 1, mat_entry_t > get_column(const unsigned int col) const
Return a column of a SmallMat.
Definition: dense_la.hxx:206
This file provides the function lapack_solve.
SmallMat< n_cols, n_rows, mat_entry_t > transposed(SmallMat< n_rows, n_cols, mat_entry_t > mat)
Transpose given matrix.
Definition: dense_la.hxx:554
mat_entry_t & operator[](const unsigned int index)
Return reference to single entry of a SmallMat.
Definition: dense_la.hxx:267
mat_entry_t determinant(SmallMat< n_rows, n_cols, mat_entry_t > &mat)
Determinant of a rectangular system.
Definition: dense_la.hxx:1121
SmallMat< n_rowsT, n_colsT, mat_entry_t > & operator/=(const mat_entry_t scalar)
Divide given SmallMat by a scalar.
Definition: dense_la.hxx:381
SmallMat(const SmallMat< n_rowsT, n_colsT, other_entry_t > &other)
Conversion between different floating points artithmetics.
Definition: dense_la.hxx:151
void set_column(const unsigned int col, const SmallMat< n_rowsT, 1, mat_entry_t > col_vec)
Set column of a SmallMat.
Definition: dense_la.hxx:220
bool operator<(const SmallMat< n_rowsT, n_colsT, mat_entry_t > &other) const
Find out whether the SmallMat is "smaller than" another SmallMat.
Definition: dense_la.hxx:325
This class implements a small/dense matrix.
Definition: dense_la.hxx:34