100 #ifdef TNT_UNROLL_LOOPS
104 for (i=0; i<N4; i+=4)
112 for (i=N4; i< N; i++)
126 #ifdef TNT_UNROLL_LOOPS
130 for (i=0; i<N4; i+=4)
138 for (i=N4; i< N; i++)
168 operator T**()
const {
return row_; }
199 std::istringstream ins(s);
261 #ifdef TNT_BOUNDS_CHECK
265 return (d==1) ?
m_ : ((d==2) ?
n_ : 0);
276 #ifdef TNT_BOUNDS_CHECK
285 #ifdef TNT_BOUNDS_CHECK
294 #ifdef TNT_BOUNDS_CHECK
303 #ifdef TNT_BOUNDS_CHECK
314 #ifdef TNT_BOUNDS_CHECK
327 #ifdef TNT_BOUNDS_CHECK
350 s << M <<
" " << N <<
"\n";
407 tmp[i][j] = A[i][j] + B[i][j];
427 tmp[i][j] = A[i][j] - B[i][j];
447 tmp[i][j] = A[i][j] * B[i][j];
476 #ifdef TNT_BOUNDS_CHECK
492 sum =
sum + A[i][j] * B[j][k];
533 sum += *row_i * *col_k;
548 #ifdef TNT_BOUNDS_CHECK
561 const T* rowi = A[i];
563 sum =
sum + rowi[j] * x[j];
Definition: tnt_cmat.h:40
T ** rowm1_
Definition: tnt_cmat.h:63
Matrix< T > & newsize(Subscript M, Subscript N)
Definition: tnt_cmat.h:218
~Matrix()
Definition: tnt_cmat.h:210
T value_type
Definition: tnt_cmat.h:46
const T * const_iterator
Definition: tnt_cmat.h:51
T * iterator
Definition: tnt_cmat.h:49
void destroy()
Definition: tnt_cmat.h:150
Matrix()
Definition: tnt_cmat.h:175
Subscript size() const
Definition: tnt_cmat.h:171
Subscript n_
Definition: tnt_cmat.h:58
void set(const T &val)
Definition: tnt_cmat.h:121
Matrix(Subscript M, Subscript N, const T &value=T())
Definition: tnt_cmat.h:183
Matrix< T > & operator=(const Matrix< T > &A)
Definition: tnt_cmat.h:234
T * pointer
Definition: tnt_cmat.h:48
Subscript mn_
Definition: tnt_cmat.h:59
Subscript num_cols() const
Definition: tnt_cmat.h:269
void copy(const T *v)
Definition: tnt_cmat.h:95
reference operator()(Subscript i, Subscript j)
Definition: tnt_cmat.h:312
Matrix< T > & operator=(const T &scalar)
Definition: tnt_cmat.h:252
Subscript m_
Definition: tnt_cmat.h:57
T * vm1_
Definition: tnt_cmat.h:62
T & reference
Definition: tnt_cmat.h:50
T * v_
Definition: tnt_cmat.h:60
Matrix(const Matrix< T > &A)
Definition: tnt_cmat.h:177
Subscript size_type
Definition: tnt_cmat.h:45
void initialize(Subscript M, Subscript N)
Definition: tnt_cmat.h:68
Matrix(Subscript M, Subscript N, const T *v)
Definition: tnt_cmat.h:189
Subscript lbound() const
Definition: tnt_cmat.h:54
Matrix(Subscript M, Subscript N, const char *s)
Definition: tnt_cmat.h:195
const_reference operator()(Subscript i) const
Definition: tnt_cmat.h:301
Subscript num_rows() const
Definition: tnt_cmat.h:268
reference operator()(Subscript i)
Definition: tnt_cmat.h:292
T element_type
Definition: tnt_cmat.h:47
Subscript dim(Subscript d) const
Definition: tnt_cmat.h:259
const T * operator[](Subscript i) const
Definition: tnt_cmat.h:283
const T & const_reference
Definition: tnt_cmat.h:52
T ** row_
Definition: tnt_cmat.h:61
T * operator[](Subscript i)
Definition: tnt_cmat.h:274
Subscript dim() const
Definition: tnt_vec.h:236
Definition: tnt_array1d.h:36
Matrix< T > mult_element(const Matrix< T > &A, const Matrix< T > &B)
Definition: tnt_cmat.h:433
Array1D< T > operator+(const Array1D< T > &A, const Array1D< T > &B)
Definition: tnt_array1d_utils.h:64
Array2D< T > matmult(const Array2D< T > &A, const Array2D< T > &B)
Definition: tnt_array2d_utils.h:259
Array1D< T > operator*(const Array1D< T > &A, const Array1D< T > &B)
Definition: tnt_array1d_utils.h:107
Array1D< T > operator-(const Array1D< T > &A, const Array1D< T > &B)
Definition: tnt_array1d_utils.h:86
Matrix< T > transpose(const Matrix< T > &A)
Definition: tnt_cmat.h:454
std::ostream & operator<<(std::ostream &s, const Array1D< T > &A)
Definition: tnt_array1d_utils.h:31
int Subscript
Definition: tnt_subscript.h:43
std::istream & operator>>(std::istream &s, Array1D< T > &A)
Definition: tnt_array1d_utils.h:49
T sum(const std::vector< T > &array, int start, int end)
Definition: essentiamath.h:117
#define NULL
Definition: tnt_i_refvec.h:33