1 #include <../../nrnconf.h>
33 static char rcsid[] =
"submat.c,v 1.1 1997/12/04 17:55:55 hines Exp";
51 for (
i=0;
i<mat->
m;
i++ )
52 vec->
ve[
i] = mat->
me[
i][col];
72 for (
i=0;
i<mat->
n;
i++ )
91 for (
i=i0;
i<lim;
i++ )
92 mat->
me[
i][col] = vec->
ve[
i];
110 for (
j=j0;
j<lim;
j++ )
122 u_int row1,col1,row2,col2;
128 if ( row1 > row2 || col1 > col2 || row2 >= old->
m || col2 >= old->
n )
130 if (
new==(
MAT *)
NULL || new->
m < row2-row1+1 )
138 (row2-row1+1)*
sizeof(
Real *));
142 new->m = row2-row1+1;
144 new->n = col2-col1+1;
148 for (
i=0;
i <
new->m;
i++ )
149 new->
me[
i] = (old->
me[
i+row1]) + col1;
163 if ( i1 > i2 || old->
dim < i2 )
175 new->dim = i2 - i1 + 1;
176 new->ve = &(old->
ve[i1]);
#define error(err_num, fn_name)
static Object ** v_resize(void *v)
#define mem_bytes(type, old_size, new_size)
VEC * get_col(MAT *mat, u_int col, VEC *vec)
MAT * sub_mat(MAT *old, u_int row1, u_int col1, u_int row2, u_int col2, MAT *new)
MAT * _set_col(MAT *mat, u_int col, VEC *vec, u_int i0)
MAT * _set_row(MAT *mat, u_int row, VEC *vec, u_int j0)
VEC * get_row(MAT *mat, u_int row, VEC *vec)
VEC * sub_vec(VEC *old, int i1, int i2, VEC *new)