307 |
int32 org_row, |
int32 org_row, |
308 |
int32 org_col); |
int32 org_col); |
309 |
/**< |
/**< |
|
*** <!-- mtx_find_element(mtx,org_row,org_col) --> |
|
|
*** <!-- mtx_matrix_t mtx; --> |
|
|
*** <!-- int32 org_row; --> |
|
|
*** <!-- int32 org_col; --> |
|
|
*** |
|
310 |
*** Searches for a given element of the matrix and returns a pointer to it |
*** Searches for a given element of the matrix and returns a pointer to it |
311 |
*** if it exists, or NULL if it doesn't exist. |
*** if it exists, or NULL if it doesn't exist. |
312 |
*** It is *ASSUMED* that org_row |
*** It is *ASSUMED* that org_row |
317 |
int32 org_row, |
int32 org_row, |
318 |
int32 org_col); |
int32 org_col); |
319 |
/**< |
/**< |
|
*** <!-- mtx_create_element(mtx,org_row,org_col); --> |
|
|
*** <!-- mtx_matrix_t mtx; --> |
|
|
*** <!-- int32 org_row; --> |
|
|
*** <!-- int32 org_col; --> |
|
320 |
*** Creates the given element and returns a pointer to it. The value is |
*** Creates the given element and returns a pointer to it. The value is |
321 |
*** initially zero. |
*** initially zero. |
322 |
*** It is *ASSUMED* that org_row |
*** It is *ASSUMED* that org_row |
330 |
int32 org_col, |
int32 org_col, |
331 |
real64 val); |
real64 val); |
332 |
/**< |
/**< |
|
*** <!-- mtx_create_element_value(mtx,org_row,org_col,val); --> |
|
|
*** <!-- mtx_matrix_t mtx; --> |
|
|
*** <!-- int32 org_row; --> |
|
|
*** <!-- int32 org_col; --> |
|
|
*** <!-- real64 val; --> |
|
333 |
*** Creates the given element and returns a pointer to it. The value is |
*** Creates the given element and returns a pointer to it. The value is |
334 |
*** initialzed to val. |
*** initialzed to val. |
335 |
*** It is *ASSUMED* that org_row |
*** It is *ASSUMED* that org_row |
346 |
mtx_range_t *rng, |
mtx_range_t *rng, |
347 |
int32 *tocur); |
int32 *tocur); |
348 |
/**< |
/**< |
|
*** <!-- enext = struct element_t *mtx_next_col(elt,rng,tocur); --> |
|
|
*** <!-- struct element_t *elt, *enext; --> |
|
|
*** <!-- mtx_range_t *rng; --> |
|
|
*** <!-- int32 *tocur; --> |
|
|
*** |
|
349 |
*** Returns the next element after elt that is in the range |
*** Returns the next element after elt that is in the range |
350 |
*** rng according to the permutation vector tocur given. May return NULL. |
*** rng according to the permutation vector tocur given. May return NULL. |
351 |
**/ |
**/ |
354 |
mtx_range_t *rng, |
mtx_range_t *rng, |
355 |
int32 *tocur); |
int32 *tocur); |
356 |
/**< |
/**< |
|
*** <!-- enext = struct element_t *mtx_next_row(elt,rng,tocur); --> |
|
|
*** <!-- struct element_t *elt, *enext; --> |
|
|
*** <!-- mtx_range_t *rng; --> |
|
|
*** <!-- int32 *tocur; --> |
|
|
*** |
|
357 |
*** Returns the next element after elt that is in the range |
*** Returns the next element after elt that is in the range |
358 |
*** rng according to the permutation vector tocur given. May return NULL. |
*** rng according to the permutation vector tocur given. May return NULL. |
359 |
**/ |
**/ |
363 |
\* ************************************************************************ */ |
\* ************************************************************************ */ |
364 |
extern int32 *mtx_alloc_perm(int32 cap); |
extern int32 *mtx_alloc_perm(int32 cap); |
365 |
/**< |
/**< |
|
*** <!-- p = mtx_alloc_perm(cap); --> |
|
|
*** <!-- int32 cap, *p; --> |
|
366 |
*** Allocates a permutation vector. The user need |
*** Allocates a permutation vector. The user need |
367 |
*** not concern himself with the -1st element, which does exist. |
*** not concern himself with the -1st element, which does exist. |
368 |
**/ |
**/ |
369 |
|
|
370 |
extern void mtx_copy_perm(int32 *tarperm, int32 *srcperm, int32 cap); |
extern void mtx_copy_perm(int32 *tarperm, int32 *srcperm, int32 cap); |
371 |
/**< |
/**< |
|
*** <!-- mtx_copy_perm(tarperm,srcperm,cap) --> |
|
|
*** <!-- int32 *tarperm; --> |
|
|
*** <!-- int32 *srcperm; --> |
|
|
*** <!-- int32 cap; --> |
|
372 |
*** Copies srcperm to tarperm given the capacity of srcperm. |
*** Copies srcperm to tarperm given the capacity of srcperm. |
373 |
*** If tarperm was obtained from alloc_perm(), the -1 has already been copied. |
*** If tarperm was obtained from alloc_perm(), the -1 has already been copied. |
374 |
**/ |
**/ |
375 |
|
|
376 |
extern void mtx_free_perm(int32 *perm); |
extern void mtx_free_perm(int32 *perm); |
377 |
/**< |
/**< |
|
*** <!-- mtx_free_perm(perm); --> |
|
|
*** <!-- int32 *perm; --> |
|
378 |
*** Frees resources used by a permutation vector. |
*** Frees resources used by a permutation vector. |
379 |
**/ |
**/ |
380 |
|
|
606 |
extern void *mtx_null_vector_f(int32 cap, int line, CONST char *file, |
extern void *mtx_null_vector_f(int32 cap, int line, CONST char *file, |
607 |
struct reusable_data_vector *ptr, char *fn); |
struct reusable_data_vector *ptr, char *fn); |
608 |
/**< |
/**< |
|
*** <!-- v = mtx_null_vector_f(cap,line,file, ptr,fn); --> |
|
|
*** <!-- int32 cap; --> |
|
|
*** <!-- int line; --> |
|
|
*** <!-- CONST char *file; --> |
|
|
*** <!-- struct reusable_data_vector *ptr; --> |
|
|
*** <!-- char *fn; --> |
|
|
*** |
|
609 |
*** Implementation function for macros generating vectors of NULL |
*** Implementation function for macros generating vectors of NULL |
610 |
*** elements. This includes: |
*** elements. This includes: |
611 |
*** - mtx_null_vector() |
*** - mtx_null_vector() |
630 |
struct reusable_data_vector *ptr, |
struct reusable_data_vector *ptr, |
631 |
char *fn); |
char *fn); |
632 |
/**< |
/**< |
|
*** <!-- mtx_null_vector_release_f(line,file,ptr,fn); --> |
|
|
*** <!-- int line; --> |
|
|
*** <!-- CONST char *file, --> |
|
|
*** <!-- struct reusable_data_vector *ptr; --> |
|
|
*** <!-- char *fn --> |
|
|
*** |
|
633 |
*** Implementation function for macros releasing reusable vectors. |
*** Implementation function for macros releasing reusable vectors. |
634 |
*** This includes: |
*** This includes: |
635 |
*** - mtx_null_vector_release() |
*** - mtx_null_vector_release() |
657 |
|
|
658 |
extern struct element_t **mtx_expand_row(mtx_matrix_t mtx, int32 orgrow); |
extern struct element_t **mtx_expand_row(mtx_matrix_t mtx, int32 orgrow); |
659 |
/**< |
/**< |
|
*** <!-- buf = mtx_expand_row(mtx,orgrow); --> |
|
|
*** <!-- mtx_matrix_t mtx; --> |
|
|
*** <!-- int32 orgrow; --> |
|
|
*** <!-- struct element_t **buf; --> |
|
|
*** |
|
660 |
*** Expands the given row into an array of pointers, indexed on original |
*** Expands the given row into an array of pointers, indexed on original |
661 |
*** col number. The array is obtained from mtx_null_vector(). |
*** col number. The array is obtained from mtx_null_vector(). |
662 |
*** Be sure to call mtx_null_vector_release() when done with the vector and |
*** Be sure to call mtx_null_vector_release() when done with the vector and |
667 |
|
|
668 |
extern struct element_t **mtx_expand_col(mtx_matrix_t mtx, int32 orgcol); |
extern struct element_t **mtx_expand_col(mtx_matrix_t mtx, int32 orgcol); |
669 |
/**< |
/**< |
|
*** <!-- buf = mtx_expand_col(mtx,orgcol); --> |
|
|
*** <!-- mtx_matrix_t mtx; --> |
|
|
*** <!-- int32 orgcol; --> |
|
|
*** <!-- struct element_t **buf; --> |
|
|
*** |
|
670 |
*** Expands the given col into an array of pointers, indexed on original |
*** Expands the given col into an array of pointers, indexed on original |
671 |
*** row number. The array is obtained from mtx_null_vector(). |
*** row number. The array is obtained from mtx_null_vector(). |
672 |
*** Be sure to call mtx_null_vector_release() when done with the vector and |
*** Be sure to call mtx_null_vector_release() when done with the vector and |
679 |
int32 orgrow, |
int32 orgrow, |
680 |
struct element_t **arr); |
struct element_t **arr); |
681 |
/**< |
/**< |
|
*** <!-- mtx_renull_using_row(mtx,orgrow,arr) --> |
|
|
*** <!-- mtx_matrix_t mtx; --> |
|
|
*** <!-- int32 orgrow; --> |
|
|
*** <!-- struct element_t **arr; --> |
|
|
*** |
|
682 |
*** Makes arr NULLed again, assuming that the only non-NULL elements |
*** Makes arr NULLed again, assuming that the only non-NULL elements |
683 |
*** must correspond to original col numbers that exist in the given |
*** must correspond to original col numbers that exist in the given |
684 |
*** orgrow. |
*** orgrow. |
688 |
int32 orgcol, |
int32 orgcol, |
689 |
struct element_t **arr); |
struct element_t **arr); |
690 |
/**< |
/**< |
|
*** <!-- mtx_renull_using_row(mtx,orgcol,arr); --> |
|
|
*** <!-- mtx_matrix_t mtx; --> |
|
|
*** <!-- int32 orgcol; --> |
|
|
*** <!-- struct element_t **arr; --> |
|
|
*** |
|
691 |
*** Makes arr NULLed again, assuming that the only non-NULL elements |
*** Makes arr NULLed again, assuming that the only non-NULL elements |
692 |
*** must correspond to original row numbers that exist in the given |
*** must correspond to original row numbers that exist in the given |
693 |
*** orgcol. |
*** orgcol. |
695 |
|
|
696 |
extern void mtx_renull_all(mtx_matrix_t mtx, struct element_t **arr); |
extern void mtx_renull_all(mtx_matrix_t mtx, struct element_t **arr); |
697 |
/**< |
/**< |
|
*** <!-- mtx_renull_all(mtx,arr); --> |
|
|
*** <!-- mtx_matrix_t mtx; --> |
|
|
*** <!-- struct element_t **arr; --> |
|
|
*** |
|
698 |
*** Makes arr NULLed again, assuming it is size mtx->order. |
*** Makes arr NULLed again, assuming it is size mtx->order. |
699 |
**/ |
**/ |
700 |
|
|