src/sparse/sparse.h File Reference

#include "util.h"
Include dependency graph for sparse.h:
This graph shows which files directly or indirectly include this file:

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

Defines

#define sm_alloc   sm_allocate
#define sm_free   sm_free_space
#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 == 0) ? 0 : prow->first_col; p != 0; p = p->next_col)
#define sm_foreach_col_element(pcol, p)   for(p = (pcol == 0) ? 0 : 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 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

EXTERN sm_matrix *sm_allocate ARGS ((void))
EXTERN sm_matrix *sm_alloc_size ARGS ((int, int))
EXTERN void sm_free_space ARGS ((sm_matrix *))
EXTERN void sm_resize ARGS ((sm_matrix *, int, int))
EXTERN void sm_remove_element ARGS ((sm_matrix *, sm_element *))
EXTERN void sm_delrow ARGS ((sm_matrix *, int))
EXTERN void sm_copy_row ARGS ((sm_matrix *, int, sm_row *))
EXTERN void sm_copy_col ARGS ((sm_matrix *, int, sm_col *))
EXTERN int sm_read ARGS ((FILE *, sm_matrix **))
EXTERN void sm_write ARGS ((FILE *, sm_matrix *))
EXTERN void sm_dump ARGS ((sm_matrix *, char *, int))
EXTERN void sm_col_free ARGS ((sm_col *))
EXTERN sm_element *sm_col_insert ARGS ((sm_col *, int))
EXTERN int sm_col_contains ARGS ((sm_col *, sm_col *))
EXTERN void sm_col_remove_element ARGS ((sm_col *, sm_element *))
EXTERN void sm_col_print ARGS ((FILE *, sm_col *))
EXTERN void sm_row_free ARGS ((sm_row *))
EXTERN sm_element *sm_row_insert ARGS ((sm_row *, int))
EXTERN int sm_row_contains ARGS ((sm_row *, sm_row *))
EXTERN void sm_row_remove_element ARGS ((sm_row *, sm_element *))
EXTERN void sm_row_print ARGS ((FILE *, sm_row *))

Define Documentation

#define sm_alloc   sm_allocate

Definition at line 7 of file sparse.h.

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

Definition at line 93 of file sparse.h.

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

Definition at line 99 of file sparse.h.

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

Definition at line 90 of file sparse.h.

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

Definition at line 96 of file sparse.h.

#define sm_free   sm_free_space

Definition at line 8 of file sparse.h.

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

Definition at line 105 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 82 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 86 of file sparse.h.

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

Definition at line 102 of file sparse.h.


Typedef Documentation

typedef struct sm_col_struct sm_col

Definition at line 16 of file sparse.h.

typedef struct sm_element_struct sm_element

Definition at line 14 of file sparse.h.

typedef struct sm_matrix_struct sm_matrix

Definition at line 17 of file sparse.h.

typedef struct sm_row_struct sm_row

Definition at line 15 of file sparse.h.


Function Documentation

EXTERN void sm_row_print ARGS ( (FILE *, sm_row *)   ) 
EXTERN void sm_row_remove_element ARGS ( (sm_row *, sm_element *)   ) 
EXTERN sm_row *sm_row_and ARGS ( (sm_row *, sm_row *)   ) 
EXTERN int sm_row_hash ARGS ( (sm_row *, int)   ) 
EXTERN sm_row *sm_row_dup ARGS ( (sm_row *)   ) 
EXTERN void sm_col_print ARGS ( (FILE *, sm_col *)   ) 
EXTERN void sm_col_remove_element ARGS ( (sm_col *, sm_element *)   ) 
EXTERN sm_col *sm_col_and ARGS ( (sm_col *, sm_col *)   ) 
EXTERN int sm_col_hash ARGS ( (sm_col *, int)   ) 
EXTERN sm_col *sm_col_dup ARGS ( (sm_col *)   ) 
EXTERN void sm_dump ARGS ( (sm_matrix *, char *, int)   ) 
EXTERN void sm_print ARGS ( (FILE *, sm_matrix *)   ) 
EXTERN int sm_read_compressed ARGS ( (FILE *, sm_matrix **)   ) 
EXTERN void sm_copy_col ARGS ( (sm_matrix *, int, sm_col *)   ) 
EXTERN void sm_copy_row ARGS ( (sm_matrix *, int, sm_row *)   ) 
EXTERN void sm_delcol ARGS ( (sm_matrix *, int)   ) 
EXTERN void sm_remove_element ARGS ( (sm_matrix *, sm_element *)   ) 
EXTERN void sm_remove ARGS ( (sm_matrix *, int, int)   ) 
EXTERN int sm_num_elements ARGS ( (sm_matrix *)   ) 
EXTERN sm_matrix* sm_alloc_size ARGS ( (int, int)   ) 
EXTERN sm_matrix* sm_allocate ARGS ( (void)   ) 

Generated on Tue Jan 12 13:57:28 2010 for glu-2.2 by  doxygen 1.6.1