BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_AR_Matrix.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California,
4 * through Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef BELFEM_CL_AR_MATRIX_HPP
13#define BELFEM_CL_AR_MATRIX_HPP
14
15#include "typedefs.hpp"
16#include "assert.hpp"
17
18namespace belfem
19{
27 template< typename T >
28 class Matrix
29 {
30//------------------------------------------------------------------------------
31 public :
32//------------------------------------------------------------------------------
33
34 typedef arma::Mat<T> MatrixType;
35
36//------------------------------------------------------------------------------
37 private :
38//------------------------------------------------------------------------------
39
40 // member class of underlying vector implementation
41 MatrixType mMatrix;
42
43//------------------------------------------------------------------------------
44 public :
45//------------------------------------------------------------------------------
46
50 Matrix() = default;
51
52// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
53
57 Matrix( const size_t aNumRows,
58 const size_t aNumCols ) :
59 mMatrix( aNumRows, aNumCols ) {}
60
61// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
62
66 Matrix( const size_t aNumRows,
67 const size_t aNumCols,
68 const real aValue ) :
69 mMatrix( aNumRows, aNumCols )
70 {
71 this->fill( aValue );
72 }
73
74// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
75
79 Matrix( const std::initializer_list<std::initializer_list<T> > & aInitList )
80 : mMatrix( aInitList )
81 {
82
83 }
84
85// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
86
90 Matrix( const MatrixType & aExpression )
91 : mMatrix( aExpression ) {}
92
93// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
94
98 template< typename ET, typename OP >
99 Matrix( const arma::Op<ET, OP> & aExpression )
100 : mMatrix( aExpression ) {}
101
102//------------------------------------------------------------------------------
103
107 Matrix( const Matrix< T > & aMatrix ) :
108 mMatrix( aMatrix.mMatrix )
109 {}
110
114 Matrix( Matrix< T > && aMatrix ) noexcept :
115 mMatrix( std::move( aMatrix.mMatrix ) )
116 {}
117
118
119//------------------------------------------------------------------------------
120
124 virtual ~Matrix() = default;
125
126//------------------------------------------------------------------------------
127// MEMORY
128//------------------------------------------------------------------------------
129
130 /*
131 * expose the underlying raw pointer
132 */
133
134 inline T *
136 {
137 return mMatrix.memptr();
138 }
139
140// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
141
142 /*
143 * expose the underlying raw pointer ( const version )
144 */
145 inline const T *
146 data() const
147 {
148 return mMatrix.memptr();
149 }
150
151//------------------------------------------------------------------------------
152
153 /*
154 * expose the underlying matrix implementation ( writable version )
155 */
156 inline MatrixType &
158 {
159 return mMatrix;
160 }
161
162// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
163
164 /*
165 * expose the underlying matrix implementation ( const version )
166 */
167 inline const MatrixType &
169 {
170 return mMatrix;
171 }
172
173//------------------------------------------------------------------------------
174// UTILITIES
175//------------------------------------------------------------------------------
176
177 inline void
178 fill( const T & aValue )
179 {
180 mMatrix.fill( aValue );
181 }
182
183//------------------------------------------------------------------------------
184
185 inline void
186 set_size( const size_t aNumRows, const size_t aNumCols )
187 {
188 mMatrix.set_size( aNumRows, aNumCols );
189 }
190
191// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
192
193 inline void
194 set_size( const size_t aNumRows, const size_t aNumCols, const T & aValue )
195 {
196 this->set_size( aNumRows, aNumCols );
197 this->fill( aValue );
198 }
199
200//------------------------------------------------------------------------------
201// SIZE CHECKS
202//------------------------------------------------------------------------------
203
204 inline size_t
205 n_rows() const
206 {
207 return mMatrix.n_rows;
208 }
209
210//------------------------------------------------------------------------------
211
212 inline size_t
213 n_cols() const
214 {
215 return mMatrix.n_cols;
216 }
217
218//------------------------------------------------------------------------------
219
223 inline size_t
224 capacity() const
225 {
226 return mMatrix.n_elem;
227 }
228
229//------------------------------------------------------------------------------
230
235 inline size_t
236 spacing() const
237 {
238 return mMatrix.n_rows;
239 }
240
241//------------------------------------------------------------------------------
242// OPERATORS
243//------------------------------------------------------------------------------
244
249 operator=( Matrix< T > && aMatrix ) noexcept
250 {
251 if ( this != & aMatrix )
252 {
253 mMatrix = std::move( aMatrix.mMatrix );
254 }
255 return *this;
256 }
257
262 operator=( const Matrix< T > & aMatrix )
263 {
264 if ( this != &aMatrix )
265 {
266 mMatrix = aMatrix.mMatrix;
267 }
268 return *this;
269 }
270
271
272//------------------------------------------------------------------------------
273
277 inline T &
278 operator()( const size_t aRowIndex, const size_t aColIndex )
279 {
280 BELFEM_ASSERT( aRowIndex< this->n_rows(),
281 "Row index %lu out of bounds, which must be smaller than %lu.",
282 ( long unsigned int ) aRowIndex,
283 ( long unsigned int ) this->n_rows() );
284
285 BELFEM_ASSERT( aColIndex< this->n_cols(),
286 "Col index %lu out of bounds, which must be smaller than %lu.",
287 ( long unsigned int ) aColIndex,
288 ( long unsigned int ) this->n_cols() );
289
290 return mMatrix( aRowIndex, aColIndex );
291 }
292
293// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
294
298 virtual inline const T &
299 operator()( const size_t aRowIndex, const size_t aColIndex ) const
300 {
301 BELFEM_ASSERT( aRowIndex< this->n_rows(),
302 "Row index %lu out of bounds, which must be smaller than %lu.",
303 ( long unsigned int ) aRowIndex,
304 ( long unsigned int ) this->n_rows() );
305
306 BELFEM_ASSERT( aColIndex< this->n_cols(),
307 "Col index %lu out of bounds, which must be smaller than %lu.",
308 ( long unsigned int ) aColIndex,
309 ( long unsigned int ) this->n_cols() );
310
311 return mMatrix( aRowIndex, aColIndex );
312 }
313
314//------------------------------------------------------------------------------
315// Cols and Rows
316//------------------------------------------------------------------------------
317
318 inline auto
319 row( const size_t aRowIndex )
320 ->decltype( mMatrix.row( aRowIndex ) )
321 {
322 BELFEM_ASSERT( aRowIndex < this->n_rows(),
323 "Row index %lu out of bounds, which must be less than %lu.",
324 ( long unsigned int ) aRowIndex,
325 ( long unsigned int ) this->n_rows() );
326
327 return mMatrix.row( aRowIndex );
328 }
329
330// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
331
332 inline auto
333 row( const size_t aRowIndex ) const
334 ->decltype( mMatrix.row( aRowIndex ) )
335 {
336 BELFEM_ASSERT( aRowIndex < this->n_rows(),
337 "Row index %lu out of bounds, which must be less than %lu.",
338 ( long unsigned int ) aRowIndex,
339 ( long unsigned int ) this->n_rows() );
340
341 return mMatrix.row( aRowIndex );
342 }
343
344//------------------------------------------------------------------------------
345
346 inline auto
347 col( const size_t aColIndex )
348 ->decltype( mMatrix.col( aColIndex ) )
349 {
350 BELFEM_ASSERT( aColIndex < this->n_cols(),
351 "Col index %lu out of bounds, which must be less than %lu.",
352 ( long unsigned int ) aColIndex,
353 ( long unsigned int ) this->n_cols() );
354
355 return mMatrix.col( aColIndex );
356 }
357
358// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
359
360 inline auto
361 col( const size_t aColIndex ) const
362 ->decltype( mMatrix.col( aColIndex ) )
363 {
364 BELFEM_ASSERT( aColIndex < this->n_cols(),
365 "Col index %lu out of bounds, which must be less than %lu.",
366 ( long unsigned int ) aColIndex,
367 ( long unsigned int ) this->n_cols() );
368
369 return mMatrix.col( aColIndex );
370 }
371
372//------------------------------------------------------------------------------
373
374 inline auto
375 submat( const size_t aFirstRow,
376 const size_t aFirstCol,
377 const size_t aLastRow,
378 const size_t aLastCol )
379 -> decltype( mMatrix.submat( aFirstRow, aFirstCol, aLastRow, aLastCol ) )
380 {
381 BELFEM_ASSERT( aFirstRow < this->n_rows(),
382 "First row index %lu out of bounds, which must be less than %lu.",
383 ( long unsigned int ) aFirstRow,
384 ( long unsigned int ) this->n_rows() );
385
386 BELFEM_ASSERT( aLastRow < this->n_rows(),
387 "Last row index %lu out of bounds, which must be less than %lu.",
388 ( long unsigned int ) aLastRow,
389 ( long unsigned int ) this->n_rows() );
390
391 BELFEM_ASSERT( aFirstCol < this->n_cols(),
392 "First col index %lu out of bounds, which must be less than %lu.",
393 ( long unsigned int ) aFirstCol,
394 ( long unsigned int ) this->n_cols() );
395
396 BELFEM_ASSERT( aLastCol < this->n_cols(),
397 "Last col index %lu out of bounds, which must be less than %lu.",
398 ( long unsigned int ) aLastCol,
399 ( long unsigned int ) this->n_cols() );
400
401 return mMatrix.submat( aFirstRow, aFirstCol, aLastRow, aLastCol );
402 }
403
404// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
405
406 inline auto
407 submat( const size_t aFirstRow,
408 const size_t aFirstCol,
409 const size_t aLastRow,
410 const size_t aLastCol ) const
411 -> decltype( mMatrix.submat( aFirstRow, aFirstCol, aLastRow, aLastCol ) )
412 {
413 BELFEM_ASSERT( aFirstRow < this->n_rows(),
414 "First row index %lu out of bounds, which must be less than %lu.",
415 ( long unsigned int ) aFirstRow,
416 ( long unsigned int ) this->n_rows() );
417
418 BELFEM_ASSERT( aLastRow < this->n_rows(),
419 "Last row index %lu out of bounds, which must be less than %lu.",
420 ( long unsigned int ) aLastRow,
421 ( long unsigned int ) this->n_rows() );
422
423 BELFEM_ASSERT( aFirstCol < this->n_cols(),
424 "First col index %lu out of bounds, which must be less than %lu.",
425 ( long unsigned int ) aFirstCol,
426 ( long unsigned int ) this->n_cols() );
427
428 BELFEM_ASSERT( aLastCol < this->n_cols(),
429 "Last col index %lu out of bounds, which must be less than %lu.",
430 ( long unsigned int ) aLastCol,
431 ( long unsigned int ) this->n_cols() );
432
433 return mMatrix.submat( aFirstRow, aFirstCol, aLastRow, aLastCol );
434 }
435
436//------------------------------------------------------------------------------
437
438 inline void
439 set_row( const size_t aRowIndex, const Vector <T> & aVector )
440 {
441 // make sure that length is correct
442 BELFEM_ASSERT( aVector.length() == this->n_cols(),
443 "Wrong length of vector : %lu ( expect %lu )",
444 ( long unsigned int ) aVector.length(),
445 ( long unsigned int ) this->n_cols() );
446
447 this->row( aRowIndex ) = arma::trans( aVector.vector_data() );
448 }
449
450 template < typename ET >
451 inline void
452 set_row( const size_t aColIndex, const ET & aExpression )
453 {
454 this->row( aColIndex ) = aExpression;
455 }
456
457//------------------------------------------------------------------------------
458
459 inline void
460 set_col( const size_t aColIndex, const Vector <T> & aVector )
461 {
462 // make sure that length is correct
463 BELFEM_ASSERT( aVector.length() == this->n_rows(),
464 "Wrong length of vector : %lu ( expect %lu )",
465 ( long unsigned int ) aVector.length(),
466 ( long unsigned int ) this->n_rows() );
467
468 this->col( aColIndex ) = aVector.vector_data();
469 }
470
471 template < typename ET >
472 inline void
473 set_col( const size_t aColIndex, const ET & aExpression )
474 {
475 this->col( aColIndex ) = aExpression;
476 }
477
478
479//------------------------------------------------------------------------------
480// internal operators
481//------------------------------------------------------------------------------
482
487 operator=( const T & aValue )
488 {
489 this->fill( aValue );
490 return *this;
491 }
492
493// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
494
498 template < typename ET >
500 operator=( const ET & aExpression )
501 {
502 mMatrix = aExpression;
503 return *this;
504 }
505
506//------------------------------------------------------------------------------
507// ADD OPERATORS
508//------------------------------------------------------------------------------
509
511 operator+=( const T & aValue )
512 {
513 mMatrix += aValue;
514 return *this;
515 }
516
518 operator+=( T & aValue )
519 {
520 mMatrix += aValue;
521 return *this;
522 }
523
524// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
525
527 operator+=( const Matrix< T > & aMatrix )
528 {
529 mMatrix += aMatrix.matrix_data();
530 return *this;
531 }
532
533// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
534
536 operator+=( const MatrixType & aExpression )
537 {
538 mMatrix += aExpression;
539 return *this;
540 }
541
542//------------------------------------------------------------------------------
543// SUBTRACT OPERATORS
544//------------------------------------------------------------------------------
545
547 operator-=( const T & aValue )
548 {
549 mMatrix -= aValue;
550 return *this;
551 }
552
553// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
554
556 operator-=( const Matrix< T > & aMatrix )
557 {
558 mMatrix -= aMatrix.matrix_data();
559 return *this;
560 }
561
562// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
563
565 operator-=( const MatrixType & aExpression )
566 {
567 mMatrix -= aExpression;
568 return *this;
569 }
570
571//------------------------------------------------------------------------------
572// MULTIPLY OPERATORS
573//------------------------------------------------------------------------------
574
576 operator*=( const T & aValue )
577 {
578 mMatrix *= aValue;
579 return *this;
580 }
581
582// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
583
585 operator*=( const Matrix< T > & aMatrix )
586 {
587 mMatrix *= aMatrix.matrix_data();
588 return *this;
589 }
590
591// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
592
594 operator*=( const MatrixType & aExpression )
595 {
596 mMatrix *= aExpression;
597 return *this;
598 }
599
600//------------------------------------------------------------------------------
601// DIVIDE OPERATORS
602//------------------------------------------------------------------------------
603
605 operator/=( const T & aValue )
606 {
607 mMatrix /= aValue;
608 return *this;
609 }
610
611//------------------------------------------------------------------------------
612// PRINT OPERATION
613//------------------------------------------------------------------------------
614
615 inline void
616 print( const std::string aLabel="Matrix" ) const;
617
618//------------------------------------------------------------------------------
619 };
620
621//------------------------------------------------------------------------------
622// turn off annoying waning
623#ifdef BELFEM_GCC
624#pragma GCC diagnostic push
625#pragma GCC diagnostic ignored "-Wformat"
626#endif
627 template < typename T > void
628 Matrix< T >::print( const std::string aLabel ) const
629 {
630 FILE * tOutFile = stdout;
631
632 fprintf( tOutFile, "%s = [ ... \n", aLabel.c_str() );
633
634 // get a ref of this
635 const Matrix< T > & tThis = *this;
636
637 uint tRows = tThis.n_rows();
638 uint tCols = tThis.n_cols();
639
640 for( uint i=0; i< tRows; ++i )
641 {
642 for( uint j=0; j< tCols; ++j )
643 {
644 if( j < tCols-1 )
645 {
646 fprintf( tOutFile, "%d, ", ( int ) tThis( i, j ) );
647 }
648 else
649 {
650 fprintf( tOutFile, "%d; ", ( int ) tThis( i, j ) );
651 }
652 }
653
654 if( i < tRows-1 )
655 {
656 fprintf( tOutFile, "...\n" );
657 }
658 else
659 {
660 fprintf( tOutFile, "];\n" );
661 }
662 }
663 }
664
665// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
666
667 template <>
668 inline void
669 Matrix<real>::print( const std::string aLabel ) const
670 {
671 FILE * tOutFile = stdout;
672
673 fprintf( tOutFile, "%s = [ ... \n", aLabel.c_str() );
674
675 const Matrix< real > & tThis = *this;
676
677 uint tRows = tThis.n_rows();
678 uint tCols = tThis.n_cols();
679
680 for( uint i=0; i< tRows; ++i )
681 {
682 for( uint j=0; j< tCols; ++j )
683 {
684 if( j < tCols-1 )
685 {
686 fprintf( tOutFile, "%+.15e, ", ( double ) tThis( i, j ) );
687 }
688 else
689 {
690 fprintf( tOutFile, "%+.15e; ", ( double ) tThis( i, j ) );
691 }
692 }
693
694 if( i < tRows-1 )
695 {
696 fprintf( tOutFile, "...\n" );
697 }
698 else
699 {
700 fprintf( tOutFile, "];\n" );
701 }
702 }
703 }
704
705
706#ifdef BELFEM_GCC
707#pragma GCC diagnostic pop
708#endif
709}
710#endif //BELFEM_CL_AR_MATRIX_HPP
#define BELFEM_ASSERT(aCheck,...)
Definition assert.hpp:244
Dense column-major matrix.
Definition cl_BZ_Matrix.hpp:28
Matrix< T > & operator=(Matrix< T > &&aMatrix) noexcept
move assignment operator
Definition cl_AR_Matrix.hpp:249
size_t spacing() const
inter-column stride of the data container ( the leading dimension in BLAS terms; here always n_rows )
Definition cl_AR_Matrix.hpp:236
Matrix< T > & operator+=(const T &aValue)
Definition cl_AR_Matrix.hpp:511
auto col(const size_t aColIndex) const -> decltype(mMatrix.col(aColIndex))
Definition cl_AR_Matrix.hpp:361
void set_size(const size_t aNumRows, const size_t aNumCols, const T &aValue)
Definition cl_AR_Matrix.hpp:194
virtual ~Matrix()=default
empty destructor
auto col(const size_t aColIndex) -> decltype(mMatrix.col(aColIndex))
Definition cl_AR_Matrix.hpp:347
auto submat(const size_t aFirstRow, const size_t aFirstCol, const size_t aLastRow, const size_t aLastCol) const -> decltype(mMatrix.submat(aFirstRow, aFirstCol, aLastRow, aLastCol))
Definition cl_AR_Matrix.hpp:407
const MatrixType & matrix_data() const
Definition cl_AR_Matrix.hpp:168
void fill(const T &aValue)
Definition cl_AR_Matrix.hpp:178
auto submat(const size_t aFirstRow, const size_t aFirstCol, const size_t aLastRow, const size_t aLastCol) -> decltype(mMatrix.submat(aFirstRow, aFirstCol, aLastRow, aLastCol))
Definition cl_AR_Matrix.hpp:375
auto row(const size_t aRowIndex) -> decltype(mMatrix.row(aRowIndex))
Definition cl_AR_Matrix.hpp:319
Matrix< T > & operator/=(const T &aValue)
Definition cl_AR_Matrix.hpp:605
Matrix(const size_t aNumRows, const size_t aNumCols)
Constructor without fill value.
Definition cl_AR_Matrix.hpp:57
void set_row(const size_t aRowIndex, const Vector< T > &aVector)
Definition cl_AR_Matrix.hpp:439
MatrixType & matrix_data()
Definition cl_AR_Matrix.hpp:157
size_t capacity() const
length of data container
Definition cl_AR_Matrix.hpp:224
Matrix< T > & operator-=(const T &aValue)
Definition cl_AR_Matrix.hpp:547
Matrix(const MatrixType &aExpression)
Constructor from expression.
Definition cl_AR_Matrix.hpp:90
Matrix< T > & operator-=(const MatrixType &aExpression)
Definition cl_AR_Matrix.hpp:565
Matrix(const arma::Op< ET, OP > &aExpression)
Constructor from expression.
Definition cl_AR_Matrix.hpp:99
Matrix(const size_t aNumRows, const size_t aNumCols, const real aValue)
Constructor with fill value.
Definition cl_AR_Matrix.hpp:66
void set_size(const size_t aNumRows, const size_t aNumCols)
Definition cl_AR_Matrix.hpp:186
size_t n_rows() const
Definition cl_AR_Matrix.hpp:205
void set_col(const size_t aColIndex, const Vector< T > &aVector)
Definition cl_AR_Matrix.hpp:460
Matrix(const Matrix< T > &aMatrix)
copy constructor
Definition cl_AR_Matrix.hpp:107
Matrix< T > & operator=(const Matrix< T > &aMatrix)
copy assignment operator
Definition cl_AR_Matrix.hpp:262
T & operator()(const size_t aRowIndex, const size_t aColIndex)
access operator ( writable version )
Definition cl_AR_Matrix.hpp:278
void set_row(const size_t aColIndex, const ET &aExpression)
Definition cl_AR_Matrix.hpp:452
arma::Mat< T > MatrixType
Definition cl_AR_Matrix.hpp:34
Matrix< T > & operator=(const T &aValue)
Fill with value.
Definition cl_AR_Matrix.hpp:487
Matrix< T > & operator-=(const Matrix< T > &aMatrix)
Definition cl_AR_Matrix.hpp:556
Matrix()=default
empty constructor
virtual const T & operator()(const size_t aRowIndex, const size_t aColIndex) const
access operator ( const version )
Definition cl_AR_Matrix.hpp:299
size_t n_cols() const
Definition cl_AR_Matrix.hpp:213
Matrix(Matrix< T > &&aMatrix) noexcept
move constructor
Definition cl_AR_Matrix.hpp:114
Matrix(const std::initializer_list< std::initializer_list< T > > &aInitList)
Constructor with initializer list.
Definition cl_AR_Matrix.hpp:79
Matrix< T > & operator+=(T &aValue)
Definition cl_AR_Matrix.hpp:518
Matrix< T > & operator*=(const MatrixType &aExpression)
Definition cl_AR_Matrix.hpp:594
Matrix< T > & operator+=(const MatrixType &aExpression)
Definition cl_AR_Matrix.hpp:536
Matrix< T > & operator*=(const Matrix< T > &aMatrix)
Definition cl_AR_Matrix.hpp:585
Matrix< T > & operator*=(const T &aValue)
Definition cl_AR_Matrix.hpp:576
const T * data() const
Definition cl_AR_Matrix.hpp:146
void print(const std::string aLabel="Matrix") const
Definition cl_AR_Matrix.hpp:628
T * data()
Definition cl_AR_Matrix.hpp:135
Matrix< T > & operator+=(const Matrix< T > &aMatrix)
Definition cl_AR_Matrix.hpp:527
Matrix< T > & operator=(const ET &aExpression)
Fill with expression.
Definition cl_AR_Matrix.hpp:500
void set_col(const size_t aColIndex, const ET &aExpression)
Definition cl_AR_Matrix.hpp:473
auto row(const size_t aRowIndex) const -> decltype(mMatrix.row(aRowIndex))
Definition cl_AR_Matrix.hpp:333
size_t length() const
get the length of the vector
Definition cl_AR_Vector.hpp:257
VectorType & vector_data()
expose the underlying matrix implementation ( writable version )
Definition cl_AR_Vector.hpp:204
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int uint
Definition typedefs.hpp:30
double real
Definition typedefs.hpp:36