43#include "EST_TSimpleVector.h"
44#include "EST_matrix_support.h"
47#include "EST_cutils.h"
54 if (this->p_column_step==1 && a.p_column_step==1)
57 memcpy((
void *)(this->p_memory), (
const void *)(a.
p_memory), this->n() *
sizeof(T));
74 int old_offset = this->p_offset;
77 this->just_resize(newn, &old_vals);
82 if (this->p_memory != NULL)
84 copy_c = Lof(this->n(), oldn);
85 for (q=0; q<copy_c*
sizeof(T); q++)
86 ((
char *)this->p_memory)[q] = ((
char *)old_vals)[q];
89 for (
int i=copy_c; i < this->n(); ++i)
90 this->p_memory[i] = *this->def_val;
93 if (old_vals != NULL && old_vals != this->p_memory && !this->p_sub_matrix)
94 delete [] (old_vals - old_offset);
103 num = this->num_columns()-offset;
105 if (!EST_vector_bounds_check(num+offset-1, this->num_columns(), FALSE))
108 if (!this->p_sub_matrix && this->p_column_step==1)
110 for (q=0; q<num*
sizeof(T); q++)
111 ((
char *)dest)[q] = ((
char *)(this->p_memory+offset))[q];
114 for(
int i=0; i<num; i++)
115 dest[i] = this->a_no_check(offset+i);
123 num = this->num_columns()-offset;
125 if (!EST_vector_bounds_check(num+offset-1, this->num_columns(), FALSE))
128 if (!this->p_sub_matrix && this->p_column_step==1)
130 for (q=0; q<num*
sizeof(T); q++)
131 ((
char *)(this->p_memory+offset))[q] = ((
char *)(src))[q];
134 for(
int i=0; i<num; i++)
135 this->a_no_check(offset+i) = src[i];
146 if (this->p_column_step==1)
147 memset((
void *)(this->p_memory), 0, this->n() *
sizeof(T));
EST_TSimpleVector()
default constructor
void zero(void)
Fill entire array with 0 bits.
void resize(int n, int set=1)
resize vector
EST_TSimpleVector & operator=(const EST_TSimpleVector< T > &s)
assignment operator
INLINE int n() const
number of items in vector.