A sparse matrix solves this problem by only allocating memory for the cells in the full matrix which are actually used. That is, no memory is allocated to represent Alice reporting to Bob unless Alice actually does report to Bob. This is a simple concept, but fairly difficult to implement efficiently--how do you tell if Alice reports to Bob? The solution utilized by this library is to combine the strengths of linked lists and hash tables. Each cell is in two linked lists, rooted at the rows and columns of the matrix, but a hash table is used when attempting to look up a given cell. If the cell is allocated, then there will be an entry in the hash table, and finding the given cell is as fast as a hash table look-up.
Because sparse matrices are so complicated, there are three structures and a variety of operations used. Two of the structures, smat_table_t and smat_head_t, are caller-allocated. However, the third structure, smat_entry_t, must be allocated by the library. To avoid too much overhead from malloc(), a free list is used. The free list may be managed with the smat_cleanup() and smat_freemem() calls.
The smat_table_t contains the hash table. Only one of these need be allocated per type of association--for instance, in the above example, only one smat_table_t needs to be allocated to represent the manager-employee relationship.
The smat_head_t contains the linked list. There are actually two kinds of these structures--one is SMAT_LOC_FIRST, which could be regarded as a ``row,'' and the other is SMAT_LOC_SECOND, which could be regarded as a ``column.'' Which one is used for which type of data is irrelevant, as long as consistency is maintained. For the above example, a smat_head_t for a manager may be SMAT_LOC_FIRST, and one for an employee must then be SMAT_LOC_SECOND. (These values are set when initializing the smat_head_t structure.)
An association may be created with the st_add() function, which allows an arbitrary ordering in the associated linked lists by the same mechanism as for the linked list component of the library. An association may be removed with st_remove(), or looked up with st_find(). If iteration over all associations is desired, use the st_iter() function. Removing all associations from a table may be performed with st_flush(), which optionally calls a user-defined clean-up function. The associated hash table may be resized with st_resize(), and the bucket table may be released with st_free().
An association may also be reordered within the linked lists using the sh_move() function. If a particular entry is desired, use the sh_find() function with a user-defined comparison function to locate it. Iteration may be performed with the sh_iter() function, and all entries in a given linked list may be removed with the sh_flush() function, which again may optionally call a user-defined clean-up function.
Data Structures | |
struct | _smat_table_s |
Sparse matrix table structure. More... | |
struct | _smat_head_s |
Sparse matrix list head structure. More... | |
struct | _smat_entry_s |
Sparse matrix entry structure. More... | |
struct | _sh_find_s |
Sparse matrix head find shim structure. More... | |
struct | _sh_flush_s |
Sparse matrix flush function shim structure. More... | |
struct | _sh_iter_s |
Sparse matrix iteration function shim structure. More... | |
struct | _st_flush_s |
Sparse matrix flush function shim structure. More... | |
struct | _st_iter_s |
Sparse matrix iteration function shim structure. More... | |
Defines | |
#define | _smat_ent(ent) |
Retrieve pointer to sparse matrix entry. | |
#define | SMAT_TABLE_MAGIC |
Sparse matrix table magic number. | |
#define | st_verify(table) |
Sparse matrix table verification macro. | |
#define | st_flags(table) |
Sparse matrix table flags. | |
#define | st_frozen(table) |
Determine if a sparse matrix is frozen. | |
#define | st_modulus(table) |
Sparse matrix table modulus. | |
#define | st_count(table) |
Sparse matrix table count. | |
#define | st_extra(table) |
Extra pointer data in a sparse matrix table. | |
#define | st_size(table) |
Sparse matrix table memory size. | |
#define | SMAT_HEAD_MAGIC |
Sparse matrix list head magic number. | |
#define | SMAT_HEAD_INIT(elem, object) |
Sparse matrix list head static initializer. | |
#define | sh_verify(head) |
Sparse matrix list head verification macro. | |
#define | sh_elem(head) |
Sparse matrix list head element macro. | |
#define | sh_table(head) |
Sparse matrix list head table pointer. | |
#define | sh_frozen(head) |
Determine if a sparse matrix is frozen. | |
#define | sh_count(head) |
Sparse matrix list count. | |
#define | _sh_first(head) |
Access the first element pointer in a smat_head_t. | |
#define | sh_first(head) |
First element in sparse matrix list. | |
#define | _sh_last(head) |
Access the last element pointer in a smat_head_t. | |
#define | sh_last(head) |
Last element in sparse matrix list. | |
#define | sh_object(head) |
Object represented by a sparse matrix list head. | |
#define | sh_size(head) |
Sparse matrix list memory size. | |
#define | SMAT_ENTRY_MAGIC |
Sparse matrix entry magic number. | |
#define | se_verify(entry) |
Sparse matrix entry verification macro. | |
#define | se_table(entry) |
Sparse matrix entry table. | |
#define | _se_link(entry) |
Sparse matrix entry linked list element. | |
#define | se_flags(entry) |
Sparse matrix entry flags. | |
#define | se_hash(entry) |
Sparse matrix table entry hash value. | |
#define | _se_next(entry, n) |
Access the next element pointer in a smat_entry_t. | |
#define | se_next(entry, n) |
Next element in sparse matrix list. | |
#define | _se_prev(entry, n) |
Access the previous element pointer in a smat_entry_t. | |
#define | se_prev(entry, n) |
Previous element in sparse matrix list. | |
#define | se_lflags(entry, n) |
Flags associated with an entry in a sparse matrix list. | |
#define | se_object(entry, n) |
Object associated with an entry in a sparse matrix list. | |
#define | ST_REM_FIRST |
Flag requesting removal from first list. | |
#define | ST_REM_SECOND |
Flag requesting removal from second list. | |
#define | ST_REM_HASH |
Flag requesting removal from hash table. | |
#define | ST_REM_FREE |
Flag requesting memory release. | |
Typedefs | |
typedef _smat_table_s | smat_table_t |
Sparse matrix table. | |
typedef _smat_head_s | smat_head_t |
Sparse matrix list head. | |
typedef _smat_entry_s | smat_entry_t |
Sparse matrix entry. | |
typedef unsigned long(* | smat_resize_t )(smat_table_t *table, unsigned long new_mod) |
Sparse matrix table resize callback. | |
typedef unsigned long(* | smat_iter_t )(smat_table_t *table, smat_entry_t *ent, void *extra) |
Sparse matrix iteration callback. | |
typedef unsigned long(* | smat_comp_t )(db_key_t *key, smat_entry_t *ent) |
Sparse matrix comparison callback. | |
typedef enum _smat_loc_e | smat_loc_t |
Sparse matrix location. | |
Enumerations | |
enum | _smat_loc_e { SMAT_LOC_FIRST, SMAT_LOC_SECOND } |
Sparse matrix location. More... | |
Functions | |
unsigned long | smat_cleanup (void) |
Clean up the smat free list. | |
unsigned long | smat_freemem (void) |
Report how much memory is used by the free list. | |
unsigned long | st_init (smat_table_t *table, unsigned long flags, smat_resize_t resize, void *extra, unsigned long init_mod) |
Dynamically initialize a sparse matrix table. | |
unsigned long | st_add (smat_table_t *table, smat_entry_t **entry_p, smat_head_t *head1, link_loc_t loc1, smat_entry_t *ent1, smat_head_t *head2, link_loc_t loc2, smat_entry_t *ent2) |
Add an entry to a sparse matrix. | |
unsigned long | st_remove (smat_table_t *table, smat_entry_t *entry) |
Remove an entry from a sparse matrix. | |
unsigned long | st_find (smat_table_t *table, smat_entry_t **entry_p, smat_head_t *head1, smat_head_t *head2) |
Find an entry in a sparse matrix. | |
unsigned long | st_iter (smat_table_t *table, smat_iter_t iter_func, void *extra) |
Iterate over each entry in a sparse matrix. | |
unsigned long | st_flush (smat_table_t *table, smat_iter_t flush_func, void *extra) |
Flush a sparse matrix. | |
unsigned long | st_resize (smat_table_t *table, unsigned long new_size) |
Resize a sparse matrix table. | |
unsigned long | st_free (smat_table_t *table) |
Free memory used by an empty sparse matrix table. | |
unsigned long | sh_init (smat_head_t *head, smat_loc_t elem, void *object) |
Dynamically initialize a sparse matrix row or column head. | |
unsigned long | sh_move (smat_head_t *head, smat_entry_t *elem, link_loc_t loc, smat_entry_t *elem2) |
Move an entry within a row or column list. | |
unsigned long | sh_find (smat_head_t *head, smat_entry_t **elem_p, smat_comp_t comp_func, smat_entry_t *start, db_key_t *key) |
Find an entry in a row or column of a sparse matrix. | |
unsigned long | sh_iter (smat_head_t *head, smat_entry_t *start, smat_iter_t iter_func, void *extra, unsigned long flags) |
Iterate over each entry in a row or column of a sparse matrix. | |
unsigned long | sh_flush (smat_head_t *head, smat_iter_t flush_func, void *extra) |
Flush a row or column of a sparse matrix. | |
unsigned long | _st_remove (smat_table_t *table, smat_entry_t *entry, unsigned int remflag) |
Remove an entry from a sparse matrix (internal). | |
smat_entry_t * | _smat_alloc (void) |
Allocate a sparse matrix entry. | |
void | _smat_free (smat_entry_t *entry) |
Release a sparse matrix entry. | |
unsigned long | _smat_resize (hash_table_t *table, unsigned long new_mod) |
Sparse matrix resize function. | |
static unsigned long | _sh_find_comp (db_key_t *key, void *data) |
Sparse matrix linked list comparision function. | |
static unsigned long | _sh_flush_iter (link_head_t *head, link_elem_t *elem, void *extra) |
Sparse matrix linked list flush callback. | |
static unsigned long | _sh_iter_iter (link_head_t *head, link_elem_t *elem, void *extra) |
Sparse matrix linked list iteration callback. | |
static unsigned long | _st_flush_iter (hash_table_t *table, hash_entry_t *ent, void *extra) |
Sparse matrix hash flush callback. | |
static unsigned long | _st_iter_iter (hash_table_t *table, hash_entry_t *ent, void *extra) |
Sparse matrix hash iteration callback. | |
Variables | |
static link_head_t | _smat_freelist |
Sparse matrix freelist. |
|
For internal use only. This macro provides access to the linked list element buried in the sparse matrix entry for use by the free list routines.
Definition at line 2383 of file dbprim.h. Referenced by _smat_free(). |
|
For internal use only. This helper macro is used to directly access the next linked list element in a specific sparse matrix linked list.
|
|
For internal use only. This helper macro is used to directly access the previous linked list element in a specific sparse matrix linked list.
|
|
For internal use only. This helper macro is used to directly access the first linked list element of a smat_head_t.
|
|
For internal use only. This helper macro is used to directly access the last linked list element of a smat_head_t.
|
|
For internal use only. This simple macro simply retrieves a pointer to the sparse matrix entry from a linked list element. It is a helper macro for the other macros that access sparse matrix entries.
|
|
This macro retrieves a set of user-defined flags associated with the entry. It may be used as an lvalue to set those flags.
|
|
This macro retrieves the hash value of the given sparse matrix entry. If the sparse matrix hash been resized, this value may not be the same as a previous value.
|
|
This macro retrieves a set of user-defined flags associated with the entry in a sparse matrix list. It may be used as an lvalue to set those flags.
|
|
This macro retrieves a pointer to the link_elem_t for the next element in the sparse matrix list.
|
|
This macro retrieves a pointer to one of the objects represented by the entry. It may be used as an lvalue to change the object pointed to. Care should be taken when using this feature.
|
|
This macro retrieves a pointer to the link_elem_t for the previous element in the sparse matrix list.
|
|
This macro retrieves a pointer to the table that the sparse matrix entry is in.
|
|
This macro verifies that a given pointer actually does point to a sparse matrix entry.
Definition at line 2357 of file dbprim.h. Referenced by sh_find(), sh_iter(), sh_move(), st_add(), and st_remove(). |
|
This macro retrieves the number of elements in the sparse matrix list rooted at
|
|
This macro retrieves the position indicator for the sparse matrix head. It will return one of SMAT_LOC_FIRST or SMAT_LOC_SECOND.
|
|
This macro retrieves a pointer to the smat_entry_t for the first element in the sparse matrix list.
|
|
This macro returns a non-zero value if the matrix is currently frozen. The sparse matrix may be frozen if there is an iteration in progress.
|
|
This macro retrieves a pointer to the smat_entry_t for the last element in the sparse matrix list.
|
|
This macro retrieves a pointer to the object referenced by the sparse matrix list head.
|
|
This macro returns the physical size of the memory allocated by the library for this sparse matrix list.
|
|
If there are any elements in this sparse matrix list head, this macro will retrieve a pointer to the table in which they reside.
|
|
This macro verifies that a given pointer actually does point to a sparse matrix head.
Definition at line 2049 of file dbprim.h. Referenced by sh_find(), sh_flush(), sh_iter(), sh_move(), st_add(), and st_find(). |
|
For internal use only. This is the magic number used for the sparse matrix entry structure. Definition at line 2342 of file dbprim.h. Referenced by _smat_alloc(). |
|
This macro statically initializes a smat_head_t.
|
|
For internal use only. This is the magic number used for the sparse matrix list head structure. Definition at line 2019 of file dbprim.h. Referenced by sh_init(). |
|
For internal use only. This is the magic number used for the sparse matrix table structure. Definition at line 1678 of file dbprim.h. Referenced by st_init(). |
|
This macro retrieves the total number of items actually in the sparse matrix table.
|
|
This macro retrieves the extra pointer data associated with a particular sparse matrix table.
|
|
This macro retrieves the flags associated with the sparse matrix table. Only HASH_FLAG_AUTOGROW and HASH_FLAG_AUTOSHRINK have any meaning to the application; all other bits are reserved for use in the library. This macro may be used as an lvalue, but care must be taken to avoid modifying the library-specific bits.
|
|
This macro returns a non-zero value if the matrix is currently frozen. The sparse matrix may be frozen if there is an iteration in progress.
|
|
This macro retrieves the number of buckets allocated for the sparse matrix table. An application may wish to save this value between invocations to avoid the overhead of growing the table while filling it with data.
|
|
For internal use only. This flag may be passed to _st_remove() to request that a sparse matrix entry should be removed from the SMAT_LOC_FIRST linked list. Definition at line 165 of file dbprim_int.h. Referenced by _sh_flush_iter(), _st_flush_iter(), _st_remove(), st_add(), and st_remove(). |
|
For internal use only. This flag may be passed to _st_remove() to request that a sparse matrix entry be passed to _smat_free(). Definition at line 193 of file dbprim_int.h. Referenced by _st_remove(), st_add(), and st_remove(). |
|
For internal use only. This flag may be passed to _st_remove() to request that a sparse matrix entry should be removed from the hash table. Definition at line 184 of file dbprim_int.h. Referenced by _sh_flush_iter(), _st_remove(), st_add(), and st_remove(). |
|
For internal use only. This flag may be passed to _st_remove() to request that a sparse matrix entry should be removed from the SMAT_LOC_SECOND linked list. Definition at line 175 of file dbprim_int.h. Referenced by _sh_flush_iter(), _st_flush_iter(), _st_remove(), and st_remove(). |
|
This macro returns the physical size of the memory allocated by the library for this sparse matrix table.
|
|
This macro verifies that a given pointer actually does point to a sparse matrix table.
Definition at line 1693 of file dbprim.h. Referenced by st_add(), st_find(), st_flush(), st_free(), st_iter(), st_remove(), and st_resize(). |
|
This function pointer references a callback used by sh_find(). It should return 0 if the sparse matrix entry represented by the second argument matches the key passed as the first argument.
|
|
This structure is allocated by the library and represents a single element in a sparse matrix. |
|
This structure is the head of a linked list of sparse matrix entries. |
|
This function pointer references a callback used by st_iter(), st_flush(), sh_iter(), and sh_flush(). It should return 0 for success. A non-zero return value will terminate the operation and will become the return value of the call.
|
|
See the documentation for the enumeration _smat_loc_e. |
|
This function pointer references a callback that will be called with both the old and new sparse matrix table sizes whenever a sparse matrix's hash table table is resized. It should return non-zero only when the resize should be inhibited.
|
|
This structure is the basis of all sparse matrices maintained by this library. |
|
This enumeration is used to specify whether an element is a row or column element. It should be referenced by the typedef smat_loc_t. |
|
For internal use only. This function is a link_comp_t comparison callback that is used as a shim between the sh_find() function and the ll_find function, which it uses internally.
Definition at line 61 of file sh_find.c. References dk_key, _sh_find_s::sf_comp, and _sh_find_s::sf_key. Referenced by sh_find(). |
|
For internal use only. This function is a link_iter_t iteration callback that is used as a shim between the sh_flush() function and the ll_flush() function, which it uses internally.
Definition at line 67 of file sh_flush.c. References _smat_free(), _st_remove(), le_object, _sh_flush_s::sf_elem, _sh_flush_s::sf_extra, _sh_flush_s::sf_flush, _sh_flush_s::sf_table, SMAT_LOC_FIRST, ST_REM_FIRST, ST_REM_HASH, and ST_REM_SECOND. Referenced by sh_flush(). Here is the call graph for this function: |
|
For internal use only. This function is a link_iter_t iteration callback that is used as a shim between the st_iter() function and the ll_iter() function, which it uses internally.
Definition at line 66 of file sh_iter.c. References le_object, _sh_iter_s::si_extra, _sh_iter_s::si_iter, and _sh_iter_s::si_table. Referenced by sh_iter(). |
|
For internal use only. This function is used to allocate a sparse matrix entry. In cooperation with _smat_free(), it maintains a freelist in order to reduce memory fragmentation. If a sparse matrix entry cannot be allocated from the freelist, a new one will be allocated with malloc().
Definition at line 48 of file smat_freelist.c. References he_init(), le_init(), le_object, ll_count, ll_first, ll_remove(), _smat_entry_s::se_hash, _smat_entry_s::se_link, _smat_entry_s::se_magic, _smat_entry_s::se_object, _smat_entry_s::se_table, SMAT_ENTRY_MAGIC, SMAT_LOC_FIRST, and SMAT_LOC_SECOND. Referenced by st_add(). Here is the call graph for this function: |
|
For internal use only. This function is used to release a sparse matrix entry. In cooperatio with _smat_alloc(), it maintains a freelist in order to reduce memory fragmentation. Sparse matrix entries passed to this function will generally be added to the free list.
Definition at line 77 of file smat_freelist.c. References _se_link, le_object, LINK_LOC_HEAD, ll_add(), and _smat_entry_s::se_magic. Referenced by _sh_flush_iter(), _st_flush_iter(), _st_remove(), and st_add(). Here is the call graph for this function: |
|
For internal use only. This function is a hash table-compatible resize callback for use by sparse matrices.
Definition at line 34 of file _smat_resize.c. References ht_extra, and _smat_table_s::st_resize. Referenced by st_init(). |
|
For internal use only. This function is a hash_iter_t iteration callback that is used as a shim between the st_flush() function and the ht_flush() function, which it uses internally.
Definition at line 66 of file st_flush.c. References _smat_free(), _st_remove(), he_value, _st_flush_s::sf_extra, _st_flush_s::sf_flush, _st_flush_s::sf_table, ST_REM_FIRST, and ST_REM_SECOND. Referenced by st_flush(). Here is the call graph for this function: |
|
For internal use only. This function is a hash_iter_t iteration callback that is used as a shim between the st_iter() function and the ht_iter() function, which it uses internally.
Definition at line 66 of file st_iter.c. References he_value, _st_iter_s::si_extra, _st_iter_s::si_iter, and _st_iter_s::si_table. Referenced by st_iter(). |
|
For internal use only.
This function implements the actual logic that removes a sparse matrix entry from a sparse matrix table. Sparse matrix entries must be removed from three different locations before they can be passed to free(), and there are several places in the library where they are removed from one location and must subsequently be removed from the others. This routine allows the caller to specify exactly what must be removed through the use of the
Definition at line 35 of file st_remove.c. References _smat_free(), ht_remove(), ll_remove(), _smat_entry_s::se_hash, _smat_entry_s::se_link, SMAT_LOC_FIRST, SMAT_LOC_SECOND, ST_REM_FIRST, ST_REM_FREE, ST_REM_HASH, ST_REM_SECOND, and _smat_table_s::st_table. Referenced by _sh_flush_iter(), _st_flush_iter(), and st_remove(). Here is the call graph for this function: |
|
This function iterates through the given row or column of a sparse matrix looking for an element that matches the given
Definition at line 72 of file sh_find.c. References _sh_find_comp(), dk_key, le_object, ll_find(), _smat_entry_s::se_link, se_verify, _sh_find_s::sf_comp, _sh_find_s::sf_key, _smat_head_s::sh_elem, _smat_head_s::sh_head, and sh_verify. Here is the call graph for this function: |
|
This function flushes a sparse matrix row or column--that is, it removes each element from that row or column. If a
Definition at line 90 of file sh_flush.c. References _sh_flush_iter(), ll_flush(), _sh_flush_s::sf_elem, _sh_flush_s::sf_extra, _sh_flush_s::sf_flush, _sh_flush_s::sf_table, _smat_head_s::sh_elem, _smat_head_s::sh_head, _smat_head_s::sh_table, and sh_verify. Here is the call graph for this function: |
|
This function dynamically initializes a sparse matrix row or column linked list head. The
Definition at line 34 of file sh_init.c. References ll_init(), _smat_head_s::sh_elem, _smat_head_s::sh_head, _smat_head_s::sh_magic, _smat_head_s::sh_table, SMAT_HEAD_MAGIC, SMAT_LOC_FIRST, and SMAT_LOC_SECOND. Here is the call graph for this function: |
|
This function iterates over a row or column of a sparse matrix, executing the given
Definition at line 77 of file sh_iter.c. References _sh_iter_iter(), ll_iter(), _smat_entry_s::se_link, se_verify, _smat_head_s::sh_elem, _smat_head_s::sh_head, _smat_head_s::sh_table, sh_verify, _sh_iter_s::si_extra, _sh_iter_s::si_iter, and _sh_iter_s::si_table. Here is the call graph for this function: |
|
This function allows the specified entry to be shifted within the linked list describing the row or column. It is very similar to the ll_move() function.
Definition at line 35 of file sh_move.c. References ll_move(), _smat_entry_s::se_link, se_verify, _smat_head_s::sh_elem, _smat_head_s::sh_head, and sh_verify. Here is the call graph for this function: |
|
This function frees all smat_entry_t objects on the internal free list. It is always successful and returns 0.
Definition at line 90 of file smat_freelist.c. References le_object, ll_first, and ll_remove(). Here is the call graph for this function: |
|
This function returns the amount of memory being used by the internal free list of smat_entry_t objects.
Definition at line 106 of file smat_freelist.c. References ll_count. |
|
This function adds an entry to a sparse matrix. The entry is referenced in three different places, thus the complex set of arguments. This function will allocate a smat_entry_t and return it through the
Definition at line 36 of file st_add.c. References _smat_alloc(), _smat_free(), dk_key, dk_len, ht_add(), ht_remove(), LINK_LOC_AFTER, LINK_LOC_BEFORE, ll_add(), ll_remove(), _smat_entry_s::se_hash, _smat_entry_s::se_link, _smat_entry_s::se_object, _smat_entry_s::se_table, se_verify, _smat_head_s::sh_elem, _smat_head_s::sh_head, sh_object, _smat_head_s::sh_table, sh_verify, SMAT_LOC_FIRST, SMAT_LOC_SECOND, ST_REM_FIRST, ST_REM_FREE, ST_REM_HASH, _smat_table_s::st_table, and st_verify. Here is the call graph for this function: |
|
This function looks up the entry matching the given
Definition at line 36 of file st_find.c. References dk_key, dk_len, he_value, ht_find(), _link_head_s::lh_count, _smat_head_s::sh_elem, _smat_head_s::sh_head, sh_object, _smat_head_s::sh_table, sh_verify, SMAT_LOC_FIRST, SMAT_LOC_SECOND, _smat_table_s::st_table, and st_verify. Here is the call graph for this function: |
|
This function flushes a sparse matrix--that is, it removes each entry from the matrix. If a
Definition at line 86 of file st_flush.c. References _st_flush_iter(), ht_flush(), _st_flush_s::sf_extra, _st_flush_s::sf_flush, _st_flush_s::sf_table, _smat_table_s::st_table, and st_verify. Here is the call graph for this function: |
|
This function releases the memory used by the bucket table of the empty hash table associated with a sparse matrix.
Definition at line 34 of file st_free.c. References ht_free(), _smat_table_s::st_table, and st_verify. Here is the call graph for this function: |
|
This function initializes a sparse matrix table.
Definition at line 34 of file st_init.c. References _smat_resize(), hash_comp(), hash_fnv1a(), ht_init(), SMAT_TABLE_MAGIC, _smat_table_s::st_extra, _smat_table_s::st_magic, _smat_table_s::st_resize, and _smat_table_s::st_table. Here is the call graph for this function: |
|
This function iterates over every entry in a sparse matrix (in an unspecified order), executing the given
Definition at line 77 of file st_iter.c. References _st_iter_iter(), ht_iter(), _st_iter_s::si_extra, _st_iter_s::si_iter, _st_iter_s::si_table, _smat_table_s::st_table, and st_verify. Here is the call graph for this function: |
|
This function removes the given entry from the specified sparse matrix.
Definition at line 63 of file st_remove.c. References _st_remove(), _smat_entry_s::se_table, se_verify, ST_REM_FIRST, ST_REM_FREE, ST_REM_HASH, ST_REM_SECOND, and st_verify. Here is the call graph for this function: |
|
This function resizes the hash table associated with a sparse matrix based on the
Definition at line 34 of file st_resize.c. References ht_resize(), _smat_table_s::st_table, and st_verify. Here is the call graph for this function: |
|
For internal use only. This variable is the head of a linked list of free smat_entry_t structures. Definition at line 45 of file smat_freelist.c. |