26namespace linearalgebra{
42 std::vector< std::vector< T > > &A,
43 std::vector< std::vector< T > > &B
60if (m == 0) {
return; }
62if (n == 0) {
return; }
70for (i = 0; i < n; ++i) {
71 B[i].resize(m, (T) 0.0);
75for (i = 0; i < m; i++) {
76 for (j = 0; j < n; j++) {
91template <
class T,
size_t m,
size_t n>
93 std::array< std::array< T, n >, m > &A,
94 std::array< std::array< T, m >, n > &B
110if (m == 0) {
return; }
111if (n == 0) {
return; }
116for (i = 0; i < m; i++) {
117 for (j = 0; j < n; j++) {
134 const std::vector< std::vector< T > > &A
151if (m != 0) n = A[0].size() ;
157std::vector< std::vector< T > > B( n, std::vector<T> (m,0.) ) ;
160for (i = 0; i < m; i++) {
161 for (j = 0; j < n; j++) {
176template <
class T,
size_t m,
size_t n>
178 const std::array< std::array< T, n >, m > &A
186std::array< std::array< T, m >, n > B ;
197for (i = 0; i < m; i++) {
198 for (j = 0; j < n; j++) {
214 std::vector< std::vector< T > > &A,
215 std::vector< std::vector< T > > &L
232if (m == 0) {
return; };
243for (i = 0; i < m; i++) {
244 for (j = 0; j <= i; j++) {
260template <
class T,
size_t m,
size_t n>
262 std::array< std::array< T, n >, m > &A,
263 std::array< std::array< T, n >, m > &L
279if (m == 0) {
return; };
289for (i = 0; i < m; i++) {
290 for (j = 0; j <= i; j++) {
306 std::vector< std::vector< T > > &A,
307 std::vector< std::vector< T > > &U
324if (m == 0) {
return; };
335for (i = 0; i < m; i++) {
336 for (j = i; j < n; j++) {
351template <
class T,
size_t m,
size_t n>
353 std::array< std::array< T, n >, m > &A,
354 std::array< std::array< T, n >, m > &U
370if (m == 0) {
return; };
380for (i = 0; i < m; i++) {
381 for (j = i; j < n; j++) {
void transpose(std::vector< std::vector< T > > &, std::vector< std::vector< T > > &)
void triL(std::vector< std::vector< T > > &, std::vector< std::vector< T > > &)
void triU(std::vector< std::vector< T > > &, std::vector< std::vector< T > > &)
void zeros(std::vector< std::vector< T > > &, int, int)