32 template<
typename Treal>
52 real
const maxAbsVal );
62 for (
int ind = 1; ind <
n; ++ind) {
69 for (
int ind = 1; ind <
n; ++ind) {
75 size_t nnz()
const {
return n;}
83 template<
typename Treal>
88 for (
int i = 0; i <
n; ++i)
92 template<
typename Treal>
96 elements =
new real[n];
97 for (
int i = 0; i < n; ++i)
101 template<
typename Treal>
105 for (
int i = 0; i <
n; ++i)
109 template<
typename Treal>
111 for (
int i = 0; i <
n; ++i)
116 template<
typename Treal>
119 for (
int ind = 0; ind <
n; ind++)
121 return chosen_thresh;
124 template<
typename Treal>
126 for (
int ind = 0; ind <
n; ind++)
131 template<
typename Treal>
133 for (
int ind = 0; ind <
n; ind++)
137 template<
typename Treal>
139 assert(
this != &sm2.B);
140 assert(
this != &sm2.C);
144 for (
int ind = 0; ind <
n; ind++)
145 elements[ind] = sm2.A * sm2.B.elements[ind] * sm2.C.elements[ind];
149 template<
typename Treal>
152 for (
int ind = 0; ind <
n; ind++)
153 elements[ind] += sm.A * sm.B.elements[ind];
157 template<
typename Treal>
160 for (
int ind = 0; ind <
n; ind++)
165 template<
typename Treal>
171 real const maxAbsVal ) {
173 for (
int ind = 0; ind < A.
n; ind++) {
175 diff = diff > tmp_val ? diff : tmp_val;
180 template<
typename Treal>
183 real const reqAcc ) {
185 for (
int ind = 0; ind < A.
n; ind++) {
187 diff = diff > tmp_val ? diff : tmp_val;
193 template<
typename Treal>
~TestMatrix()
Definition: TestMatrix.h:37
real max() const
Definition: TestMatrix.h:67
int get_nrows() const
Definition: TestMatrix.h:77
Proxy structs used by the matrix API.
void add_identity(real const alpha)
Definition: TestMatrix.h:132
int n
Definition: TestMatrix.h:80
TestMatrix< real > & operator+=(mat::XY< real, TestMatrix< real > > const &sm)
Definition: TestMatrix.h:151
TestMatrix< real > & operator*=(real const alpha)
Definition: TestMatrix.h:125
real * elements
Definition: TestMatrix.h:79
real min() const
Definition: TestMatrix.h:60
real trace() const
Definition: TestMatrix.h:158
C++ interface to a subset of BLAS and LAPACK.
void get_diag(real *elem) const
Definition: TestMatrix.h:110
This proxy expresses the result of multiplication of three objects, of possibly different types...
Definition: matrix_proxy.h:65
static real mixed_diff(TestMatrix< real > const &A, TestMatrix< real > const &B, real const reqAcc)
Definition: TestMatrix.h:181
Treal real
Definition: TestMatrix.h:35
Definition: TestMatrix.h:33
size_t nnz() const
Definition: TestMatrix.h:75
static mat::Interval< real > diffIfSmall(TestMatrix< real > const &A, TestMatrix< real > const &B, mat::normType const norm, real const reqAcc, real const maxAbsVal)
Definition: TestMatrix.h:167
TestMatrix< real > & operator=(TestMatrix< real > const &other)
Definition: TestMatrix.h:93
Copyright(c) Emanuel Rubensson 2006.
TestMatrix()
Definition: TestMatrix.h:36
real thresh(real chosen_thresh, mat::normType normTruncation)
Definition: TestMatrix.h:117
This proxy expresses the result of multiplication of two objects, of possibly different types...
Definition: matrix_proxy.h:49
void transfer(TestMatrix< real > &dest)
Definition: TestMatrix.h:195
normType
Definition: matInclude.h:135