abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
sparse.h File Reference

Go to the source code of this file.

Data Structures

struct  sm_element_struct
 
struct  sm_row_struct
 
struct  sm_col_struct
 
struct  sm_matrix_struct
 

Macros

#define sm_get_col(A, colnum)
 
#define sm_get_row(A, rownum)
 
#define sm_foreach_row(A, prow)   for(prow = A->first_row; prow != 0; prow = prow->next_row)
 
#define sm_foreach_col(A, pcol)   for(pcol = A->first_col; pcol != 0; pcol = pcol->next_col)
 
#define sm_foreach_row_element(prow, p)   for(p = prow->first_col; p != 0; p = p->next_col)
 
#define sm_foreach_col_element(pcol, p)   for(p = pcol->first_row; p != 0; p = p->next_row)
 
#define sm_put(x, val)   (x->user_word = (char *) val)
 
#define sm_get(type, x)   ((type) (x->user_word))
 

Typedefs

typedef
typedefABC_NAMESPACE_HEADER_START
struct sm_element_struct 
sm_element
 
typedef struct sm_row_struct sm_row
 
typedef struct sm_col_struct sm_col
 
typedef struct sm_matrix_struct sm_matrix
 

Functions

sm_matrixsm_alloc ()
 
sm_matrixsm_alloc_size ()
 
sm_matrixsm_dup ()
 
void sm_free ()
 
void sm_delrow ()
 
void sm_delcol ()
 
void sm_resize ()
 
void sm_write ()
 
void sm_print ()
 
void sm_dump ()
 
void sm_cleanup ()
 
void sm_copy_row ()
 
void sm_copy_col ()
 
void sm_remove ()
 
void sm_remove_element ()
 
sm_elementsm_insert ()
 
sm_elementsm_find ()
 
sm_rowsm_longest_row ()
 
sm_colsm_longest_col ()
 
int sm_read ()
 
int sm_read_compressed ()
 
sm_rowsm_row_alloc ()
 
sm_rowsm_row_dup ()
 
sm_rowsm_row_and ()
 
void sm_row_free ()
 
void sm_row_remove ()
 
void sm_row_print ()
 
sm_elementsm_row_insert ()
 
sm_elementsm_row_find ()
 
int sm_row_contains ()
 
int sm_row_intersects ()
 
int sm_row_compare ()
 
int sm_row_hash ()
 
sm_colsm_col_alloc ()
 
sm_colsm_col_dup ()
 
sm_colsm_col_and ()
 
void sm_col_free ()
 
void sm_col_remove ()
 
void sm_col_print ()
 
sm_elementsm_col_insert ()
 
sm_elementsm_col_find ()
 
int sm_col_contains ()
 
int sm_col_intersects ()
 
int sm_col_compare ()
 
int sm_col_hash ()
 
int sm_row_dominance ()
 
int sm_col_dominance ()
 
int sm_block_partition ()
 

Macro Definition Documentation

#define sm_foreach_col (   A,
  pcol 
)    for(pcol = A->first_col; pcol != 0; pcol = pcol->next_col)

Definition at line 100 of file sparse.h.

#define sm_foreach_col_element (   pcol,
  p 
)    for(p = pcol->first_row; p != 0; p = p->next_row)

Definition at line 106 of file sparse.h.

#define sm_foreach_row (   A,
  prow 
)    for(prow = A->first_row; prow != 0; prow = prow->next_row)

Definition at line 97 of file sparse.h.

#define sm_foreach_row_element (   prow,
  p 
)    for(p = prow->first_col; p != 0; p = p->next_col)

Definition at line 103 of file sparse.h.

#define sm_get (   type,
 
)    ((type) (x->user_word))

Definition at line 112 of file sparse.h.

#define sm_get_col (   A,
  colnum 
)
Value:
(((colnum) >= 0 && (colnum) < (A)->cols_size) ? \
(A)->cols[colnum] : (sm_col *) 0)

Definition at line 89 of file sparse.h.

#define sm_get_row (   A,
  rownum 
)
Value:
(((rownum) >= 0 && (rownum) < (A)->rows_size) ? \
(A)->rows[rownum] : (sm_row *) 0)

Definition at line 93 of file sparse.h.

#define sm_put (   x,
  val 
)    (x->user_word = (char *) val)

Definition at line 109 of file sparse.h.

Typedef Documentation

typedef struct sm_col_struct sm_col

Definition at line 23 of file sparse.h.

typedef typedefABC_NAMESPACE_HEADER_START struct sm_element_struct sm_element

Definition at line 21 of file sparse.h.

typedef struct sm_matrix_struct sm_matrix

Definition at line 24 of file sparse.h.

typedef struct sm_row_struct sm_row

Definition at line 22 of file sparse.h.

Function Documentation

sm_matrix* sm_alloc ( )
sm_matrix * sm_alloc_size ( )
int sm_block_partition ( )
void sm_cleanup ( )

Definition at line 552 of file matrix.c.

553 {
554 #ifdef FAST_AND_LOOSE
555  register sm_element *p, *pnext;
556  register sm_row *prow, *pnextrow;
557  register sm_col *pcol, *pnextcol;
558 
559  for(p = sm_element_freelist; p != 0; p = pnext) {
560  pnext = p->next_col;
561  FREE(p);
562  }
563  sm_element_freelist = 0;
564 
565  for(prow = sm_row_freelist; prow != 0; prow = pnextrow) {
566  pnextrow = prow->next_row;
567  FREE(prow);
568  }
569  sm_row_freelist = 0;
570 
571  for(pcol = sm_col_freelist; pcol != 0; pcol = pnextcol) {
572  pnextcol = pcol->next_col;
573  FREE(pcol);
574  }
575  sm_col_freelist = 0;
576 #endif
577 }
sm_row * next_row
Definition: sparse.h:50
static Llb_Mgr_t * p
Definition: llb3Image.c:950
sm_col * next_col
Definition: sparse.h:65
#define FREE(obj)
Definition: avl.h:31
typedefABC_NAMESPACE_HEADER_START struct sm_element_struct sm_element
Definition: sparse.h:21
sm_col* sm_col_alloc ( )
sm_col * sm_col_and ( )
int sm_col_compare ( )
int sm_col_contains ( )
int sm_col_dominance ( )
sm_col * sm_col_dup ( )
sm_element * sm_col_find ( )
void sm_col_free ( )
int sm_col_hash ( )
sm_element* sm_col_insert ( )
int sm_col_intersects ( )
void sm_col_print ( )
void sm_col_remove ( )
void sm_copy_col ( )
void sm_copy_row ( )
void sm_delcol ( )
void sm_delrow ( )
void sm_dump ( )
sm_matrix * sm_dup ( )
sm_element * sm_find ( )
void sm_free ( )
sm_element* sm_insert ( )
sm_col* sm_longest_col ( )
sm_row* sm_longest_row ( )
void sm_print ( )
int sm_read ( )
int sm_read_compressed ( )
void sm_remove ( )
void sm_remove_element ( )
void sm_resize ( )
sm_row* sm_row_alloc ( )
sm_row * sm_row_and ( )
int sm_row_compare ( )
int sm_row_contains ( )
int sm_row_dominance ( )
sm_row * sm_row_dup ( )
sm_element * sm_row_find ( )
void sm_row_free ( )
int sm_row_hash ( )
sm_element* sm_row_insert ( )
int sm_row_intersects ( )
void sm_row_print ( )
void sm_row_remove ( )
void sm_write ( )