43 #include "EST_TSimpleVector.h"
44 #include "EST_matrix_support.h"
46 #include "EST_cutils.h"
51 if (this->p_column_step==1 && a.p_column_step==1)
54 memcpy((
void *)(this->p_memory), (
const void *)(a.
p_memory), this->n() *
sizeof(T));
71 int old_offset = this->p_offset;
74 this->just_resize(newn, &old_vals);
79 if (this->p_memory != NULL)
81 copy_c = Lof(this->n(), oldn);
82 for (q=0; q<copy_c*
sizeof(T); q++)
83 ((
char *)this->p_memory)[q] = ((
char *)old_vals)[q];
86 for (
int i=copy_c; i < this->n(); ++i)
87 this->p_memory[i] = *this->def_val;
90 if (old_vals != NULL && old_vals != this->p_memory && !this->p_sub_matrix)
91 delete [] (old_vals - old_offset);
100 num = this->num_columns()-offset;
102 if (!EST_vector_bounds_check(num+offset-1, this->num_columns(), FALSE))
105 if (!this->p_sub_matrix && this->p_column_step==1)
107 for (q=0; q<num*
sizeof(T); q++)
108 ((
char *)dest)[q] = ((
char *)(this->p_memory+offset))[q];
111 for(
int i=0; i<num; i++)
112 dest[i] = this->a_no_check(offset+i);
120 num = this->num_columns()-offset;
122 if (!EST_vector_bounds_check(num+offset-1, this->num_columns(), FALSE))
125 if (!this->p_sub_matrix && this->p_column_step==1)
127 for (q=0; q<num*
sizeof(T); q++)
128 ((
char *)(this->p_memory+offset))[q] = ((
char *)(src))[q];
131 for(
int i=0; i<num; i++)
132 this->a_no_check(offset+i) = src[i];
143 if (this->p_column_step==1)
144 memset((
void *)(this->p_memory), 0, this->n() *
sizeof(T));