43#include "EST_TSimpleMatrix.h"
44#include "EST_TVector.h"
48#include "EST_cutils.h"
57 if (!a.p_sub_matrix && !
this->p_sub_matrix)
58 memcpy((
void *)&this->a_no_check(0,0),
59 (
const void *)&a.a_no_check(0,0),
60 this->num_rows()*
this->num_columns()*
sizeof(
T)
64 for (
int i = 0; i < this->num_rows(); ++i)
65 for (
int j = 0;
j < this->num_columns(); ++
j)
66 this->a_no_check(i,
j) = a.a_no_check(i,
j);
73 if (this->num_rows() != a.num_rows() ||
this->num_columns() != a.num_columns())
74 resize(a.num_rows(), a.num_columns(), 0);
101 if (!this->p_sub_matrix &&
new_cols == this->num_columns() &&
new_rows != this->num_rows())
108 ((
char *)this->p_memory)[
q] = ((
char *)
old_vals)[
q];
114 if (*this->def_val == 0)
117 ((
char *)(this->p_memory +
copy_r*this->p_row_step))[
q] = 0;
123 this->a_no_check(i,
j) = *this->def_val;
127 else if (!this->p_sub_matrix)
145 this->a_no_check(i,
j) = *this->def_val;
149 if (*this->def_val == 0)
152 ((
char *)(this->p_memory +
copy_r*this->p_row_step))[
q] = 0;
158 this->a_no_check(i,
j) = *this->def_val;
void resize(int rows, int cols, int set=1)
void resize(int rows, int cols, int set=1)
resize matrix
EST_TSimpleMatrix(void)
default constructor
void copy(const EST_TSimpleMatrix< T > &a)
copy one matrix into another
EST_TSimpleMatrix< T > & operator=(const EST_TSimpleMatrix< T > &s)
assignment operator