37 template<
typename DataType>
40 template<
typename DataType>
43 ASSERTL2(row < GetRows(), std::string(
"Row ") + boost::lexical_cast<std::string>(row) +
44 std::string(
" requested in a matrix with a maximum of ") + boost::lexical_cast<std::string>(GetRows()) +
45 std::string(
" rows"));
46 ASSERTL2(column < GetColumns(), std::string(
"Column ") + boost::lexical_cast<std::string>(column) +
47 std::string(
" requested in a matrix with a maximum of ") + boost::lexical_cast<std::string>(GetColumns()) +
48 std::string(
" columns"));
49 return v_GetValue(row, column);
52 template<
typename DataType>
55 return v_GetStorageSize();
58 template<
typename DataType>
61 return v_GetStorageType();
64 template<
typename DataType>
67 return GetTransposedRows(GetTransposeFlag());
70 template<
typename DataType>
73 if( transpose ==
'N' )
83 template<
typename DataType>
86 return GetTransposedColumns(GetTransposeFlag());
89 template<
typename DataType>
92 if( transpose ==
'N' )
102 template<
typename DataType>
105 template<
typename DataType>
108 if( m_transpose ==
'N' )
119 template<
typename DataType>
122 return v_GetTransposeFlag();
125 template<
typename DataType>
127 unsigned int row,
unsigned int col,
128 unsigned int numRows,
unsigned int numColumns,
const char transpose,
129 unsigned int numSubDiags,
unsigned int numSuperDiags )
131 if(transpose ==
'T' )
155 row, col, numSubDiags, numSuperDiags);
160 ASSERTL1(numSubDiags==numSuperDiags,
161 std::string(
"Number of sub- and superdiagonals should ") +
162 std::string(
"be equal for a symmetric banded matrix"));
178 return std::numeric_limits<unsigned int>::max();
181 template<
typename DataType>
183 unsigned int columns,
unsigned int subDiags,
unsigned int superDiags)
205 subDiags, superDiags);
211 std::string(
"Number of sub- and superdiagonals should ") +
212 std::string(
"be equal for a symmetric banded matrix"));
231 template<
typename DataType>
240 template<
typename DataType>
243 m_transpose(rhs.m_transpose)
249 template<
typename DataType>
252 m_size[0] = rhs.
m_size[0];
253 m_size[1] = rhs.
m_size[1];
259 template<
typename DataType>
266 template<
typename DataType>
269 m_transpose = newValue;
272 template<
typename DataType>
275 template<
typename DataType>
278 template<
typename DataType>
282 template<
typename DataType>
285 template<
typename DataType>
288 ASSERTL2(row < this->GetRows(), std::string(
"Row ") + boost::lexical_cast<std::string>(row) +
289 std::string(
" requested in a matrix with a maximum of ") + boost::lexical_cast<std::string>(this->GetRows()) +
290 std::string(
" rows"));
291 ASSERTL2(column < this->GetColumns(), std::string(
"Column ") + boost::lexical_cast<std::string>(column) +
292 std::string(
" requested in a matrix with a maximum of ") + boost::lexical_cast<std::string>(this->GetColumns()) +
293 std::string(
" columns"));
294 v_SetValue(row, column, d);
297 template<
typename DataType>
303 template<
typename DataType>
309 template<
typename DataType>
316 template<
typename DataType>
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
void Resize(unsigned int rows, unsigned int columns)
Resets the rows and columns in the array. This method does not update the data storage to match the n...
static unsigned int CalculateIndex(unsigned int totalRows, unsigned int totalColumns, unsigned int row, unsigned int column, unsigned int sub, unsigned int super)
static unsigned int CalculateIndex(unsigned int curRow, unsigned int curColumn, unsigned int nSuperDiags)
static unsigned int CalculateIndex(unsigned int curRow, unsigned int curColumn)
const unsigned int * GetSize() const
static unsigned int GetRequiredStorageSize(unsigned int rows, unsigned int columns)
static unsigned int CalculateIndex(unsigned int totalColumns, unsigned int curRow, unsigned int curColumn)
static unsigned int GetRequiredStorageSize(unsigned int rows, unsigned int columns)
char GetTransposeFlag() const
virtual void v_Transpose()
unsigned int GetColumns() const
unsigned int GetStorageSize() const
Matrix< DataType > & operator=(const Matrix< DataType > &rhs)
static unsigned int CalculateIndex(MatrixStorage type, unsigned int row, unsigned int col, unsigned int numRows, unsigned int numColumns, const char transpose= 'N', unsigned int numSubDiags=0, unsigned int numSuperDiags=0)
#define LIB_UTILITIES_EXPORT
virtual char v_GetTransposeFlag() const
MatrixStorage GetStorageType() const
static unsigned int GetRequiredStorageSize(unsigned int rows, unsigned int columns, unsigned int nSubSuperDiags)
char GetRawTransposeFlag() const
unsigned int GetTransposedColumns(char transpose) const
ConstMatrix(unsigned int rows, unsigned int columns)
void SetTransposeFlag(char newValue)
Matrix(unsigned int rows, unsigned int columns)
static unsigned int CalculateIndex(unsigned int curRow, unsigned int curColumn)
static unsigned int GetRequiredStorageSize(unsigned int rows, unsigned int columns)
static unsigned int CalculateIndex(unsigned int row, unsigned int col)
unsigned int GetRows() const
ConstMatrix< DataType > & operator=(const ConstMatrix< DataType > &rhs)
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
static unsigned int GetRequiredStorageSize(MatrixStorage type, unsigned int rows, unsigned int columns, unsigned int subDiags=0, unsigned int superDiags=0)
static unsigned int CalculateIndex(unsigned int totalRows, unsigned int totalColumns, unsigned int curRow, unsigned int curColumn)
void SetValue(unsigned int row, unsigned int column, typename boost::call_traits< DataType >::const_reference d)
boost::call_traits< DataType >::value_type operator()(unsigned int row, unsigned int column) const
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
unsigned int GetTransposedRows(char transpose) const
static unsigned int GetRequiredStorageSize(unsigned int totalRows, unsigned int totalColumns, unsigned int subDiags, unsigned int superDiags)
Calculates and returns the storage size required.