/[ascend]/trunk/base/generic/solver/mtx_perms.h
ViewVC logotype

Diff of /trunk/base/generic/solver/mtx_perms.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 11 by aw0a, Sat Nov 13 16:45:56 2004 UTC revision 33 by ben.allan, Sun Dec 26 20:06:01 2004 UTC
# Line 1  Line 1 
1  /*  /**<
2   *  mtx: Ascend Sparse Matrix Package   *  mtx: Ascend Sparse Matrix Package
3   *  by Benjamin Andrew Allan   *  by Benjamin Andrew Allan
4   *  Derived from mtx by Karl Michael Westerberg   *  Derived from mtx by Karl Michael Westerberg
# Line 29  Line 29 
29   */   */
30  #ifndef __MTX_PERMS_H_SEEN__  #ifndef __MTX_PERMS_H_SEEN__
31  #define __MTX_PERMS_H_SEEN__  #define __MTX_PERMS_H_SEEN__
32  /* requires #include "mtx.h" */  /**< requires #include "mtx.h" */
33    
34    
35  /* the following block_perm functions are not yet implemented: this is  /**< the following block_perm functions are not yet implemented: this is
36  the software spec. 5/3/95 baa. */  the software spec. 5/3/95 baa. */
37    
38  extern mtx_block_perm_t mtx_create_block_perm(mtx_matrix_t);  extern mtx_block_perm_t mtx_create_block_perm(mtx_matrix_t);
39  /**  /**<
40   ***  bp = mtx_create_block_perm(mtx);   ***  bp = mtx_create_block_perm(mtx);
41   ***  mtx_matrix_t mtx;   ***  mtx_matrix_t mtx;
42   ***  mtx_block_perm_t bp;   ***  mtx_block_perm_t bp;
# Line 58  extern mtx_block_perm_t mtx_create_block Line 58  extern mtx_block_perm_t mtx_create_block
58    
59  extern int              mtx_update_block_perm(mtx_matrix_t,  extern int              mtx_update_block_perm(mtx_matrix_t,
60                                                int32, mtx_block_perm_t);                                                int32, mtx_block_perm_t);
61  /**  /**<
62   ***  mtx_update_block_perm(mtx,bnum,bperm);   ***  mtx_update_block_perm(mtx,bnum,bperm);
63   ***  mtx_matrix_t mtx;   ***  mtx_matrix_t mtx;
64   ***  int32 bnum;   ***  int32 bnum;
# Line 90  extern int              mtx_update_block Line 90  extern int              mtx_update_block
90    
91  extern int              mtx_restore_block_perm(mtx_matrix_t, int32,  extern int              mtx_restore_block_perm(mtx_matrix_t, int32,
92                                                 mtx_block_perm_t);                                                 mtx_block_perm_t);
93  /**  /**<
94   ***  mtx_restore_block_perm(mtx,bnum,bperm);   ***  mtx_restore_block_perm(mtx,bnum,bperm);
95   ***  mtx_matrix_t mtx;   ***  mtx_matrix_t mtx;
96   ***  int32 bnum;   ***  int32 bnum;
# Line 126  extern int              mtx_restore_bloc Line 126  extern int              mtx_restore_bloc
126   **/   **/
127    
128  extern int              mtx_destroy_block_perm(mtx_block_perm_t);  extern int              mtx_destroy_block_perm(mtx_block_perm_t);
129  /**  /**<
130   ***  mtx_destroy_block_perm(bperm);   ***  mtx_destroy_block_perm(bperm);
131   ***  mtx_block_perm_t bperm;   ***  mtx_block_perm_t bperm;
132   ***   ***
# Line 137  extern int              mtx_destroy_bloc Line 137  extern int              mtx_destroy_bloc
137   **/   **/
138    
139  extern size_t           mtx_block_perm_size(mtx_block_perm_t);  extern size_t           mtx_block_perm_size(mtx_block_perm_t);
140  /**  /**<
141   ***  mtx_block_perm_size(bperm);   ***  mtx_block_perm_size(bperm);
142   ***  mtx_block_perm_t bperm;   ***  mtx_block_perm_t bperm;
143   ***   ***
# Line 145  extern size_t           mtx_block_perm_s Line 145  extern size_t           mtx_block_perm_s
145   ***  the mtx_block_perm_t. Bytes as usual.   ***  the mtx_block_perm_t. Bytes as usual.
146   **/   **/
147    
148  /* end block_perm functions */  /**< end block_perm functions */
149    
150  /***********************************************************************\  /***********************************************************************\
151    mtx permutation and permutation info routines    mtx permutation and permutation info routines
# Line 155  extern void         mtx_swap_cols(mtx_ma Line 155  extern void         mtx_swap_cols(mtx_ma
155  extern void         mtx_drag(mtx_matrix_t, int32, int32);  extern void         mtx_drag(mtx_matrix_t, int32, int32);
156  extern void         mtx_reverse_diagonal(mtx_matrix_t,  extern void         mtx_reverse_diagonal(mtx_matrix_t,
157                                           int32, int32);                                           int32, int32);
158  /**  /**<
159   -$-  mtx_swap_rows(matrix,row1,row2)   -$-  mtx_swap_rows(matrix,row1,row2)
160   -$-  mtx_swap_cols(matrix,col1,col2)   -$-  mtx_swap_cols(matrix,col1,col2)
161   -$-  mtx_drag(matrix,d1,d2)   -$-  mtx_drag(matrix,d1,d2)
# Line 201  extern int32  mtx_row_to_org(mtx_matrix_ Line 201  extern int32  mtx_row_to_org(mtx_matrix_
201  extern int32  mtx_col_to_org(mtx_matrix_t, int32);  extern int32  mtx_col_to_org(mtx_matrix_t, int32);
202  extern int32  mtx_org_to_row(mtx_matrix_t, int32);  extern int32  mtx_org_to_row(mtx_matrix_t, int32);
203  extern int32  mtx_org_to_col(mtx_matrix_t, int32);  extern int32  mtx_org_to_col(mtx_matrix_t, int32);
204  /**  /**<
205   -$-  org_row = mtx_row_to_org(matrix,row)   -$-  org_row = mtx_row_to_org(matrix,row)
206   -$-  org_col = mtx_col_to_org(matrix,col)   -$-  org_col = mtx_col_to_org(matrix,col)
207   -$-  row = mtx_org_to_row(matrix,org_row)   -$-  row = mtx_org_to_row(matrix,org_row)
# Line 218  extern int32  mtx_org_to_col(mtx_matrix_ Line 218  extern int32  mtx_org_to_col(mtx_matrix_
218    
219  extern boolean      mtx_row_parity(mtx_matrix_t);  extern boolean      mtx_row_parity(mtx_matrix_t);
220  extern boolean      mtx_col_parity(mtx_matrix_t);  extern boolean      mtx_col_parity(mtx_matrix_t);
221  /**  /**<
222   -$-  parity = mtx_row_parity(matrix)   -$-  parity = mtx_row_parity(matrix)
223   -$-  parity = mtx_col_parity(matrix)   -$-  parity = mtx_col_parity(matrix)
224   ***  boolean parity;   ***  boolean parity;
# Line 236  extern boolean      mtx_col_parity(mtx_m Line 236  extern boolean      mtx_col_parity(mtx_m
236  \***********************************************************************/  \***********************************************************************/
237    
238  extern int  mtx_output_assign_region(mtx_matrix_t, mtx_region_t *,int *);  extern int  mtx_output_assign_region(mtx_matrix_t, mtx_region_t *,int *);
239  /**  /**<
240   ***  int rank = mtx_output_assign_region(matrix,region,orphaned_rows)   ***  int rank = mtx_output_assign_region(matrix,region,orphaned_rows)
241   ***  mtx_matrix_t matrix;   ***  mtx_matrix_t matrix;
242   ***  mtx_region_t *reg;   ***  mtx_region_t *reg;
# Line 259  extern int mtx_output_assign_region(mtx_ Line 259  extern int mtx_output_assign_region(mtx_
259    
260    
261  extern void mtx_output_assign(mtx_matrix_t, int32, int32);  extern void mtx_output_assign(mtx_matrix_t, int32, int32);
262  /**  /**<
263   ***  mtx_output_assign(matrix,hirow,hicol)   ***  mtx_output_assign(matrix,hirow,hicol)
264   ***  mtx_matrix_t matrix;   ***  mtx_matrix_t matrix;
265   ***  int32 hirow,hicol;   ***  int32 hirow,hicol;
# Line 296  extern void    mtx_output_assign(mtx_matrix Line 296  extern void    mtx_output_assign(mtx_matrix
296   **/   **/
297    
298  extern boolean      mtx_output_assigned(mtx_matrix_t);  extern boolean      mtx_output_assigned(mtx_matrix_t);
299  /**  /**<
300   ***  symbolic_rank_exists = mtx_output_assigned(matrix)   ***  symbolic_rank_exists = mtx_output_assigned(matrix)
301   ***  boolean symbolic_rank_exists;   ***  boolean symbolic_rank_exists;
302   ***  mtx_matrix_t matrix;   ***  mtx_matrix_t matrix;
# Line 308  extern boolean      mtx_output_assigned( Line 308  extern boolean      mtx_output_assigned(
308   **/   **/
309    
310  extern int32  mtx_symbolic_rank(mtx_matrix_t);  extern int32  mtx_symbolic_rank(mtx_matrix_t);
311  /**  /**<
312   ***  symbolic_rank = mtx_symbolic_rank(matrix)   ***  symbolic_rank = mtx_symbolic_rank(matrix)
313   ***  int32 symbolic_rank;   ***  int32 symbolic_rank;
314   ***  mtx_matrix_t matrix;   ***  mtx_matrix_t matrix;
# Line 321  extern int32  mtx_symbolic_rank(mtx_matr Line 321  extern int32  mtx_symbolic_rank(mtx_matr
321   **/   **/
322            
323  extern void mtx_set_symbolic_rank(mtx_matrix_t, int32);  extern void mtx_set_symbolic_rank(mtx_matrix_t, int32);
324  /**  /**<
325   ***  mtx_symbolic_rank(matrix,rank)   ***  mtx_symbolic_rank(matrix,rank)
326   ***  int32 rank;   ***  int32 rank;
327   ***  mtx_matrix_t matrix;   ***  mtx_matrix_t matrix;
# Line 333  extern void mtx_set_symbolic_rank(mtx_ma Line 333  extern void mtx_set_symbolic_rank(mtx_ma
333            
334  extern boolean      mtx_make_col_independent(mtx_matrix_t,int32,  extern boolean      mtx_make_col_independent(mtx_matrix_t,int32,
335                                               mtx_range_t *);                                               mtx_range_t *);
336  /**  /**<
337   ***  swapped = mtx_make_col_independent(matrix,col,rng)   ***  swapped = mtx_make_col_independent(matrix,col,rng)
338   ***  boolean swapped;   ***  boolean swapped;
339   ***  mtx_matrix_t matrix;   ***  mtx_matrix_t matrix;
# Line 352  extern boolean      mtx_make_col_indepen Line 352  extern boolean      mtx_make_col_indepen
352    
353    
354  extern void         mtx_org_permute(mtx_matrix_t, mtx_region_t *);  extern void         mtx_org_permute(mtx_matrix_t, mtx_region_t *);
355  /**  /**<
356   ***  mtx_org_permute(mtx,region);   ***  mtx_org_permute(mtx,region);
357   ***  mtx_matrix_t matrix;   ***  mtx_matrix_t matrix;
358   ***  mtx_region_t *region.   ***  mtx_region_t *region.
# Line 368  extern void         mtx_org_permute(mtx_ Line 368  extern void         mtx_org_permute(mtx_
368   **/   **/
369    
370  extern int32 mtx_full_diagonal(mtx_matrix_t, mtx_range_t *, int);  extern int32 mtx_full_diagonal(mtx_matrix_t, mtx_range_t *, int);
371  /**  /**<
372   ***  mtx_full_diagonal(mtx,rng,noisy);   ***  mtx_full_diagonal(mtx,rng,noisy);
373   ***   ***
374   ***  This function checks the diagonal for holes. If symbolic_rank is   ***  This function checks the diagonal for holes. If symbolic_rank is
# Line 382  extern int32 mtx_full_diagonal(mtx_matri Line 382  extern int32 mtx_full_diagonal(mtx_matri
382   **/   **/
383    
384  extern int32 mtx_transpose(mtx_matrix_t);  extern int32 mtx_transpose(mtx_matrix_t);
385  /**  /**<
386   *** mtx_transpose(mtx);   *** mtx_transpose(mtx);
387   *** Transposes everything about the matrix. The user is   *** Transposes everything about the matrix. The user is
388   *** responsible for keeping track of the change in the semantics   *** responsible for keeping track of the change in the semantics
# Line 397  extern int32 mtx_transpose(mtx_matrix_t) Line 397  extern int32 mtx_transpose(mtx_matrix_t)
397   **/   **/
398    
399  extern int32 mtx_isa_transpose(mtx_matrix_t);  extern int32 mtx_isa_transpose(mtx_matrix_t);
400  /**  /**<
401   *** mtx_isa_transpose(mtx);   *** mtx_isa_transpose(mtx);
402   *** Returns 1 if the matrix is transposed from another and 0 if not.   *** Returns 1 if the matrix is transposed from another and 0 if not.
403   *** Calling mtx_transpose twice yields a mtx which responds with 0.   *** Calling mtx_transpose twice yields a mtx which responds with 0.
# Line 410  extern int32 mtx_isa_transpose(mtx_matri Line 410  extern int32 mtx_isa_transpose(mtx_matri
410  \***********************************************************************/  \***********************************************************************/
411    
412  extern mtx_block_t  *mtx_block_partition(mtx_matrix_t, mtx_region_t *);  extern mtx_block_t  *mtx_block_partition(mtx_matrix_t, mtx_region_t *);
413  /**  /**<
414   ***  mtx_partition(mtx,reg);   ***  mtx_partition(mtx,reg);
415   ***  mtx_matrix_t matrix;   ***  mtx_matrix_t matrix;
416   ***  mtx_region_t *reg.   ***  mtx_region_t *reg.
# Line 436  extern mtx_block_t  *mtx_block_partition Line 436  extern mtx_block_t  *mtx_block_partition
436  \***********************************************************************/  \***********************************************************************/
437    
438  extern void         mtx_partition(mtx_matrix_t);  extern void         mtx_partition(mtx_matrix_t);
439  /**  /**<
440   ***  mtx_partition(matrix);   ***  mtx_partition(matrix);
441   ***  mtx_matrix_t matrix;   ***  mtx_matrix_t matrix;
442   ***   ***
# Line 448  extern void         mtx_partition(mtx_ma Line 448  extern void         mtx_partition(mtx_ma
448   **/   **/
449    
450  extern void         mtx_ut_partition(mtx_matrix_t);  extern void         mtx_ut_partition(mtx_matrix_t);
451  /**  /**<
452   ***  mtx_ut_partition(matrix);   ***  mtx_ut_partition(matrix);
453   ***  mtx_matrix_t matrix;   ***  mtx_matrix_t matrix;
454   ***   ***
# Line 460  extern void         mtx_ut_partition(mtx Line 460  extern void         mtx_ut_partition(mtx
460   **/   **/
461    
462  extern boolean      mtx_check_blocks(mtx_matrix_t);  extern boolean      mtx_check_blocks(mtx_matrix_t);
463  /**  /**<
464   ***  valid = mtx_check_blocks(matrix)   ***  valid = mtx_check_blocks(matrix)
465   ***  boolean valid;   ***  boolean valid;
466   ***  mtx_matrix_t matrix;   ***  mtx_matrix_t matrix;
# Line 474  extern boolean      mtx_check_blocks(mtx Line 474  extern boolean      mtx_check_blocks(mtx
474   **/   **/
475    
476  extern int32  mtx_number_of_blocks(mtx_matrix_t);  extern int32  mtx_number_of_blocks(mtx_matrix_t);
477  /**  /**<
478   ***   ***
479   -$-  nblocks = mtx_number_of_blocks(matrix)   -$-  nblocks = mtx_number_of_blocks(matrix)
480   ***  int32 nblocks;   ***  int32 nblocks;
# Line 490  extern int32  mtx_number_of_blocks(mtx_m Line 490  extern int32  mtx_number_of_blocks(mtx_m
490   **/   **/
491    
492  extern int32  mtx_block(mtx_matrix_t,int32, mtx_region_t *);  extern int32  mtx_block(mtx_matrix_t,int32, mtx_region_t *);
493  /**  /**<
494   ***  bndx = mtx_block(matrix,block_number,block)   ***  bndx = mtx_block(matrix,block_number,block)
495   ***  mtx_matrix_t matrix;   ***  mtx_matrix_t matrix;
496   ***  int32 block_number;   ***  int32 block_number;
# Line 511  extern int32  mtx_block_containing_row(m Line 511  extern int32  mtx_block_containing_row(m
511                                                         mtx_region_t *);                                                         mtx_region_t *);
512  extern int32  mtx_block_containing_col(mtx_matrix_t,int32,  extern int32  mtx_block_containing_col(mtx_matrix_t,int32,
513                                                         mtx_region_t *);                                                         mtx_region_t *);
514  /**  /**<
515   ***  block_number = mtx_block_containing_row(matrix,row,block)   ***  block_number = mtx_block_containing_row(matrix,row,block)
516   ***  block_number = mtx_block_containing_col(matrix,col,block)   ***  block_number = mtx_block_containing_col(matrix,col,block)
517   ***  int32 block_number;   ***  int32 block_number;
# Line 527  extern int32  mtx_block_containing_col(m Line 527  extern int32  mtx_block_containing_col(m
527   ***  Calls on slaves are passed up to the master matrix.   ***  Calls on slaves are passed up to the master matrix.
528   **/   **/
529    
530  #endif /* __MTX_PERMS_H_SEEN__ */  #endif /**< __MTX_PERMS_H_SEEN__ */

Legend:
Removed from v.11  
changed lines
  Added in v.33

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22