| 1 |
michael |
3252 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 2 |
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
| 3 |
|
|
<title>Sparse matrices</title> |
| 4 |
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css"> |
| 5 |
|
|
</head><body> |
| 6 |
|
|
<!-- Generated by Doxygen 1.2.18 --> |
| 7 |
|
|
<center> |
| 8 |
|
|
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> </center> |
| 9 |
|
|
<hr><h1>Sparse matrices</h1><hr><a name="_details"></a><h2>Detailed Description</h2> |
| 10 |
|
|
Sparse matrices are advanced data structures used to represent associations. For instance, a manager may have several employees, but several of those employees may report to more than one manager. (Yes, this is a contrived example, so sue me.) The simplest way to represent such assocations is with a matrix, or a two-dimensional array. However, such an implementation cannot easily be extended dynamically--imagine if a manager retires and two more are hired, for instance. It would also use an enormous amount of memory, as most employees would only report to one or two managers. |
| 11 |
|
|
<p> |
| 12 |
|
|
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. |
| 13 |
|
|
<p> |
| 14 |
|
|
Because sparse matrices are so complicated, there are three structures and a variety of operations used. Two of the structures, <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> and <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>, are caller-allocated. However, the third structure, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>, 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 <a class="el" href="group__dbprim__smat.html#a7">smat_cleanup()</a> and <a class="el" href="group__dbprim__smat.html#a8">smat_freemem()</a> calls. |
| 15 |
|
|
<p> |
| 16 |
|
|
The <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> contains the hash table. Only one of these need be allocated per type of association--for instance, in the above example, only one <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> needs to be allocated to represent the manager-employee relationship. |
| 17 |
|
|
<p> |
| 18 |
|
|
The <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> contains the linked list. There are actually two kinds of these structures--one is <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a>, which could be regarded as a ``row,'' and the other is <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a>, 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 <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> for a manager may be <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a>, and one for an employee must then be <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a>. (These values are set when initializing the <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> structure.) |
| 19 |
|
|
<p> |
| 20 |
|
|
An association may be created with the <a class="el" href="group__dbprim__smat.html#a10">st_add()</a> 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 <a class="el" href="group__dbprim__smat.html#a11">st_remove()</a>, or looked up with <a class="el" href="group__dbprim__smat.html#a12">st_find()</a>. If iteration over all associations is desired, use the <a class="el" href="group__dbprim__smat.html#a13">st_iter()</a> function. Removing all associations from a table may be performed with <a class="el" href="group__dbprim__smat.html#a14">st_flush()</a>, which optionally calls a user-defined clean-up function. The associated hash table may be resized with <a class="el" href="group__dbprim__smat.html#a15">st_resize()</a>, and the bucket table may be released with <a class="el" href="group__dbprim__smat.html#a16">st_free()</a>. |
| 21 |
|
|
<p> |
| 22 |
|
|
An association may also be reordered within the linked lists using the <a class="el" href="group__dbprim__smat.html#a18">sh_move()</a> function. If a particular entry is desired, use the <a class="el" href="group__dbprim__smat.html#a19">sh_find()</a> function with a user-defined comparison function to locate it. Iteration may be performed with the <a class="el" href="group__dbprim__smat.html#a20">sh_iter()</a> 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. <table border=0 cellpadding=0 cellspacing=0> |
| 23 |
|
|
<tr><td></td></tr> |
| 24 |
|
|
<tr><td colspan=2><br><h2>Defines</h2></td></tr> |
| 25 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a21">st_verify</a>(table)</td></tr> |
| 26 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix table verification macro.</em> <a href="#a21"></a><em></em></font><br><br></td></tr> |
| 27 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a22">st_flags</a>(table)</td></tr> |
| 28 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix table flags.</em> <a href="#a22"></a><em></em></font><br><br></td></tr> |
| 29 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a23">st_frozen</a>(table)</td></tr> |
| 30 |
|
|
<tr><td> </td><td><font size=-1><em>Determine if a sparse matrix is frozen.</em> <a href="#a23"></a><em></em></font><br><br></td></tr> |
| 31 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a24">st_modulus</a>(table)</td></tr> |
| 32 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix table modulus.</em> <a href="#a24"></a><em></em></font><br><br></td></tr> |
| 33 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a25">st_count</a>(table)</td></tr> |
| 34 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix table count.</em> <a href="#a25"></a><em></em></font><br><br></td></tr> |
| 35 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a26">st_extra</a>(table)</td></tr> |
| 36 |
|
|
<tr><td> </td><td><font size=-1><em>Extra pointer data in a sparse matrix table.</em> <a href="#a26"></a><em></em></font><br><br></td></tr> |
| 37 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a27">st_size</a>(table)</td></tr> |
| 38 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix table memory size.</em> <a href="#a27"></a><em></em></font><br><br></td></tr> |
| 39 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a28">SMAT_HEAD_INIT</a>(elem, object)</td></tr> |
| 40 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix list head static initializer.</em> <a href="#a28"></a><em></em></font><br><br></td></tr> |
| 41 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a29">sh_verify</a>(head)</td></tr> |
| 42 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix list head verification macro.</em> <a href="#a29"></a><em></em></font><br><br></td></tr> |
| 43 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a30">sh_elem</a>(head)</td></tr> |
| 44 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix list head element macro.</em> <a href="#a30"></a><em></em></font><br><br></td></tr> |
| 45 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a31">sh_table</a>(head)</td></tr> |
| 46 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix list head table pointer.</em> <a href="#a31"></a><em></em></font><br><br></td></tr> |
| 47 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a32">sh_frozen</a>(head)</td></tr> |
| 48 |
|
|
<tr><td> </td><td><font size=-1><em>Determine if a sparse matrix is frozen.</em> <a href="#a32"></a><em></em></font><br><br></td></tr> |
| 49 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a33">sh_count</a>(head)</td></tr> |
| 50 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix list count.</em> <a href="#a33"></a><em></em></font><br><br></td></tr> |
| 51 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a34">sh_first</a>(head)</td></tr> |
| 52 |
|
|
<tr><td> </td><td><font size=-1><em>First element in sparse matrix list.</em> <a href="#a34"></a><em></em></font><br><br></td></tr> |
| 53 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a35">sh_last</a>(head)</td></tr> |
| 54 |
|
|
<tr><td> </td><td><font size=-1><em>Last element in sparse matrix list.</em> <a href="#a35"></a><em></em></font><br><br></td></tr> |
| 55 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a36">sh_object</a>(head)</td></tr> |
| 56 |
|
|
<tr><td> </td><td><font size=-1><em>Object represented by a sparse matrix list head.</em> <a href="#a36"></a><em></em></font><br><br></td></tr> |
| 57 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a37">sh_size</a>(head)</td></tr> |
| 58 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix list memory size.</em> <a href="#a37"></a><em></em></font><br><br></td></tr> |
| 59 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a38">se_verify</a>(entry)</td></tr> |
| 60 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix entry verification macro.</em> <a href="#a38"></a><em></em></font><br><br></td></tr> |
| 61 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a39">se_table</a>(entry)</td></tr> |
| 62 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix entry table.</em> <a href="#a39"></a><em></em></font><br><br></td></tr> |
| 63 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a41">se_flags</a>(entry)</td></tr> |
| 64 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix entry flags.</em> <a href="#a41"></a><em></em></font><br><br></td></tr> |
| 65 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a42">se_hash</a>(entry)</td></tr> |
| 66 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix table entry hash value.</em> <a href="#a42"></a><em></em></font><br><br></td></tr> |
| 67 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a43">se_next</a>(entry, n)</td></tr> |
| 68 |
|
|
<tr><td> </td><td><font size=-1><em>Next element in sparse matrix list.</em> <a href="#a43"></a><em></em></font><br><br></td></tr> |
| 69 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a44">se_prev</a>(entry, n)</td></tr> |
| 70 |
|
|
<tr><td> </td><td><font size=-1><em>Previous element in sparse matrix list.</em> <a href="#a44"></a><em></em></font><br><br></td></tr> |
| 71 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a45">se_lflags</a>(entry, n)</td></tr> |
| 72 |
|
|
<tr><td> </td><td><font size=-1><em>Flags associated with an entry in a sparse matrix list.</em> <a href="#a45"></a><em></em></font><br><br></td></tr> |
| 73 |
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a46">se_object</a>(entry, n)</td></tr> |
| 74 |
|
|
<tr><td> </td><td><font size=-1><em>Object associated with an entry in a sparse matrix list.</em> <a href="#a46"></a><em></em></font><br><br></td></tr> |
| 75 |
|
|
<tr><td colspan=2><br><h2>Typedefs</h2></td></tr> |
| 76 |
|
|
<tr><td nowrap align=right valign=top>typedef _smat_table_s </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a></td></tr> |
| 77 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix table.</em> <a href="#a0"></a><em></em></font><br><br></td></tr> |
| 78 |
|
|
<tr><td nowrap align=right valign=top>typedef _smat_head_s </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a></td></tr> |
| 79 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix list head.</em> <a href="#a1"></a><em></em></font><br><br></td></tr> |
| 80 |
|
|
<tr><td nowrap align=right valign=top>typedef _smat_entry_s </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a></td></tr> |
| 81 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix entry.</em> <a href="#a2"></a><em></em></font><br><br></td></tr> |
| 82 |
|
|
<tr><td nowrap align=right valign=top>typedef unsigned long(* </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a3">smat_resize_t</a> )(<a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> *, unsigned long)</td></tr> |
| 83 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix table resize callback.</em> <a href="#a3"></a><em></em></font><br><br></td></tr> |
| 84 |
|
|
<tr><td nowrap align=right valign=top>typedef unsigned long(* </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a4">smat_iter_t</a> )(<a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> *, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> *, void *)</td></tr> |
| 85 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix iteration callback.</em> <a href="#a4"></a><em></em></font><br><br></td></tr> |
| 86 |
|
|
<tr><td nowrap align=right valign=top>typedef unsigned long(* </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a5">smat_comp_t</a> )(<a class="el" href="group__dbprim.html#a0">db_key_t</a> *, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> *)</td></tr> |
| 87 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix comparison callback.</em> <a href="#a5"></a><em></em></font><br><br></td></tr> |
| 88 |
|
|
<tr><td nowrap align=right valign=top>typedef enum <a class="el" href="group__dbprim__smat.html#a47">_smat_loc_e</a> </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a6">smat_loc_t</a></td></tr> |
| 89 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix location.</em> <a href="#a6"></a><em></em></font><br><br></td></tr> |
| 90 |
|
|
<tr><td colspan=2><br><h2>Enumerations</h2></td></tr> |
| 91 |
|
|
<tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a47">_smat_loc_e</a> { <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a>, |
| 92 |
|
|
<a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> |
| 93 |
|
|
}</td></tr> |
| 94 |
|
|
<tr><td> </td><td><font size=-1><em>Sparse matrix location.</em> <a href="#a47">More...</a><em></em></font><br><br></td></tr> |
| 95 |
|
|
<tr><td colspan=2><br><h2>Functions</h2></td></tr> |
| 96 |
|
|
<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a7">smat_cleanup</a> (void)</td></tr> |
| 97 |
|
|
<tr><td> </td><td><font size=-1><em>Clean up the smat free list.</em> <a href="#a7"></a><em></em></font><br><br></td></tr> |
| 98 |
|
|
<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a8">smat_freemem</a> (void)</td></tr> |
| 99 |
|
|
<tr><td> </td><td><font size=-1><em>Report how much memory is used by the free list.</em> <a href="#a8"></a><em></em></font><br><br></td></tr> |
| 100 |
|
|
<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a9">st_init</a> (<a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> *table, unsigned long flags, <a class="el" href="group__dbprim__smat.html#a3">smat_resize_t</a> resize, void *extra, unsigned long init_mod)</td></tr> |
| 101 |
|
|
<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a10">st_add</a> (<a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> *table, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> **entry_p, <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> *head1, <a class="el" href="group__dbprim__link.html#a4">link_loc_t</a> loc1, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> *ent1, <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> *head2, <a class="el" href="group__dbprim__link.html#a4">link_loc_t</a> loc2, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> *ent2)</td></tr> |
| 102 |
|
|
<tr><td> </td><td><font size=-1><em>Add an entry to a sparse matrix.</em> <a href="#a10"></a><em></em></font><br><br></td></tr> |
| 103 |
|
|
<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a11">st_remove</a> (<a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> *table, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> *entry)</td></tr> |
| 104 |
|
|
<tr><td> </td><td><font size=-1><em>Remove an entry from a sparse matrix.</em> <a href="#a11"></a><em></em></font><br><br></td></tr> |
| 105 |
|
|
<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a12">st_find</a> (<a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> *table, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> **entry_p, <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> *head1, <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> *head2)</td></tr> |
| 106 |
|
|
<tr><td> </td><td><font size=-1><em>Find an entry in a sparse matrix.</em> <a href="#a12"></a><em></em></font><br><br></td></tr> |
| 107 |
|
|
<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a13">st_iter</a> (<a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> *table, <a class="el" href="group__dbprim__smat.html#a4">smat_iter_t</a> iter_func, void *extra)</td></tr> |
| 108 |
|
|
<tr><td> </td><td><font size=-1><em>Iterate over each entry in a sparse matrix.</em> <a href="#a13"></a><em></em></font><br><br></td></tr> |
| 109 |
|
|
<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a14">st_flush</a> (<a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> *table, <a class="el" href="group__dbprim__smat.html#a4">smat_iter_t</a> flush_func, void *extra)</td></tr> |
| 110 |
|
|
<tr><td> </td><td><font size=-1><em>Flush a sparse matrix.</em> <a href="#a14"></a><em></em></font><br><br></td></tr> |
| 111 |
|
|
<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a15">st_resize</a> (<a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> *table, unsigned long new_size)</td></tr> |
| 112 |
|
|
<tr><td> </td><td><font size=-1><em>Resize a sparse matrix table.</em> <a href="#a15"></a><em></em></font><br><br></td></tr> |
| 113 |
|
|
<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a16">st_free</a> (<a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> *table)</td></tr> |
| 114 |
|
|
<tr><td> </td><td><font size=-1><em>Free memory used by an empty sparse matrix table.</em> <a href="#a16"></a><em></em></font><br><br></td></tr> |
| 115 |
|
|
<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a17">sh_init</a> (<a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> *head, <a class="el" href="group__dbprim__smat.html#a6">smat_loc_t</a> elem, void *object)</td></tr> |
| 116 |
|
|
<tr><td> </td><td><font size=-1><em>Dynamically initialize a sparse matrix row or column head.</em> <a href="#a17"></a><em></em></font><br><br></td></tr> |
| 117 |
|
|
<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a18">sh_move</a> (<a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> *head, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> *elem, <a class="el" href="group__dbprim__link.html#a4">link_loc_t</a> loc, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> *elem2)</td></tr> |
| 118 |
|
|
<tr><td> </td><td><font size=-1><em>Move an entry within a row or column list.</em> <a href="#a18"></a><em></em></font><br><br></td></tr> |
| 119 |
|
|
<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a19">sh_find</a> (<a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> *head, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> **elem_p, <a class="el" href="group__dbprim__smat.html#a5">smat_comp_t</a> comp_func, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> *start, <a class="el" href="group__dbprim.html#a0">db_key_t</a> *key)</td></tr> |
| 120 |
|
|
<tr><td> </td><td><font size=-1><em>Find an entry in a row or column of a sparse matrix.</em> <a href="#a19"></a><em></em></font><br><br></td></tr> |
| 121 |
|
|
<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a20">sh_iter</a> (<a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> *head, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> *start, <a class="el" href="group__dbprim__smat.html#a4">smat_iter_t</a> iter_func, void *extra, unsigned long flags)</td></tr> |
| 122 |
|
|
<tr><td> </td><td><font size=-1><em>Iterate over each entry in a row or column of a sparse matrix.</em> <a href="#a20"></a><em></em></font><br><br></td></tr> |
| 123 |
|
|
</table> |
| 124 |
|
|
<hr><h2>Define Documentation</h2> |
| 125 |
|
|
<a name="a41" doxytag="dbprim.h::se_flags"></a><p> |
| 126 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 127 |
|
|
<tr> |
| 128 |
|
|
<td class="md"> |
| 129 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 130 |
|
|
<tr> |
| 131 |
|
|
<td class="md" nowrap valign="top"> #define se_flags</td> |
| 132 |
|
|
<td class="md" valign="top">( </td> |
| 133 |
|
|
<td class="md" nowrap valign="top">entry </td> |
| 134 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 135 |
|
|
<td class="md" valign="top">) </td> |
| 136 |
|
|
<td class="md" nowrap> |
| 137 |
|
|
</table> |
| 138 |
|
|
</td> |
| 139 |
|
|
</tr> |
| 140 |
|
|
</table> |
| 141 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 142 |
|
|
<tr> |
| 143 |
|
|
<td> |
| 144 |
|
|
|
| 145 |
|
|
</td> |
| 146 |
|
|
<td> |
| 147 |
|
|
|
| 148 |
|
|
<p> |
| 149 |
|
|
This macro retrieves a set of user-defined flags associated with the entry. It may be used as an lvalue to set those flags.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 150 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 151 |
|
|
<tr><td valign=top><em>entry</em> </td><td> |
| 152 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>.</td></tr> |
| 153 |
|
|
</table> |
| 154 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 155 |
|
|
An <code>unsigned long</code> containing the flags associated with the entry. </dl> </td> |
| 156 |
|
|
</tr> |
| 157 |
|
|
</table> |
| 158 |
|
|
<a name="a42" doxytag="dbprim.h::se_hash"></a><p> |
| 159 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 160 |
|
|
<tr> |
| 161 |
|
|
<td class="md"> |
| 162 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 163 |
|
|
<tr> |
| 164 |
|
|
<td class="md" nowrap valign="top"> #define se_hash</td> |
| 165 |
|
|
<td class="md" valign="top">( </td> |
| 166 |
|
|
<td class="md" nowrap valign="top">entry </td> |
| 167 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 168 |
|
|
<td class="md" valign="top">) </td> |
| 169 |
|
|
<td class="md" nowrap> |
| 170 |
|
|
</table> |
| 171 |
|
|
</td> |
| 172 |
|
|
</tr> |
| 173 |
|
|
</table> |
| 174 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 175 |
|
|
<tr> |
| 176 |
|
|
<td> |
| 177 |
|
|
|
| 178 |
|
|
</td> |
| 179 |
|
|
<td> |
| 180 |
|
|
|
| 181 |
|
|
<p> |
| 182 |
|
|
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.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 183 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 184 |
|
|
<tr><td valign=top><em>entry</em> </td><td> |
| 185 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>.</td></tr> |
| 186 |
|
|
</table> |
| 187 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 188 |
|
|
An <code>unsigned long</code> containing the hash code for the entry. </dl> </td> |
| 189 |
|
|
</tr> |
| 190 |
|
|
</table> |
| 191 |
|
|
<a name="a45" doxytag="dbprim.h::se_lflags"></a><p> |
| 192 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 193 |
|
|
<tr> |
| 194 |
|
|
<td class="md"> |
| 195 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 196 |
|
|
<tr> |
| 197 |
|
|
<td class="md" nowrap valign="top"> #define se_lflags</td> |
| 198 |
|
|
<td class="md" valign="top">( </td> |
| 199 |
|
|
<td class="md" nowrap valign="top">entry, <tr> |
| 200 |
|
|
<td></td> |
| 201 |
|
|
<td></td> |
| 202 |
|
|
<td class="md" nowrap>n </td> |
| 203 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 204 |
|
|
<td class="md" valign="top">) </td> |
| 205 |
|
|
<td class="md" nowrap> |
| 206 |
|
|
</table> |
| 207 |
|
|
</td> |
| 208 |
|
|
</tr> |
| 209 |
|
|
</table> |
| 210 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 211 |
|
|
<tr> |
| 212 |
|
|
<td> |
| 213 |
|
|
|
| 214 |
|
|
</td> |
| 215 |
|
|
<td> |
| 216 |
|
|
|
| 217 |
|
|
<p> |
| 218 |
|
|
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.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 219 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 220 |
|
|
<tr><td valign=top><em>entry</em> </td><td> |
| 221 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </td></tr> |
| 222 |
|
|
<tr><td valign=top><em>n</em> </td><td> |
| 223 |
|
|
One of <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> to specify which list thread is desired.</td></tr> |
| 224 |
|
|
</table> |
| 225 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 226 |
|
|
An <code>unsigned long</code> containing the flags associated with the entry. </dl> </td> |
| 227 |
|
|
</tr> |
| 228 |
|
|
</table> |
| 229 |
|
|
<a name="a43" doxytag="dbprim.h::se_next"></a><p> |
| 230 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 231 |
|
|
<tr> |
| 232 |
|
|
<td class="md"> |
| 233 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 234 |
|
|
<tr> |
| 235 |
|
|
<td class="md" nowrap valign="top"> #define se_next</td> |
| 236 |
|
|
<td class="md" valign="top">( </td> |
| 237 |
|
|
<td class="md" nowrap valign="top">entry, <tr> |
| 238 |
|
|
<td></td> |
| 239 |
|
|
<td></td> |
| 240 |
|
|
<td class="md" nowrap>n </td> |
| 241 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 242 |
|
|
<td class="md" valign="top">) </td> |
| 243 |
|
|
<td class="md" nowrap> |
| 244 |
|
|
</table> |
| 245 |
|
|
</td> |
| 246 |
|
|
</tr> |
| 247 |
|
|
</table> |
| 248 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 249 |
|
|
<tr> |
| 250 |
|
|
<td> |
| 251 |
|
|
|
| 252 |
|
|
</td> |
| 253 |
|
|
<td> |
| 254 |
|
|
|
| 255 |
|
|
<p> |
| 256 |
|
|
This macro retrieves a pointer to the <a class="el" href="group__dbprim__link.html#a1">link_elem_t</a> for the next element in the sparse matrix list. |
| 257 |
|
|
<p> |
| 258 |
|
|
<dl compact><dt><b>Warning: </b></dt><dd> |
| 259 |
|
|
This macro may evaluate the <code>entry</code> and <code>n</code> arguments twice.</dl><dl compact><dt><b>Parameters: </b></dt><dd> |
| 260 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 261 |
|
|
<tr><td valign=top><em>entry</em> </td><td> |
| 262 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </td></tr> |
| 263 |
|
|
<tr><td valign=top><em>n</em> </td><td> |
| 264 |
|
|
One of <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> to specify which list thread is desired.</td></tr> |
| 265 |
|
|
</table> |
| 266 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 267 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </dl> </td> |
| 268 |
|
|
</tr> |
| 269 |
|
|
</table> |
| 270 |
|
|
<a name="a46" doxytag="dbprim.h::se_object"></a><p> |
| 271 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 272 |
|
|
<tr> |
| 273 |
|
|
<td class="md"> |
| 274 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 275 |
|
|
<tr> |
| 276 |
|
|
<td class="md" nowrap valign="top"> #define se_object</td> |
| 277 |
|
|
<td class="md" valign="top">( </td> |
| 278 |
|
|
<td class="md" nowrap valign="top">entry, <tr> |
| 279 |
|
|
<td></td> |
| 280 |
|
|
<td></td> |
| 281 |
|
|
<td class="md" nowrap>n </td> |
| 282 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 283 |
|
|
<td class="md" valign="top">) </td> |
| 284 |
|
|
<td class="md" nowrap> |
| 285 |
|
|
</table> |
| 286 |
|
|
</td> |
| 287 |
|
|
</tr> |
| 288 |
|
|
</table> |
| 289 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 290 |
|
|
<tr> |
| 291 |
|
|
<td> |
| 292 |
|
|
|
| 293 |
|
|
</td> |
| 294 |
|
|
<td> |
| 295 |
|
|
|
| 296 |
|
|
<p> |
| 297 |
|
|
This macro retrieves a pointer to one of the object 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.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 298 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 299 |
|
|
<tr><td valign=top><em>entry</em> </td><td> |
| 300 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </td></tr> |
| 301 |
|
|
<tr><td valign=top><em>n</em> </td><td> |
| 302 |
|
|
One of <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> to specify which list thread is desired.</td></tr> |
| 303 |
|
|
</table> |
| 304 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 305 |
|
|
A pointer to <code>void</code> representing the object. </dl> </td> |
| 306 |
|
|
</tr> |
| 307 |
|
|
</table> |
| 308 |
|
|
<a name="a44" doxytag="dbprim.h::se_prev"></a><p> |
| 309 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 310 |
|
|
<tr> |
| 311 |
|
|
<td class="md"> |
| 312 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 313 |
|
|
<tr> |
| 314 |
|
|
<td class="md" nowrap valign="top"> #define se_prev</td> |
| 315 |
|
|
<td class="md" valign="top">( </td> |
| 316 |
|
|
<td class="md" nowrap valign="top">entry, <tr> |
| 317 |
|
|
<td></td> |
| 318 |
|
|
<td></td> |
| 319 |
|
|
<td class="md" nowrap>n </td> |
| 320 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 321 |
|
|
<td class="md" valign="top">) </td> |
| 322 |
|
|
<td class="md" nowrap> |
| 323 |
|
|
</table> |
| 324 |
|
|
</td> |
| 325 |
|
|
</tr> |
| 326 |
|
|
</table> |
| 327 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 328 |
|
|
<tr> |
| 329 |
|
|
<td> |
| 330 |
|
|
|
| 331 |
|
|
</td> |
| 332 |
|
|
<td> |
| 333 |
|
|
|
| 334 |
|
|
<p> |
| 335 |
|
|
This macro retrieves a pointer to the <a class="el" href="group__dbprim__link.html#a1">link_elem_t</a> for the previous element in the sparse matrix list. |
| 336 |
|
|
<p> |
| 337 |
|
|
<dl compact><dt><b>Warning: </b></dt><dd> |
| 338 |
|
|
This macro may evaluate the <code>entry</code> and <code>n</code> arguments twice.</dl><dl compact><dt><b>Parameters: </b></dt><dd> |
| 339 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 340 |
|
|
<tr><td valign=top><em>entry</em> </td><td> |
| 341 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </td></tr> |
| 342 |
|
|
<tr><td valign=top><em>n</em> </td><td> |
| 343 |
|
|
One of <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> to specify which list thread is desired.</td></tr> |
| 344 |
|
|
</table> |
| 345 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 346 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </dl> </td> |
| 347 |
|
|
</tr> |
| 348 |
|
|
</table> |
| 349 |
|
|
<a name="a39" doxytag="dbprim.h::se_table"></a><p> |
| 350 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 351 |
|
|
<tr> |
| 352 |
|
|
<td class="md"> |
| 353 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 354 |
|
|
<tr> |
| 355 |
|
|
<td class="md" nowrap valign="top"> #define se_table</td> |
| 356 |
|
|
<td class="md" valign="top">( </td> |
| 357 |
|
|
<td class="md" nowrap valign="top">entry </td> |
| 358 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 359 |
|
|
<td class="md" valign="top">) </td> |
| 360 |
|
|
<td class="md" nowrap> |
| 361 |
|
|
</table> |
| 362 |
|
|
</td> |
| 363 |
|
|
</tr> |
| 364 |
|
|
</table> |
| 365 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 366 |
|
|
<tr> |
| 367 |
|
|
<td> |
| 368 |
|
|
|
| 369 |
|
|
</td> |
| 370 |
|
|
<td> |
| 371 |
|
|
|
| 372 |
|
|
<p> |
| 373 |
|
|
This macro retrieves a pointer to the table that the sparse matrix entry is in.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 374 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 375 |
|
|
<tr><td valign=top><em>entry</em> </td><td> |
| 376 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>.</td></tr> |
| 377 |
|
|
</table> |
| 378 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 379 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>. </dl> </td> |
| 380 |
|
|
</tr> |
| 381 |
|
|
</table> |
| 382 |
|
|
<a name="a38" doxytag="dbprim.h::se_verify"></a><p> |
| 383 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 384 |
|
|
<tr> |
| 385 |
|
|
<td class="md"> |
| 386 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 387 |
|
|
<tr> |
| 388 |
|
|
<td class="md" nowrap valign="top"> #define se_verify</td> |
| 389 |
|
|
<td class="md" valign="top">( </td> |
| 390 |
|
|
<td class="md" nowrap valign="top">entry </td> |
| 391 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 392 |
|
|
<td class="md" valign="top">) </td> |
| 393 |
|
|
<td class="md" nowrap> |
| 394 |
|
|
</table> |
| 395 |
|
|
</td> |
| 396 |
|
|
</tr> |
| 397 |
|
|
</table> |
| 398 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 399 |
|
|
<tr> |
| 400 |
|
|
<td> |
| 401 |
|
|
|
| 402 |
|
|
</td> |
| 403 |
|
|
<td> |
| 404 |
|
|
|
| 405 |
|
|
<p> |
| 406 |
|
|
This macro verifies that a given pointer actually does point to a sparse matrix entry. |
| 407 |
|
|
<p> |
| 408 |
|
|
<dl compact><dt><b>Warning: </b></dt><dd> |
| 409 |
|
|
This macro may evaluate the <code>entry</code> argument twice.</dl><dl compact><dt><b>Parameters: </b></dt><dd> |
| 410 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 411 |
|
|
<tr><td valign=top><em>entry</em> </td><td> |
| 412 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>.</td></tr> |
| 413 |
|
|
</table> |
| 414 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 415 |
|
|
Boolean true if <code>entry</code> is a valid sparse matrix entry or false otherwise. </dl> </td> |
| 416 |
|
|
</tr> |
| 417 |
|
|
</table> |
| 418 |
|
|
<a name="a33" doxytag="dbprim.h::sh_count"></a><p> |
| 419 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 420 |
|
|
<tr> |
| 421 |
|
|
<td class="md"> |
| 422 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 423 |
|
|
<tr> |
| 424 |
|
|
<td class="md" nowrap valign="top"> #define sh_count</td> |
| 425 |
|
|
<td class="md" valign="top">( </td> |
| 426 |
|
|
<td class="md" nowrap valign="top">head </td> |
| 427 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 428 |
|
|
<td class="md" valign="top">) </td> |
| 429 |
|
|
<td class="md" nowrap> |
| 430 |
|
|
</table> |
| 431 |
|
|
</td> |
| 432 |
|
|
</tr> |
| 433 |
|
|
</table> |
| 434 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 435 |
|
|
<tr> |
| 436 |
|
|
<td> |
| 437 |
|
|
|
| 438 |
|
|
</td> |
| 439 |
|
|
<td> |
| 440 |
|
|
|
| 441 |
|
|
<p> |
| 442 |
|
|
This macro retrieves the number of elements in the sparse matrix list rooted at <code>head</code>.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 443 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 444 |
|
|
<tr><td valign=top><em>head</em> </td><td> |
| 445 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>.</td></tr> |
| 446 |
|
|
</table> |
| 447 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 448 |
|
|
An <code>unsigned long</code> containing a count of the number of elements in the sparse matrix list. </dl> </td> |
| 449 |
|
|
</tr> |
| 450 |
|
|
</table> |
| 451 |
|
|
<a name="a30" doxytag="dbprim.h::sh_elem"></a><p> |
| 452 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 453 |
|
|
<tr> |
| 454 |
|
|
<td class="md"> |
| 455 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 456 |
|
|
<tr> |
| 457 |
|
|
<td class="md" nowrap valign="top"> #define sh_elem</td> |
| 458 |
|
|
<td class="md" valign="top">( </td> |
| 459 |
|
|
<td class="md" nowrap valign="top">head </td> |
| 460 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 461 |
|
|
<td class="md" valign="top">) </td> |
| 462 |
|
|
<td class="md" nowrap> |
| 463 |
|
|
</table> |
| 464 |
|
|
</td> |
| 465 |
|
|
</tr> |
| 466 |
|
|
</table> |
| 467 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 468 |
|
|
<tr> |
| 469 |
|
|
<td> |
| 470 |
|
|
|
| 471 |
|
|
</td> |
| 472 |
|
|
<td> |
| 473 |
|
|
|
| 474 |
|
|
<p> |
| 475 |
|
|
This macro retrieves the position indicator for the sparse matrix head. It will return one of <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a>.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 476 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 477 |
|
|
<tr><td valign=top><em>head</em> </td><td> |
| 478 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>.</td></tr> |
| 479 |
|
|
</table> |
| 480 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 481 |
|
|
An <a class="el" href="group__dbprim__smat.html#a6">smat_loc_t</a>. </dl> </td> |
| 482 |
|
|
</tr> |
| 483 |
|
|
</table> |
| 484 |
|
|
<a name="a34" doxytag="dbprim.h::sh_first"></a><p> |
| 485 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 486 |
|
|
<tr> |
| 487 |
|
|
<td class="md"> |
| 488 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 489 |
|
|
<tr> |
| 490 |
|
|
<td class="md" nowrap valign="top"> #define sh_first</td> |
| 491 |
|
|
<td class="md" valign="top">( </td> |
| 492 |
|
|
<td class="md" nowrap valign="top">head </td> |
| 493 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 494 |
|
|
<td class="md" valign="top">) </td> |
| 495 |
|
|
<td class="md" nowrap> |
| 496 |
|
|
</table> |
| 497 |
|
|
</td> |
| 498 |
|
|
</tr> |
| 499 |
|
|
</table> |
| 500 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 501 |
|
|
<tr> |
| 502 |
|
|
<td> |
| 503 |
|
|
|
| 504 |
|
|
</td> |
| 505 |
|
|
<td> |
| 506 |
|
|
|
| 507 |
|
|
<p> |
| 508 |
|
|
This macro retrieves a pointer to the <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> for the first element in the sparse matrix list. |
| 509 |
|
|
<p> |
| 510 |
|
|
<dl compact><dt><b>Warning: </b></dt><dd> |
| 511 |
|
|
This macro may evaluate the <code>head</code> argument twice.</dl><dl compact><dt><b>Parameters: </b></dt><dd> |
| 512 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 513 |
|
|
<tr><td valign=top><em>head</em> </td><td> |
| 514 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>.</td></tr> |
| 515 |
|
|
</table> |
| 516 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 517 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </dl> </td> |
| 518 |
|
|
</tr> |
| 519 |
|
|
</table> |
| 520 |
|
|
<a name="a32" doxytag="dbprim.h::sh_frozen"></a><p> |
| 521 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 522 |
|
|
<tr> |
| 523 |
|
|
<td class="md"> |
| 524 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 525 |
|
|
<tr> |
| 526 |
|
|
<td class="md" nowrap valign="top"> #define sh_frozen</td> |
| 527 |
|
|
<td class="md" valign="top">( </td> |
| 528 |
|
|
<td class="md" nowrap valign="top">head </td> |
| 529 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 530 |
|
|
<td class="md" valign="top">) </td> |
| 531 |
|
|
<td class="md" nowrap> |
| 532 |
|
|
</table> |
| 533 |
|
|
</td> |
| 534 |
|
|
</tr> |
| 535 |
|
|
</table> |
| 536 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 537 |
|
|
<tr> |
| 538 |
|
|
<td> |
| 539 |
|
|
|
| 540 |
|
|
</td> |
| 541 |
|
|
<td> |
| 542 |
|
|
|
| 543 |
|
|
<p> |
| 544 |
|
|
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.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 545 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 546 |
|
|
<tr><td valign=top><em>head</em> </td><td> |
| 547 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>.</td></tr> |
| 548 |
|
|
</table> |
| 549 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 550 |
|
|
A zero value if the matrix is not frozen or a non-zero value if the matrix is frozen. </dl> </td> |
| 551 |
|
|
</tr> |
| 552 |
|
|
</table> |
| 553 |
|
|
<a name="a35" doxytag="dbprim.h::sh_last"></a><p> |
| 554 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 555 |
|
|
<tr> |
| 556 |
|
|
<td class="md"> |
| 557 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 558 |
|
|
<tr> |
| 559 |
|
|
<td class="md" nowrap valign="top"> #define sh_last</td> |
| 560 |
|
|
<td class="md" valign="top">( </td> |
| 561 |
|
|
<td class="md" nowrap valign="top">head </td> |
| 562 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 563 |
|
|
<td class="md" valign="top">) </td> |
| 564 |
|
|
<td class="md" nowrap> |
| 565 |
|
|
</table> |
| 566 |
|
|
</td> |
| 567 |
|
|
</tr> |
| 568 |
|
|
</table> |
| 569 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 570 |
|
|
<tr> |
| 571 |
|
|
<td> |
| 572 |
|
|
|
| 573 |
|
|
</td> |
| 574 |
|
|
<td> |
| 575 |
|
|
|
| 576 |
|
|
<p> |
| 577 |
|
|
This macro retrieves a pointer to the <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> for the last element in the sparse matrix list. |
| 578 |
|
|
<p> |
| 579 |
|
|
<dl compact><dt><b>Warning: </b></dt><dd> |
| 580 |
|
|
This macro may evaluate the <code>head</code> argument twice.</dl><dl compact><dt><b>Parameters: </b></dt><dd> |
| 581 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 582 |
|
|
<tr><td valign=top><em>head</em> </td><td> |
| 583 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>.</td></tr> |
| 584 |
|
|
</table> |
| 585 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 586 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </dl> </td> |
| 587 |
|
|
</tr> |
| 588 |
|
|
</table> |
| 589 |
|
|
<a name="a36" doxytag="dbprim.h::sh_object"></a><p> |
| 590 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 591 |
|
|
<tr> |
| 592 |
|
|
<td class="md"> |
| 593 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 594 |
|
|
<tr> |
| 595 |
|
|
<td class="md" nowrap valign="top"> #define sh_object</td> |
| 596 |
|
|
<td class="md" valign="top">( </td> |
| 597 |
|
|
<td class="md" nowrap valign="top">head </td> |
| 598 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 599 |
|
|
<td class="md" valign="top">) </td> |
| 600 |
|
|
<td class="md" nowrap> |
| 601 |
|
|
</table> |
| 602 |
|
|
</td> |
| 603 |
|
|
</tr> |
| 604 |
|
|
</table> |
| 605 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 606 |
|
|
<tr> |
| 607 |
|
|
<td> |
| 608 |
|
|
|
| 609 |
|
|
</td> |
| 610 |
|
|
<td> |
| 611 |
|
|
|
| 612 |
|
|
<p> |
| 613 |
|
|
This macro retrieves a pointer to the object referenced by the sparse matrix list head.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 614 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 615 |
|
|
<tr><td valign=top><em>head</em> </td><td> |
| 616 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>.</td></tr> |
| 617 |
|
|
</table> |
| 618 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 619 |
|
|
A pointer to <code>void</code>. </dl> </td> |
| 620 |
|
|
</tr> |
| 621 |
|
|
</table> |
| 622 |
|
|
<a name="a37" doxytag="dbprim.h::sh_size"></a><p> |
| 623 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 624 |
|
|
<tr> |
| 625 |
|
|
<td class="md"> |
| 626 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 627 |
|
|
<tr> |
| 628 |
|
|
<td class="md" nowrap valign="top"> #define sh_size</td> |
| 629 |
|
|
<td class="md" valign="top">( </td> |
| 630 |
|
|
<td class="md" nowrap valign="top">head </td> |
| 631 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 632 |
|
|
<td class="md" valign="top">) </td> |
| 633 |
|
|
<td class="md" nowrap> |
| 634 |
|
|
</table> |
| 635 |
|
|
</td> |
| 636 |
|
|
</tr> |
| 637 |
|
|
</table> |
| 638 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 639 |
|
|
<tr> |
| 640 |
|
|
<td> |
| 641 |
|
|
|
| 642 |
|
|
</td> |
| 643 |
|
|
<td> |
| 644 |
|
|
|
| 645 |
|
|
<p> |
| 646 |
|
|
This macro returns the physical size of the memory allocated by the library for this sparse matrix list. |
| 647 |
|
|
<p> |
| 648 |
|
|
<dl compact><dt><b>Note: </b></dt><dd> |
| 649 |
|
|
The <a class="el" href="group__dbprim__smat.html#a27">st_size()</a> macro already counts the memory for each list in the table. Summing the results of <a class="el" href="group__dbprim__smat.html#a37">sh_size()</a> and <a class="el" href="group__dbprim__smat.html#a27">st_size()</a> will over-count the amount of memory actually in use.</dl><dl compact><dt><b>Parameters: </b></dt><dd> |
| 650 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 651 |
|
|
<tr><td valign=top><em>head</em> </td><td> |
| 652 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>.</td></tr> |
| 653 |
|
|
</table> |
| 654 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 655 |
|
|
A <code>size_t</code>. </dl> </td> |
| 656 |
|
|
</tr> |
| 657 |
|
|
</table> |
| 658 |
|
|
<a name="a31" doxytag="dbprim.h::sh_table"></a><p> |
| 659 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 660 |
|
|
<tr> |
| 661 |
|
|
<td class="md"> |
| 662 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 663 |
|
|
<tr> |
| 664 |
|
|
<td class="md" nowrap valign="top"> #define sh_table</td> |
| 665 |
|
|
<td class="md" valign="top">( </td> |
| 666 |
|
|
<td class="md" nowrap valign="top">head </td> |
| 667 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 668 |
|
|
<td class="md" valign="top">) </td> |
| 669 |
|
|
<td class="md" nowrap> |
| 670 |
|
|
</table> |
| 671 |
|
|
</td> |
| 672 |
|
|
</tr> |
| 673 |
|
|
</table> |
| 674 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 675 |
|
|
<tr> |
| 676 |
|
|
<td> |
| 677 |
|
|
|
| 678 |
|
|
</td> |
| 679 |
|
|
<td> |
| 680 |
|
|
|
| 681 |
|
|
<p> |
| 682 |
|
|
If there are any elements in this sparse matrix list head, this macro will retrieve a pointer to the table in which they reside.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 683 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 684 |
|
|
<tr><td valign=top><em>head</em> </td><td> |
| 685 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>.</td></tr> |
| 686 |
|
|
</table> |
| 687 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 688 |
|
|
A pointer to <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>. </dl> </td> |
| 689 |
|
|
</tr> |
| 690 |
|
|
</table> |
| 691 |
|
|
<a name="a29" doxytag="dbprim.h::sh_verify"></a><p> |
| 692 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 693 |
|
|
<tr> |
| 694 |
|
|
<td class="md"> |
| 695 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 696 |
|
|
<tr> |
| 697 |
|
|
<td class="md" nowrap valign="top"> #define sh_verify</td> |
| 698 |
|
|
<td class="md" valign="top">( </td> |
| 699 |
|
|
<td class="md" nowrap valign="top">head </td> |
| 700 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 701 |
|
|
<td class="md" valign="top">) </td> |
| 702 |
|
|
<td class="md" nowrap> |
| 703 |
|
|
</table> |
| 704 |
|
|
</td> |
| 705 |
|
|
</tr> |
| 706 |
|
|
</table> |
| 707 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 708 |
|
|
<tr> |
| 709 |
|
|
<td> |
| 710 |
|
|
|
| 711 |
|
|
</td> |
| 712 |
|
|
<td> |
| 713 |
|
|
|
| 714 |
|
|
<p> |
| 715 |
|
|
This macro verifies that a given pointer actually does point to a sparse matrix head. |
| 716 |
|
|
<p> |
| 717 |
|
|
<dl compact><dt><b>Warning: </b></dt><dd> |
| 718 |
|
|
This macro may evaluate the <code>head</code> argument twice.</dl><dl compact><dt><b>Parameters: </b></dt><dd> |
| 719 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 720 |
|
|
<tr><td valign=top><em>head</em> </td><td> |
| 721 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>.</td></tr> |
| 722 |
|
|
</table> |
| 723 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 724 |
|
|
Boolean true if <code>head</code> is a valid sparse matrix head or false otherwise. </dl> </td> |
| 725 |
|
|
</tr> |
| 726 |
|
|
</table> |
| 727 |
|
|
<a name="a28" doxytag="dbprim.h::SMAT_HEAD_INIT"></a><p> |
| 728 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 729 |
|
|
<tr> |
| 730 |
|
|
<td class="md"> |
| 731 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 732 |
|
|
<tr> |
| 733 |
|
|
<td class="md" nowrap valign="top"> #define SMAT_HEAD_INIT</td> |
| 734 |
|
|
<td class="md" valign="top">( </td> |
| 735 |
|
|
<td class="md" nowrap valign="top">elem, <tr> |
| 736 |
|
|
<td></td> |
| 737 |
|
|
<td></td> |
| 738 |
|
|
<td class="md" nowrap>object </td> |
| 739 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 740 |
|
|
<td class="md" valign="top">) </td> |
| 741 |
|
|
<td class="md" nowrap> |
| 742 |
|
|
</table> |
| 743 |
|
|
</td> |
| 744 |
|
|
</tr> |
| 745 |
|
|
</table> |
| 746 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 747 |
|
|
<tr> |
| 748 |
|
|
<td> |
| 749 |
|
|
|
| 750 |
|
|
</td> |
| 751 |
|
|
<td> |
| 752 |
|
|
|
| 753 |
|
|
<p> |
| 754 |
|
|
This macro statically initializes a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 755 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 756 |
|
|
<tr><td valign=top><em>elem</em> </td><td> |
| 757 |
|
|
One of <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> specifing whether the object is a member of the set of rows or columns. </td></tr> |
| 758 |
|
|
<tr><td valign=top><em>object</em> </td><td> |
| 759 |
|
|
A pointer to <code>void</code> representing the object associated with the list head. </td></tr> |
| 760 |
|
|
</table> |
| 761 |
|
|
</dl> </td> |
| 762 |
|
|
</tr> |
| 763 |
|
|
</table> |
| 764 |
|
|
<a name="a25" doxytag="dbprim.h::st_count"></a><p> |
| 765 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 766 |
|
|
<tr> |
| 767 |
|
|
<td class="md"> |
| 768 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 769 |
|
|
<tr> |
| 770 |
|
|
<td class="md" nowrap valign="top"> #define st_count</td> |
| 771 |
|
|
<td class="md" valign="top">( </td> |
| 772 |
|
|
<td class="md" nowrap valign="top">table </td> |
| 773 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 774 |
|
|
<td class="md" valign="top">) </td> |
| 775 |
|
|
<td class="md" nowrap> |
| 776 |
|
|
</table> |
| 777 |
|
|
</td> |
| 778 |
|
|
</tr> |
| 779 |
|
|
</table> |
| 780 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 781 |
|
|
<tr> |
| 782 |
|
|
<td> |
| 783 |
|
|
|
| 784 |
|
|
</td> |
| 785 |
|
|
<td> |
| 786 |
|
|
|
| 787 |
|
|
<p> |
| 788 |
|
|
This macro retrieves the total number of items actually in the sparse matrix table.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 789 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 790 |
|
|
<tr><td valign=top><em>table</em> </td><td> |
| 791 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>.</td></tr> |
| 792 |
|
|
</table> |
| 793 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 794 |
|
|
An <code>unsigned long</code> containing a count of the number of items in the sparse matrix table. </dl> </td> |
| 795 |
|
|
</tr> |
| 796 |
|
|
</table> |
| 797 |
|
|
<a name="a26" doxytag="dbprim.h::st_extra"></a><p> |
| 798 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 799 |
|
|
<tr> |
| 800 |
|
|
<td class="md"> |
| 801 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 802 |
|
|
<tr> |
| 803 |
|
|
<td class="md" nowrap valign="top"> #define st_extra</td> |
| 804 |
|
|
<td class="md" valign="top">( </td> |
| 805 |
|
|
<td class="md" nowrap valign="top">table </td> |
| 806 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 807 |
|
|
<td class="md" valign="top">) </td> |
| 808 |
|
|
<td class="md" nowrap> |
| 809 |
|
|
</table> |
| 810 |
|
|
</td> |
| 811 |
|
|
</tr> |
| 812 |
|
|
</table> |
| 813 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 814 |
|
|
<tr> |
| 815 |
|
|
<td> |
| 816 |
|
|
|
| 817 |
|
|
</td> |
| 818 |
|
|
<td> |
| 819 |
|
|
|
| 820 |
|
|
<p> |
| 821 |
|
|
This macro retrieves the extra pointer data associated with a particular sparse matrix table.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 822 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 823 |
|
|
<tr><td valign=top><em>table</em> </td><td> |
| 824 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>.</td></tr> |
| 825 |
|
|
</table> |
| 826 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 827 |
|
|
A pointer to <code>void</code>. </dl> </td> |
| 828 |
|
|
</tr> |
| 829 |
|
|
</table> |
| 830 |
|
|
<a name="a22" doxytag="dbprim.h::st_flags"></a><p> |
| 831 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 832 |
|
|
<tr> |
| 833 |
|
|
<td class="md"> |
| 834 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 835 |
|
|
<tr> |
| 836 |
|
|
<td class="md" nowrap valign="top"> #define st_flags</td> |
| 837 |
|
|
<td class="md" valign="top">( </td> |
| 838 |
|
|
<td class="md" nowrap valign="top">table </td> |
| 839 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 840 |
|
|
<td class="md" valign="top">) </td> |
| 841 |
|
|
<td class="md" nowrap> |
| 842 |
|
|
</table> |
| 843 |
|
|
</td> |
| 844 |
|
|
</tr> |
| 845 |
|
|
</table> |
| 846 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 847 |
|
|
<tr> |
| 848 |
|
|
<td> |
| 849 |
|
|
|
| 850 |
|
|
</td> |
| 851 |
|
|
<td> |
| 852 |
|
|
|
| 853 |
|
|
<p> |
| 854 |
|
|
This macro retrieves the flags associated with the sparse matrix table. Only <a class="el" href="group__dbprim__hash.html#a16">HASH_FLAG_AUTOGROW</a> and <a class="el" href="group__dbprim__hash.html#a17">HASH_FLAG_AUTOSHRINK</a> 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.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 855 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 856 |
|
|
<tr><td valign=top><em>table</em> </td><td> |
| 857 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>.</td></tr> |
| 858 |
|
|
</table> |
| 859 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 860 |
|
|
An <code>unsigned long</code> containing the flags for the sparse matrix table. </dl> </td> |
| 861 |
|
|
</tr> |
| 862 |
|
|
</table> |
| 863 |
|
|
<a name="a23" doxytag="dbprim.h::st_frozen"></a><p> |
| 864 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 865 |
|
|
<tr> |
| 866 |
|
|
<td class="md"> |
| 867 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 868 |
|
|
<tr> |
| 869 |
|
|
<td class="md" nowrap valign="top"> #define st_frozen</td> |
| 870 |
|
|
<td class="md" valign="top">( </td> |
| 871 |
|
|
<td class="md" nowrap valign="top">table </td> |
| 872 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 873 |
|
|
<td class="md" valign="top">) </td> |
| 874 |
|
|
<td class="md" nowrap> |
| 875 |
|
|
</table> |
| 876 |
|
|
</td> |
| 877 |
|
|
</tr> |
| 878 |
|
|
</table> |
| 879 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 880 |
|
|
<tr> |
| 881 |
|
|
<td> |
| 882 |
|
|
|
| 883 |
|
|
</td> |
| 884 |
|
|
<td> |
| 885 |
|
|
|
| 886 |
|
|
<p> |
| 887 |
|
|
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.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 888 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 889 |
|
|
<tr><td valign=top><em>table</em> </td><td> |
| 890 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>.</td></tr> |
| 891 |
|
|
</table> |
| 892 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 893 |
|
|
A zero value if the matrix is not frozen or a non-zero value if the matrix is frozen. </dl> </td> |
| 894 |
|
|
</tr> |
| 895 |
|
|
</table> |
| 896 |
|
|
<a name="a24" doxytag="dbprim.h::st_modulus"></a><p> |
| 897 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 898 |
|
|
<tr> |
| 899 |
|
|
<td class="md"> |
| 900 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 901 |
|
|
<tr> |
| 902 |
|
|
<td class="md" nowrap valign="top"> #define st_modulus</td> |
| 903 |
|
|
<td class="md" valign="top">( </td> |
| 904 |
|
|
<td class="md" nowrap valign="top">table </td> |
| 905 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 906 |
|
|
<td class="md" valign="top">) </td> |
| 907 |
|
|
<td class="md" nowrap> |
| 908 |
|
|
</table> |
| 909 |
|
|
</td> |
| 910 |
|
|
</tr> |
| 911 |
|
|
</table> |
| 912 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 913 |
|
|
<tr> |
| 914 |
|
|
<td> |
| 915 |
|
|
|
| 916 |
|
|
</td> |
| 917 |
|
|
<td> |
| 918 |
|
|
|
| 919 |
|
|
<p> |
| 920 |
|
|
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.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 921 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 922 |
|
|
<tr><td valign=top><em>table</em> </td><td> |
| 923 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>.</td></tr> |
| 924 |
|
|
</table> |
| 925 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 926 |
|
|
An <code>unsigned long</code> containing the number of buckets allocated for the sparse matrix table. </dl> </td> |
| 927 |
|
|
</tr> |
| 928 |
|
|
</table> |
| 929 |
|
|
<a name="a27" doxytag="dbprim.h::st_size"></a><p> |
| 930 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 931 |
|
|
<tr> |
| 932 |
|
|
<td class="md"> |
| 933 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 934 |
|
|
<tr> |
| 935 |
|
|
<td class="md" nowrap valign="top"> #define st_size</td> |
| 936 |
|
|
<td class="md" valign="top">( </td> |
| 937 |
|
|
<td class="md" nowrap valign="top">table </td> |
| 938 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 939 |
|
|
<td class="md" valign="top">) </td> |
| 940 |
|
|
<td class="md" nowrap> |
| 941 |
|
|
</table> |
| 942 |
|
|
</td> |
| 943 |
|
|
</tr> |
| 944 |
|
|
</table> |
| 945 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 946 |
|
|
<tr> |
| 947 |
|
|
<td> |
| 948 |
|
|
|
| 949 |
|
|
</td> |
| 950 |
|
|
<td> |
| 951 |
|
|
|
| 952 |
|
|
<p> |
| 953 |
|
|
This macro returns the physical size of the memory allocated by the library for this sparse matrix table. |
| 954 |
|
|
<p> |
| 955 |
|
|
<dl compact><dt><b>Note: </b></dt><dd> |
| 956 |
|
|
The <a class="el" href="group__dbprim__smat.html#a27">st_size()</a> macro already counts the memory for each list in the table. Summing the results of <a class="el" href="group__dbprim__smat.html#a37">sh_size()</a> and <a class="el" href="group__dbprim__smat.html#a27">st_size()</a> will over-count the amount of memory actually in use.</dl><dl compact><dt><b>Parameters: </b></dt><dd> |
| 957 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 958 |
|
|
<tr><td valign=top><em>table</em> </td><td> |
| 959 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>.</td></tr> |
| 960 |
|
|
</table> |
| 961 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 962 |
|
|
A <code>size_t</code>. </dl> </td> |
| 963 |
|
|
</tr> |
| 964 |
|
|
</table> |
| 965 |
|
|
<a name="a21" doxytag="dbprim.h::st_verify"></a><p> |
| 966 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 967 |
|
|
<tr> |
| 968 |
|
|
<td class="md"> |
| 969 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 970 |
|
|
<tr> |
| 971 |
|
|
<td class="md" nowrap valign="top"> #define st_verify</td> |
| 972 |
|
|
<td class="md" valign="top">( </td> |
| 973 |
|
|
<td class="md" nowrap valign="top">table </td> |
| 974 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 975 |
|
|
<td class="md" valign="top">) </td> |
| 976 |
|
|
<td class="md" nowrap> |
| 977 |
|
|
</table> |
| 978 |
|
|
</td> |
| 979 |
|
|
</tr> |
| 980 |
|
|
</table> |
| 981 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 982 |
|
|
<tr> |
| 983 |
|
|
<td> |
| 984 |
|
|
|
| 985 |
|
|
</td> |
| 986 |
|
|
<td> |
| 987 |
|
|
|
| 988 |
|
|
<p> |
| 989 |
|
|
This macro verifies that a given pointer actually does point to a sparse matrix table. |
| 990 |
|
|
<p> |
| 991 |
|
|
<dl compact><dt><b>Warning: </b></dt><dd> |
| 992 |
|
|
This macro may evaluate the <code>table</code> argument twice.</dl><dl compact><dt><b>Parameters: </b></dt><dd> |
| 993 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 994 |
|
|
<tr><td valign=top><em>table</em> </td><td> |
| 995 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>.</td></tr> |
| 996 |
|
|
</table> |
| 997 |
|
|
</dl><dl compact><dt><b>Returns: </b></dt><dd> |
| 998 |
|
|
Boolean true if <code>table</code> is a valid sparse matrix table or false otherwise. </dl> </td> |
| 999 |
|
|
</tr> |
| 1000 |
|
|
</table> |
| 1001 |
|
|
<hr><h2>Typedef Documentation</h2> |
| 1002 |
|
|
<a name="a5" doxytag="dbprim.h::smat_comp_t"></a><p> |
| 1003 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1004 |
|
|
<tr> |
| 1005 |
|
|
<td class="md"> |
| 1006 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1007 |
|
|
<tr> |
| 1008 |
|
|
<td class="md" nowrap valign="top"> typedef unsigned long(* smat_comp_t)(<a class="el" href="group__dbprim.html#a0">db_key_t</a> *, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> *) |
| 1009 |
|
|
</table> |
| 1010 |
|
|
</td> |
| 1011 |
|
|
</tr> |
| 1012 |
|
|
</table> |
| 1013 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1014 |
|
|
<tr> |
| 1015 |
|
|
<td> |
| 1016 |
|
|
|
| 1017 |
|
|
</td> |
| 1018 |
|
|
<td> |
| 1019 |
|
|
|
| 1020 |
|
|
<p> |
| 1021 |
|
|
This function pointer references a callback used by <a class="el" href="group__dbprim__smat.html#a19">sh_find()</a>. It should return 0 if the sparse matrix entry represented by the second argument matches the key passed as the first argument. </td> |
| 1022 |
|
|
</tr> |
| 1023 |
|
|
</table> |
| 1024 |
|
|
<a name="a2" doxytag="dbprim.h::smat_entry_t"></a><p> |
| 1025 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1026 |
|
|
<tr> |
| 1027 |
|
|
<td class="md"> |
| 1028 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1029 |
|
|
<tr> |
| 1030 |
|
|
<td class="md" nowrap valign="top"> typedef struct _smat_entry_s smat_entry_t |
| 1031 |
|
|
</table> |
| 1032 |
|
|
</td> |
| 1033 |
|
|
</tr> |
| 1034 |
|
|
</table> |
| 1035 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1036 |
|
|
<tr> |
| 1037 |
|
|
<td> |
| 1038 |
|
|
|
| 1039 |
|
|
</td> |
| 1040 |
|
|
<td> |
| 1041 |
|
|
|
| 1042 |
|
|
<p> |
| 1043 |
|
|
This structure is allocated by the library and represents a single element in a sparse matrix. </td> |
| 1044 |
|
|
</tr> |
| 1045 |
|
|
</table> |
| 1046 |
|
|
<a name="a1" doxytag="dbprim.h::smat_head_t"></a><p> |
| 1047 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1048 |
|
|
<tr> |
| 1049 |
|
|
<td class="md"> |
| 1050 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1051 |
|
|
<tr> |
| 1052 |
|
|
<td class="md" nowrap valign="top"> typedef struct _smat_head_s smat_head_t |
| 1053 |
|
|
</table> |
| 1054 |
|
|
</td> |
| 1055 |
|
|
</tr> |
| 1056 |
|
|
</table> |
| 1057 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1058 |
|
|
<tr> |
| 1059 |
|
|
<td> |
| 1060 |
|
|
|
| 1061 |
|
|
</td> |
| 1062 |
|
|
<td> |
| 1063 |
|
|
|
| 1064 |
|
|
<p> |
| 1065 |
|
|
This structure is the head of a linked list of sparse matrix entries. </td> |
| 1066 |
|
|
</tr> |
| 1067 |
|
|
</table> |
| 1068 |
|
|
<a name="a4" doxytag="dbprim.h::smat_iter_t"></a><p> |
| 1069 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1070 |
|
|
<tr> |
| 1071 |
|
|
<td class="md"> |
| 1072 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1073 |
|
|
<tr> |
| 1074 |
|
|
<td class="md" nowrap valign="top"> typedef unsigned long(* smat_iter_t)(<a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> *, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> *, void *) |
| 1075 |
|
|
</table> |
| 1076 |
|
|
</td> |
| 1077 |
|
|
</tr> |
| 1078 |
|
|
</table> |
| 1079 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1080 |
|
|
<tr> |
| 1081 |
|
|
<td> |
| 1082 |
|
|
|
| 1083 |
|
|
</td> |
| 1084 |
|
|
<td> |
| 1085 |
|
|
|
| 1086 |
|
|
<p> |
| 1087 |
|
|
This function pointer references a callback used by <a class="el" href="group__dbprim__smat.html#a13">st_iter()</a>, <a class="el" href="group__dbprim__smat.html#a14">st_flush()</a>, <a class="el" href="group__dbprim__smat.html#a20">sh_iter()</a>, 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. </td> |
| 1088 |
|
|
</tr> |
| 1089 |
|
|
</table> |
| 1090 |
|
|
<a name="a6" doxytag="dbprim.h::smat_loc_t"></a><p> |
| 1091 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1092 |
|
|
<tr> |
| 1093 |
|
|
<td class="md"> |
| 1094 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1095 |
|
|
<tr> |
| 1096 |
|
|
<td class="md" nowrap valign="top"> typedef enum <a class="el" href="group__dbprim__smat.html#a47">_smat_loc_e</a> smat_loc_t |
| 1097 |
|
|
</table> |
| 1098 |
|
|
</td> |
| 1099 |
|
|
</tr> |
| 1100 |
|
|
</table> |
| 1101 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1102 |
|
|
<tr> |
| 1103 |
|
|
<td> |
| 1104 |
|
|
|
| 1105 |
|
|
</td> |
| 1106 |
|
|
<td> |
| 1107 |
|
|
|
| 1108 |
|
|
<p> |
| 1109 |
|
|
See the documentation for the enumeration <a class="el" href="group__dbprim__smat.html#a47">_smat_loc_e</a>. </td> |
| 1110 |
|
|
</tr> |
| 1111 |
|
|
</table> |
| 1112 |
|
|
<a name="a3" doxytag="dbprim.h::smat_resize_t"></a><p> |
| 1113 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1114 |
|
|
<tr> |
| 1115 |
|
|
<td class="md"> |
| 1116 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1117 |
|
|
<tr> |
| 1118 |
|
|
<td class="md" nowrap valign="top"> typedef unsigned long(* smat_resize_t)(<a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> *, unsigned long) |
| 1119 |
|
|
</table> |
| 1120 |
|
|
</td> |
| 1121 |
|
|
</tr> |
| 1122 |
|
|
</table> |
| 1123 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1124 |
|
|
<tr> |
| 1125 |
|
|
<td> |
| 1126 |
|
|
|
| 1127 |
|
|
</td> |
| 1128 |
|
|
<td> |
| 1129 |
|
|
|
| 1130 |
|
|
<p> |
| 1131 |
|
|
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. </td> |
| 1132 |
|
|
</tr> |
| 1133 |
|
|
</table> |
| 1134 |
|
|
<a name="a0" doxytag="dbprim.h::smat_table_t"></a><p> |
| 1135 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1136 |
|
|
<tr> |
| 1137 |
|
|
<td class="md"> |
| 1138 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1139 |
|
|
<tr> |
| 1140 |
|
|
<td class="md" nowrap valign="top"> typedef struct _smat_table_s smat_table_t |
| 1141 |
|
|
</table> |
| 1142 |
|
|
</td> |
| 1143 |
|
|
</tr> |
| 1144 |
|
|
</table> |
| 1145 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1146 |
|
|
<tr> |
| 1147 |
|
|
<td> |
| 1148 |
|
|
|
| 1149 |
|
|
</td> |
| 1150 |
|
|
<td> |
| 1151 |
|
|
|
| 1152 |
|
|
<p> |
| 1153 |
|
|
This structure is the basis of all sparse matrices maintained by this library. </td> |
| 1154 |
|
|
</tr> |
| 1155 |
|
|
</table> |
| 1156 |
|
|
<hr><h2>Enumeration Type Documentation</h2> |
| 1157 |
|
|
<a name="a47" doxytag="dbprim.h::_smat_loc_e"></a><p> |
| 1158 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1159 |
|
|
<tr> |
| 1160 |
|
|
<td class="md"> |
| 1161 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1162 |
|
|
<tr> |
| 1163 |
|
|
<td class="md" nowrap valign="top"> enum _smat_loc_e |
| 1164 |
|
|
</table> |
| 1165 |
|
|
</td> |
| 1166 |
|
|
</tr> |
| 1167 |
|
|
</table> |
| 1168 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1169 |
|
|
<tr> |
| 1170 |
|
|
<td> |
| 1171 |
|
|
|
| 1172 |
|
|
</td> |
| 1173 |
|
|
<td> |
| 1174 |
|
|
|
| 1175 |
|
|
<p> |
| 1176 |
|
|
This enumeration is used to specify whether an element is a row or column element. It should be referenced by the typedef <a class="el" href="group__dbprim__smat.html#a6">smat_loc_t</a>. <dl compact><dt><b>Enumeration values: </b></dt><dd> |
| 1177 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1178 |
|
|
<tr><td valign=top><em><a name="a47a135" doxytag="SMAT_LOC_FIRST"></a><em>SMAT_LOC_FIRST</em></em> </td><td> |
| 1179 |
|
|
First entry (``row''). </td></tr> |
| 1180 |
|
|
<tr><td valign=top><em><a name="a47a136" doxytag="SMAT_LOC_SECOND"></a><em>SMAT_LOC_SECOND</em></em> </td><td> |
| 1181 |
|
|
Second entry (``column''). </td></tr> |
| 1182 |
|
|
</table> |
| 1183 |
|
|
</dl> |
| 1184 |
|
|
</td> |
| 1185 |
|
|
</tr> |
| 1186 |
|
|
</table> |
| 1187 |
|
|
<hr><h2>Function Documentation</h2> |
| 1188 |
|
|
<a name="a19" doxytag="sh_find.c::sh_find"></a><p> |
| 1189 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1190 |
|
|
<tr> |
| 1191 |
|
|
<td class="md"> |
| 1192 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1193 |
|
|
<tr> |
| 1194 |
|
|
<td class="md" nowrap valign="top"> unsigned long sh_find </td> |
| 1195 |
|
|
<td class="md" valign="top">( </td> |
| 1196 |
|
|
<td class="md" nowrap valign="top"><a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> * </td> |
| 1197 |
|
|
<td class="mdname" nowrap> <em>head</em>, </td> |
| 1198 |
|
|
</tr> |
| 1199 |
|
|
<tr> |
| 1200 |
|
|
<td></td> |
| 1201 |
|
|
<td></td> |
| 1202 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> ** </td> |
| 1203 |
|
|
<td class="mdname" nowrap> <em>elem_p</em>, </td> |
| 1204 |
|
|
</tr> |
| 1205 |
|
|
<tr> |
| 1206 |
|
|
<td></td> |
| 1207 |
|
|
<td></td> |
| 1208 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a5">smat_comp_t</a> </td> |
| 1209 |
|
|
<td class="mdname" nowrap> <em>comp_func</em>, </td> |
| 1210 |
|
|
</tr> |
| 1211 |
|
|
<tr> |
| 1212 |
|
|
<td></td> |
| 1213 |
|
|
<td></td> |
| 1214 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> * </td> |
| 1215 |
|
|
<td class="mdname" nowrap> <em>start</em>, </td> |
| 1216 |
|
|
</tr> |
| 1217 |
|
|
<tr> |
| 1218 |
|
|
<td></td> |
| 1219 |
|
|
<td></td> |
| 1220 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim.html#a0">db_key_t</a> * </td> |
| 1221 |
|
|
<td class="mdname" nowrap> <em>key</em></td> |
| 1222 |
|
|
</tr> |
| 1223 |
|
|
<tr> |
| 1224 |
|
|
<td></td> |
| 1225 |
|
|
<td class="md">) </td> |
| 1226 |
|
|
<td class="md" colspan="2"></td> |
| 1227 |
|
|
</tr> |
| 1228 |
|
|
|
| 1229 |
|
|
</table> |
| 1230 |
|
|
</td> |
| 1231 |
|
|
</tr> |
| 1232 |
|
|
</table> |
| 1233 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1234 |
|
|
<tr> |
| 1235 |
|
|
<td> |
| 1236 |
|
|
|
| 1237 |
|
|
</td> |
| 1238 |
|
|
<td> |
| 1239 |
|
|
|
| 1240 |
|
|
<p> |
| 1241 |
|
|
This function iterates through the given row or column of a sparse matrix looking for an element that matches the given <code>key</code>.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 1242 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1243 |
|
|
<tr><td valign=top><em>head</em> </td><td> |
| 1244 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>. </td></tr> |
| 1245 |
|
|
<tr><td valign=top><em>elem_p</em> </td><td> |
| 1246 |
|
|
A pointer to a pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. This is a result pramater. <code>NULL</code> is an invalid value. </td></tr> |
| 1247 |
|
|
<tr><td valign=top><em>comp_func</em> </td><td> |
| 1248 |
|
|
A pointer to a comparison function used to compare the key to a particular entry. See the documentation for <a class="el" href="group__dbprim__smat.html#a5">smat_comp_t</a> for more information. </td></tr> |
| 1249 |
|
|
<tr><td valign=top><em>start</em> </td><td> |
| 1250 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> describing where in the row or column to start. If <code>NULL</code> is passed, the beginning of the row or column will be assumed. </td></tr> |
| 1251 |
|
|
<tr><td valign=top><em>key</em> </td><td> |
| 1252 |
|
|
A key to search for.</td></tr> |
| 1253 |
|
|
</table> |
| 1254 |
|
|
</dl><dl compact><dt><b>Return values: </b></dt><dd> |
| 1255 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1256 |
|
|
<tr><td valign=top><em>DB_ERR_BADARGS</em> </td><td> |
| 1257 |
|
|
An argument was invalid. </td></tr> |
| 1258 |
|
|
<tr><td valign=top><em>DB_ERR_WRONGTABLE</em> </td><td> |
| 1259 |
|
|
<code>start</code> is not in this row or column. </td></tr> |
| 1260 |
|
|
<tr><td valign=top><em>DB_ERR_NOENTRY</em> </td><td> |
| 1261 |
|
|
No matching entry was found. </td></tr> |
| 1262 |
|
|
</table> |
| 1263 |
|
|
</dl> </td> |
| 1264 |
|
|
</tr> |
| 1265 |
|
|
</table> |
| 1266 |
|
|
<a name="a17" doxytag="sh_init.c::sh_init"></a><p> |
| 1267 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1268 |
|
|
<tr> |
| 1269 |
|
|
<td class="md"> |
| 1270 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1271 |
|
|
<tr> |
| 1272 |
|
|
<td class="md" nowrap valign="top"> unsigned long sh_init </td> |
| 1273 |
|
|
<td class="md" valign="top">( </td> |
| 1274 |
|
|
<td class="md" nowrap valign="top"><a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> * </td> |
| 1275 |
|
|
<td class="mdname" nowrap> <em>head</em>, </td> |
| 1276 |
|
|
</tr> |
| 1277 |
|
|
<tr> |
| 1278 |
|
|
<td></td> |
| 1279 |
|
|
<td></td> |
| 1280 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a6">smat_loc_t</a> </td> |
| 1281 |
|
|
<td class="mdname" nowrap> <em>elem</em>, </td> |
| 1282 |
|
|
</tr> |
| 1283 |
|
|
<tr> |
| 1284 |
|
|
<td></td> |
| 1285 |
|
|
<td></td> |
| 1286 |
|
|
<td class="md" nowrap>void * </td> |
| 1287 |
|
|
<td class="mdname" nowrap> <em>object</em></td> |
| 1288 |
|
|
</tr> |
| 1289 |
|
|
<tr> |
| 1290 |
|
|
<td></td> |
| 1291 |
|
|
<td class="md">) </td> |
| 1292 |
|
|
<td class="md" colspan="2"></td> |
| 1293 |
|
|
</tr> |
| 1294 |
|
|
|
| 1295 |
|
|
</table> |
| 1296 |
|
|
</td> |
| 1297 |
|
|
</tr> |
| 1298 |
|
|
</table> |
| 1299 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1300 |
|
|
<tr> |
| 1301 |
|
|
<td> |
| 1302 |
|
|
|
| 1303 |
|
|
</td> |
| 1304 |
|
|
<td> |
| 1305 |
|
|
|
| 1306 |
|
|
<p> |
| 1307 |
|
|
This function dynamically initializes a sparse matrix row or column linked list head. The <code>elem</code> argument specifies whether the object is to be associated with a <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> list or a <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> list.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 1308 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1309 |
|
|
<tr><td valign=top><em>head</em> </td><td> |
| 1310 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> to be initialized. </td></tr> |
| 1311 |
|
|
<tr><td valign=top><em>elem</em> </td><td> |
| 1312 |
|
|
Either <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a>. </td></tr> |
| 1313 |
|
|
<tr><td valign=top><em>object</em> </td><td> |
| 1314 |
|
|
A pointer to the object containing the sparse matrix row or column head.</td></tr> |
| 1315 |
|
|
</table> |
| 1316 |
|
|
</dl><dl compact><dt><b>Return values: </b></dt><dd> |
| 1317 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1318 |
|
|
<tr><td valign=top><em>DB_ERR_BADARGS</em> </td><td> |
| 1319 |
|
|
An invalid argument was given. </td></tr> |
| 1320 |
|
|
</table> |
| 1321 |
|
|
</dl> </td> |
| 1322 |
|
|
</tr> |
| 1323 |
|
|
</table> |
| 1324 |
|
|
<a name="a20" doxytag="sh_iter.c::sh_iter"></a><p> |
| 1325 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1326 |
|
|
<tr> |
| 1327 |
|
|
<td class="md"> |
| 1328 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1329 |
|
|
<tr> |
| 1330 |
|
|
<td class="md" nowrap valign="top"> unsigned long sh_iter </td> |
| 1331 |
|
|
<td class="md" valign="top">( </td> |
| 1332 |
|
|
<td class="md" nowrap valign="top"><a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> * </td> |
| 1333 |
|
|
<td class="mdname" nowrap> <em>head</em>, </td> |
| 1334 |
|
|
</tr> |
| 1335 |
|
|
<tr> |
| 1336 |
|
|
<td></td> |
| 1337 |
|
|
<td></td> |
| 1338 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> * </td> |
| 1339 |
|
|
<td class="mdname" nowrap> <em>start</em>, </td> |
| 1340 |
|
|
</tr> |
| 1341 |
|
|
<tr> |
| 1342 |
|
|
<td></td> |
| 1343 |
|
|
<td></td> |
| 1344 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a4">smat_iter_t</a> </td> |
| 1345 |
|
|
<td class="mdname" nowrap> <em>iter_func</em>, </td> |
| 1346 |
|
|
</tr> |
| 1347 |
|
|
<tr> |
| 1348 |
|
|
<td></td> |
| 1349 |
|
|
<td></td> |
| 1350 |
|
|
<td class="md" nowrap>void * </td> |
| 1351 |
|
|
<td class="mdname" nowrap> <em>extra</em>, </td> |
| 1352 |
|
|
</tr> |
| 1353 |
|
|
<tr> |
| 1354 |
|
|
<td></td> |
| 1355 |
|
|
<td></td> |
| 1356 |
|
|
<td class="md" nowrap>unsigned long </td> |
| 1357 |
|
|
<td class="mdname" nowrap> <em>flags</em></td> |
| 1358 |
|
|
</tr> |
| 1359 |
|
|
<tr> |
| 1360 |
|
|
<td></td> |
| 1361 |
|
|
<td class="md">) </td> |
| 1362 |
|
|
<td class="md" colspan="2"></td> |
| 1363 |
|
|
</tr> |
| 1364 |
|
|
|
| 1365 |
|
|
</table> |
| 1366 |
|
|
</td> |
| 1367 |
|
|
</tr> |
| 1368 |
|
|
</table> |
| 1369 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1370 |
|
|
<tr> |
| 1371 |
|
|
<td> |
| 1372 |
|
|
|
| 1373 |
|
|
</td> |
| 1374 |
|
|
<td> |
| 1375 |
|
|
|
| 1376 |
|
|
<p> |
| 1377 |
|
|
This function iterates over a row or column of a sparse matrix, executing the given <code>iter_func</code> for each entry.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 1378 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1379 |
|
|
<tr><td valign=top><em>head</em> </td><td> |
| 1380 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>. </td></tr> |
| 1381 |
|
|
<tr><td valign=top><em>start</em> </td><td> |
| 1382 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> describing where in the row or column to start. If <code>NULL</code> is passed, the beginning of the row or column will be assumed. </td></tr> |
| 1383 |
|
|
<tr><td valign=top><em>iter_func</em> </td><td> |
| 1384 |
|
|
A pointer to a callback function used to perform user-specified actions on an entry in a row or column of a sparse matrix. <code>NULL</code> is an invalid value. See the documentation for <a class="el" href="group__dbprim__smat.html#a4">smat_iter_t</a> for more information. </td></tr> |
| 1385 |
|
|
<tr><td valign=top><em>extra</em> </td><td> |
| 1386 |
|
|
A <code>void</code> pointer that will be passed to <code>iter_func</code>. </td></tr> |
| 1387 |
|
|
<tr><td valign=top><em>flags</em> </td><td> |
| 1388 |
|
|
If <a class="el" href="group__dbprim.html#a4">DB_FLAG_REVERSE</a> is given, iteration will be done from the end of the list backwards towards the head.</td></tr> |
| 1389 |
|
|
</table> |
| 1390 |
|
|
</dl><dl compact><dt><b>Return values: </b></dt><dd> |
| 1391 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1392 |
|
|
<tr><td valign=top><em>DB_ERR_BADARGS</em> </td><td> |
| 1393 |
|
|
An argument was invalid. </td></tr> |
| 1394 |
|
|
<tr><td valign=top><em>DB_ERR_WRONGTABLE</em> </td><td> |
| 1395 |
|
|
<code>start</code> is not in this row or column. </td></tr> |
| 1396 |
|
|
</table> |
| 1397 |
|
|
</dl> </td> |
| 1398 |
|
|
</tr> |
| 1399 |
|
|
</table> |
| 1400 |
|
|
<a name="a18" doxytag="sh_move.c::sh_move"></a><p> |
| 1401 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1402 |
|
|
<tr> |
| 1403 |
|
|
<td class="md"> |
| 1404 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1405 |
|
|
<tr> |
| 1406 |
|
|
<td class="md" nowrap valign="top"> unsigned long sh_move </td> |
| 1407 |
|
|
<td class="md" valign="top">( </td> |
| 1408 |
|
|
<td class="md" nowrap valign="top"><a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> * </td> |
| 1409 |
|
|
<td class="mdname" nowrap> <em>head</em>, </td> |
| 1410 |
|
|
</tr> |
| 1411 |
|
|
<tr> |
| 1412 |
|
|
<td></td> |
| 1413 |
|
|
<td></td> |
| 1414 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> * </td> |
| 1415 |
|
|
<td class="mdname" nowrap> <em>elem</em>, </td> |
| 1416 |
|
|
</tr> |
| 1417 |
|
|
<tr> |
| 1418 |
|
|
<td></td> |
| 1419 |
|
|
<td></td> |
| 1420 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__link.html#a4">link_loc_t</a> </td> |
| 1421 |
|
|
<td class="mdname" nowrap> <em>loc</em>, </td> |
| 1422 |
|
|
</tr> |
| 1423 |
|
|
<tr> |
| 1424 |
|
|
<td></td> |
| 1425 |
|
|
<td></td> |
| 1426 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> * </td> |
| 1427 |
|
|
<td class="mdname" nowrap> <em>elem2</em></td> |
| 1428 |
|
|
</tr> |
| 1429 |
|
|
<tr> |
| 1430 |
|
|
<td></td> |
| 1431 |
|
|
<td class="md">) </td> |
| 1432 |
|
|
<td class="md" colspan="2"></td> |
| 1433 |
|
|
</tr> |
| 1434 |
|
|
|
| 1435 |
|
|
</table> |
| 1436 |
|
|
</td> |
| 1437 |
|
|
</tr> |
| 1438 |
|
|
</table> |
| 1439 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1440 |
|
|
<tr> |
| 1441 |
|
|
<td> |
| 1442 |
|
|
|
| 1443 |
|
|
</td> |
| 1444 |
|
|
<td> |
| 1445 |
|
|
|
| 1446 |
|
|
<p> |
| 1447 |
|
|
This function allows the specified entry to be shifted within the linked list describing the row or column. It is very similar to the <a class="el" href="group__dbprim__link.html#a7">ll_move()</a> function.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 1448 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1449 |
|
|
<tr><td valign=top><em>head</em> </td><td> |
| 1450 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>. </td></tr> |
| 1451 |
|
|
<tr><td valign=top><em>elem</em> </td><td> |
| 1452 |
|
|
A pointer to the <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> describing the entry to be moved. </td></tr> |
| 1453 |
|
|
<tr><td valign=top><em>loc</em> </td><td> |
| 1454 |
|
|
A <a class="el" href="group__dbprim__link.html#a4">link_loc_t</a> indicating where the entry should be moved to. </td></tr> |
| 1455 |
|
|
<tr><td valign=top><em>elem2</em> </td><td> |
| 1456 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> describing another entry in the list if <code>loc</code> is <a class="el" href="group__dbprim__link.html#a26a133">LINK_LOC_BEFORE</a> or <a class="el" href="group__dbprim__link.html#a26a134">LINK_LOC_AFTER</a>.</td></tr> |
| 1457 |
|
|
</table> |
| 1458 |
|
|
</dl><dl compact><dt><b>Return values: </b></dt><dd> |
| 1459 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1460 |
|
|
<tr><td valign=top><em>DB_ERR_BADARGS</em> </td><td> |
| 1461 |
|
|
An argument was invalid. </td></tr> |
| 1462 |
|
|
<tr><td valign=top><em>DB_ERR_BUSY</em> </td><td> |
| 1463 |
|
|
<code>elem</code> and <code>elem2</code> are the same entry. </td></tr> |
| 1464 |
|
|
<tr><td valign=top><em>DB_ERR_WRONGTABLE</em> </td><td> |
| 1465 |
|
|
<code>elem</code> or <code>elem2</code> are in a different row or column. </td></tr> |
| 1466 |
|
|
<tr><td valign=top><em>DB_ERR_UNUSED</em> </td><td> |
| 1467 |
|
|
<code>elem</code> or <code>elem2</code> are not in any row or column. </td></tr> |
| 1468 |
|
|
</table> |
| 1469 |
|
|
</dl> </td> |
| 1470 |
|
|
</tr> |
| 1471 |
|
|
</table> |
| 1472 |
|
|
<a name="a7" doxytag="smat_freelist.c::smat_cleanup"></a><p> |
| 1473 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1474 |
|
|
<tr> |
| 1475 |
|
|
<td class="md"> |
| 1476 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1477 |
|
|
<tr> |
| 1478 |
|
|
<td class="md" nowrap valign="top"> unsigned long smat_cleanup </td> |
| 1479 |
|
|
<td class="md" valign="top">( </td> |
| 1480 |
|
|
<td class="md" nowrap valign="top">void </td> |
| 1481 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 1482 |
|
|
<td class="md" valign="top">) </td> |
| 1483 |
|
|
<td class="md" nowrap></td> |
| 1484 |
|
|
</tr> |
| 1485 |
|
|
|
| 1486 |
|
|
</table> |
| 1487 |
|
|
</td> |
| 1488 |
|
|
</tr> |
| 1489 |
|
|
</table> |
| 1490 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1491 |
|
|
<tr> |
| 1492 |
|
|
<td> |
| 1493 |
|
|
|
| 1494 |
|
|
</td> |
| 1495 |
|
|
<td> |
| 1496 |
|
|
|
| 1497 |
|
|
<p> |
| 1498 |
|
|
This function frees all smat_entry_t objects on the internal free list. It is always successful and returns 0. </td> |
| 1499 |
|
|
</tr> |
| 1500 |
|
|
</table> |
| 1501 |
|
|
<a name="a8" doxytag="smat_freelist.c::smat_freemem"></a><p> |
| 1502 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1503 |
|
|
<tr> |
| 1504 |
|
|
<td class="md"> |
| 1505 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1506 |
|
|
<tr> |
| 1507 |
|
|
<td class="md" nowrap valign="top"> unsigned long smat_freemem </td> |
| 1508 |
|
|
<td class="md" valign="top">( </td> |
| 1509 |
|
|
<td class="md" nowrap valign="top">void </td> |
| 1510 |
|
|
<td class="mdname1" valign="top" nowrap> </td> |
| 1511 |
|
|
<td class="md" valign="top">) </td> |
| 1512 |
|
|
<td class="md" nowrap></td> |
| 1513 |
|
|
</tr> |
| 1514 |
|
|
|
| 1515 |
|
|
</table> |
| 1516 |
|
|
</td> |
| 1517 |
|
|
</tr> |
| 1518 |
|
|
</table> |
| 1519 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1520 |
|
|
<tr> |
| 1521 |
|
|
<td> |
| 1522 |
|
|
|
| 1523 |
|
|
</td> |
| 1524 |
|
|
<td> |
| 1525 |
|
|
|
| 1526 |
|
|
<p> |
| 1527 |
|
|
This function returns the amount of memory being used by the internal free list of smat_entry_t objects. |
| 1528 |
|
|
<p> |
| 1529 |
|
|
<dl compact><dt><b>Returns: </b></dt><dd> |
| 1530 |
|
|
A number indicating the size, in bytes, of the memory allocated for smat_entry_t objects on the free list. </dl> </td> |
| 1531 |
|
|
</tr> |
| 1532 |
|
|
</table> |
| 1533 |
|
|
<a name="a10" doxytag="st_add.c::st_add"></a><p> |
| 1534 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1535 |
|
|
<tr> |
| 1536 |
|
|
<td class="md"> |
| 1537 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1538 |
|
|
<tr> |
| 1539 |
|
|
<td class="md" nowrap valign="top"> unsigned long st_add </td> |
| 1540 |
|
|
<td class="md" valign="top">( </td> |
| 1541 |
|
|
<td class="md" nowrap valign="top"><a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> * </td> |
| 1542 |
|
|
<td class="mdname" nowrap> <em>table</em>, </td> |
| 1543 |
|
|
</tr> |
| 1544 |
|
|
<tr> |
| 1545 |
|
|
<td></td> |
| 1546 |
|
|
<td></td> |
| 1547 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> ** </td> |
| 1548 |
|
|
<td class="mdname" nowrap> <em>entry_p</em>, </td> |
| 1549 |
|
|
</tr> |
| 1550 |
|
|
<tr> |
| 1551 |
|
|
<td></td> |
| 1552 |
|
|
<td></td> |
| 1553 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> * </td> |
| 1554 |
|
|
<td class="mdname" nowrap> <em>head1</em>, </td> |
| 1555 |
|
|
</tr> |
| 1556 |
|
|
<tr> |
| 1557 |
|
|
<td></td> |
| 1558 |
|
|
<td></td> |
| 1559 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__link.html#a4">link_loc_t</a> </td> |
| 1560 |
|
|
<td class="mdname" nowrap> <em>loc1</em>, </td> |
| 1561 |
|
|
</tr> |
| 1562 |
|
|
<tr> |
| 1563 |
|
|
<td></td> |
| 1564 |
|
|
<td></td> |
| 1565 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> * </td> |
| 1566 |
|
|
<td class="mdname" nowrap> <em>ent1</em>, </td> |
| 1567 |
|
|
</tr> |
| 1568 |
|
|
<tr> |
| 1569 |
|
|
<td></td> |
| 1570 |
|
|
<td></td> |
| 1571 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> * </td> |
| 1572 |
|
|
<td class="mdname" nowrap> <em>head2</em>, </td> |
| 1573 |
|
|
</tr> |
| 1574 |
|
|
<tr> |
| 1575 |
|
|
<td></td> |
| 1576 |
|
|
<td></td> |
| 1577 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__link.html#a4">link_loc_t</a> </td> |
| 1578 |
|
|
<td class="mdname" nowrap> <em>loc2</em>, </td> |
| 1579 |
|
|
</tr> |
| 1580 |
|
|
<tr> |
| 1581 |
|
|
<td></td> |
| 1582 |
|
|
<td></td> |
| 1583 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> * </td> |
| 1584 |
|
|
<td class="mdname" nowrap> <em>ent2</em></td> |
| 1585 |
|
|
</tr> |
| 1586 |
|
|
<tr> |
| 1587 |
|
|
<td></td> |
| 1588 |
|
|
<td class="md">) </td> |
| 1589 |
|
|
<td class="md" colspan="2"></td> |
| 1590 |
|
|
</tr> |
| 1591 |
|
|
|
| 1592 |
|
|
</table> |
| 1593 |
|
|
</td> |
| 1594 |
|
|
</tr> |
| 1595 |
|
|
</table> |
| 1596 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1597 |
|
|
<tr> |
| 1598 |
|
|
<td> |
| 1599 |
|
|
|
| 1600 |
|
|
</td> |
| 1601 |
|
|
<td> |
| 1602 |
|
|
|
| 1603 |
|
|
<p> |
| 1604 |
|
|
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 <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> and return it through the <code>entry_p</code> result parameter.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 1605 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1606 |
|
|
<tr><td valign=top><em>table</em> </td><td> |
| 1607 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>. </td></tr> |
| 1608 |
|
|
<tr><td valign=top><em>entry_p</em> </td><td> |
| 1609 |
|
|
A pointer to a pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. This is a result parameter. If <code>NULL</code> is passed, the addition will be performed and an appropriate error code returned. </td></tr> |
| 1610 |
|
|
<tr><td valign=top><em>head1</em> </td><td> |
| 1611 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> representing a <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> sparse matrix list. </td></tr> |
| 1612 |
|
|
<tr><td valign=top><em>loc1</em> </td><td> |
| 1613 |
|
|
A <a class="el" href="group__dbprim__link.html#a4">link_loc_t</a> indicating where the entry should be added for <code>head1</code>. </td></tr> |
| 1614 |
|
|
<tr><td valign=top><em>ent1</em> </td><td> |
| 1615 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> describing another element in the list represented by <code>head1</code> if <code>loc1</code> is <a class="el" href="group__dbprim__link.html#a26a133">LINK_LOC_BEFORE</a> or <a class="el" href="group__dbprim__link.html#a26a134">LINK_LOC_AFTER</a>. </td></tr> |
| 1616 |
|
|
<tr><td valign=top><em>head2</em> </td><td> |
| 1617 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> representing a <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> sparse matrix list. </td></tr> |
| 1618 |
|
|
<tr><td valign=top><em>loc2</em> </td><td> |
| 1619 |
|
|
A <a class="el" href="group__dbprim__link.html#a4">link_loc_t</a> indicating where the entry should be added for <code>head2</code>. </td></tr> |
| 1620 |
|
|
<tr><td valign=top><em>ent2</em> </td><td> |
| 1621 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> describing another element in the list represented by <code>head2</code> if <code>loc2</code> is <a class="el" href="group__dbprim__link.html#a26a133">LINK_LOC_BEFORE</a> or <a class="el" href="group__dbprim__link.html#a26a134">LINK_LOC_AFTER</a>.</td></tr> |
| 1622 |
|
|
</table> |
| 1623 |
|
|
</dl><dl compact><dt><b>Return values: </b></dt><dd> |
| 1624 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1625 |
|
|
<tr><td valign=top><em>DB_ERR_BADARGS</em> </td><td> |
| 1626 |
|
|
An argument was invalid. </td></tr> |
| 1627 |
|
|
<tr><td valign=top><em>DB_ERR_BUSY</em> </td><td> |
| 1628 |
|
|
One of the arguments is already in the table. </td></tr> |
| 1629 |
|
|
<tr><td valign=top><em>DB_ERR_FROZEN</em> </td><td> |
| 1630 |
|
|
The table is currently frozen. </td></tr> |
| 1631 |
|
|
<tr><td valign=top><em>DB_ERR_NOTABLE</em> </td><td> |
| 1632 |
|
|
The bucket table has not been allocated and automatic growth is not enabled. </td></tr> |
| 1633 |
|
|
<tr><td valign=top><em>DB_ERR_WRONGTABLE</em> </td><td> |
| 1634 |
|
|
One of the arguments was not in the proper table or list. </td></tr> |
| 1635 |
|
|
<tr><td valign=top><em>DB_ERR_UNUSED</em> </td><td> |
| 1636 |
|
|
One of the <code>ent</code> arguments is not presently in a list. </td></tr> |
| 1637 |
|
|
<tr><td valign=top><em>DB_ERR_UNRECOVERABLE</em> </td><td> |
| 1638 |
|
|
An unrecoverable error occurred while resizing the table. </td></tr> |
| 1639 |
|
|
<tr><td valign=top><em>ENOMEM</em> </td><td> |
| 1640 |
|
|
No memory could be allocated for the <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> structure. </td></tr> |
| 1641 |
|
|
</table> |
| 1642 |
|
|
</dl> </td> |
| 1643 |
|
|
</tr> |
| 1644 |
|
|
</table> |
| 1645 |
|
|
<a name="a12" doxytag="st_find.c::st_find"></a><p> |
| 1646 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1647 |
|
|
<tr> |
| 1648 |
|
|
<td class="md"> |
| 1649 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1650 |
|
|
<tr> |
| 1651 |
|
|
<td class="md" nowrap valign="top"> unsigned long st_find </td> |
| 1652 |
|
|
<td class="md" valign="top">( </td> |
| 1653 |
|
|
<td class="md" nowrap valign="top"><a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> * </td> |
| 1654 |
|
|
<td class="mdname" nowrap> <em>table</em>, </td> |
| 1655 |
|
|
</tr> |
| 1656 |
|
|
<tr> |
| 1657 |
|
|
<td></td> |
| 1658 |
|
|
<td></td> |
| 1659 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> ** </td> |
| 1660 |
|
|
<td class="mdname" nowrap> <em>entry_p</em>, </td> |
| 1661 |
|
|
</tr> |
| 1662 |
|
|
<tr> |
| 1663 |
|
|
<td></td> |
| 1664 |
|
|
<td></td> |
| 1665 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> * </td> |
| 1666 |
|
|
<td class="mdname" nowrap> <em>head1</em>, </td> |
| 1667 |
|
|
</tr> |
| 1668 |
|
|
<tr> |
| 1669 |
|
|
<td></td> |
| 1670 |
|
|
<td></td> |
| 1671 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> * </td> |
| 1672 |
|
|
<td class="mdname" nowrap> <em>head2</em></td> |
| 1673 |
|
|
</tr> |
| 1674 |
|
|
<tr> |
| 1675 |
|
|
<td></td> |
| 1676 |
|
|
<td class="md">) </td> |
| 1677 |
|
|
<td class="md" colspan="2"></td> |
| 1678 |
|
|
</tr> |
| 1679 |
|
|
|
| 1680 |
|
|
</table> |
| 1681 |
|
|
</td> |
| 1682 |
|
|
</tr> |
| 1683 |
|
|
</table> |
| 1684 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1685 |
|
|
<tr> |
| 1686 |
|
|
<td> |
| 1687 |
|
|
|
| 1688 |
|
|
</td> |
| 1689 |
|
|
<td> |
| 1690 |
|
|
|
| 1691 |
|
|
<p> |
| 1692 |
|
|
This function looks up the entry matching the given <code>head1</code> and <code>head2</code>.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 1693 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1694 |
|
|
<tr><td valign=top><em>table</em> </td><td> |
| 1695 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>. </td></tr> |
| 1696 |
|
|
<tr><td valign=top><em>entry_p</em> </td><td> |
| 1697 |
|
|
A pointer to a pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. This is a result parameter. If <code>NULL</code> is passed, the lookup will be performed and an appropriate error code returned. </td></tr> |
| 1698 |
|
|
<tr><td valign=top><em>head1</em> </td><td> |
| 1699 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> initialized to <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a>. </td></tr> |
| 1700 |
|
|
<tr><td valign=top><em>head2</em> </td><td> |
| 1701 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> initialized to <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a>.</td></tr> |
| 1702 |
|
|
</table> |
| 1703 |
|
|
</dl><dl compact><dt><b>Return values: </b></dt><dd> |
| 1704 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1705 |
|
|
<tr><td valign=top><em>DB_ERR_BADARGS</em> </td><td> |
| 1706 |
|
|
An argument was invalid. </td></tr> |
| 1707 |
|
|
<tr><td valign=top><em>DB_ERR_WRONGTABLE</em> </td><td> |
| 1708 |
|
|
One or both of <code>head1</code> or <code>head2</code> are not referenced in this table. </td></tr> |
| 1709 |
|
|
<tr><td valign=top><em>DB_ERR_NOENTRY</em> </td><td> |
| 1710 |
|
|
No matching entry was found. </td></tr> |
| 1711 |
|
|
</table> |
| 1712 |
|
|
</dl> </td> |
| 1713 |
|
|
</tr> |
| 1714 |
|
|
</table> |
| 1715 |
|
|
<a name="a14" doxytag="st_flush.c::st_flush"></a><p> |
| 1716 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1717 |
|
|
<tr> |
| 1718 |
|
|
<td class="md"> |
| 1719 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1720 |
|
|
<tr> |
| 1721 |
|
|
<td class="md" nowrap valign="top"> unsigned long st_flush </td> |
| 1722 |
|
|
<td class="md" valign="top">( </td> |
| 1723 |
|
|
<td class="md" nowrap valign="top"><a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> * </td> |
| 1724 |
|
|
<td class="mdname" nowrap> <em>table</em>, </td> |
| 1725 |
|
|
</tr> |
| 1726 |
|
|
<tr> |
| 1727 |
|
|
<td></td> |
| 1728 |
|
|
<td></td> |
| 1729 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a4">smat_iter_t</a> </td> |
| 1730 |
|
|
<td class="mdname" nowrap> <em>flush_func</em>, </td> |
| 1731 |
|
|
</tr> |
| 1732 |
|
|
<tr> |
| 1733 |
|
|
<td></td> |
| 1734 |
|
|
<td></td> |
| 1735 |
|
|
<td class="md" nowrap>void * </td> |
| 1736 |
|
|
<td class="mdname" nowrap> <em>extra</em></td> |
| 1737 |
|
|
</tr> |
| 1738 |
|
|
<tr> |
| 1739 |
|
|
<td></td> |
| 1740 |
|
|
<td class="md">) </td> |
| 1741 |
|
|
<td class="md" colspan="2"></td> |
| 1742 |
|
|
</tr> |
| 1743 |
|
|
|
| 1744 |
|
|
</table> |
| 1745 |
|
|
</td> |
| 1746 |
|
|
</tr> |
| 1747 |
|
|
</table> |
| 1748 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1749 |
|
|
<tr> |
| 1750 |
|
|
<td> |
| 1751 |
|
|
|
| 1752 |
|
|
</td> |
| 1753 |
|
|
<td> |
| 1754 |
|
|
|
| 1755 |
|
|
<p> |
| 1756 |
|
|
This function flushes a sparse matrix--that is, it removes each entry from the matrix. If a <code>flush_func</code> is specified, it will be called on the entry after it has been removed from the table, and may safely call <code>free()</code>.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 1757 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1758 |
|
|
<tr><td valign=top><em>table</em> </td><td> |
| 1759 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>. </td></tr> |
| 1760 |
|
|
<tr><td valign=top><em>flush_func</em> </td><td> |
| 1761 |
|
|
A pointer to a callback function used to perform user-specified actions on an entry after removing it from the table. May be <code>NULL</code>. See the documentation for <a class="el" href="group__dbprim__smat.html#a4">smat_iter_t</a> for more information. </td></tr> |
| 1762 |
|
|
<tr><td valign=top><em>extra</em> </td><td> |
| 1763 |
|
|
A <code>void</code> pointer that will be passed to <code>iter_func</code>.</td></tr> |
| 1764 |
|
|
</table> |
| 1765 |
|
|
</dl><dl compact><dt><b>Return values: </b></dt><dd> |
| 1766 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1767 |
|
|
<tr><td valign=top><em>DB_ERR_BADARGS</em> </td><td> |
| 1768 |
|
|
An argument was invalid. </td></tr> |
| 1769 |
|
|
<tr><td valign=top><em>DB_ERR_FROZEN</em> </td><td> |
| 1770 |
|
|
The sparse matrix is frozen. </td></tr> |
| 1771 |
|
|
</table> |
| 1772 |
|
|
</dl> </td> |
| 1773 |
|
|
</tr> |
| 1774 |
|
|
</table> |
| 1775 |
|
|
<a name="a16" doxytag="st_free.c::st_free"></a><p> |
| 1776 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1777 |
|
|
<tr> |
| 1778 |
|
|
<td class="md"> |
| 1779 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1780 |
|
|
<tr> |
| 1781 |
|
|
<td class="md" nowrap valign="top"> unsigned long st_free </td> |
| 1782 |
|
|
<td class="md" valign="top">( </td> |
| 1783 |
|
|
<td class="md" nowrap valign="top"><a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> * </td> |
| 1784 |
|
|
<td class="mdname1" valign="top" nowrap> <em>table</em> </td> |
| 1785 |
|
|
<td class="md" valign="top">) </td> |
| 1786 |
|
|
<td class="md" nowrap></td> |
| 1787 |
|
|
</tr> |
| 1788 |
|
|
|
| 1789 |
|
|
</table> |
| 1790 |
|
|
</td> |
| 1791 |
|
|
</tr> |
| 1792 |
|
|
</table> |
| 1793 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1794 |
|
|
<tr> |
| 1795 |
|
|
<td> |
| 1796 |
|
|
|
| 1797 |
|
|
</td> |
| 1798 |
|
|
<td> |
| 1799 |
|
|
|
| 1800 |
|
|
<p> |
| 1801 |
|
|
This function releases the memory used by the bucket table of the empty hash table associated with a sparse matrix.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 1802 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1803 |
|
|
<tr><td valign=top><em>table</em> </td><td> |
| 1804 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>.</td></tr> |
| 1805 |
|
|
</table> |
| 1806 |
|
|
</dl><dl compact><dt><b>Return values: </b></dt><dd> |
| 1807 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1808 |
|
|
<tr><td valign=top><em>DB_ERR_BADARGS</em> </td><td> |
| 1809 |
|
|
An invalid argument was given. </td></tr> |
| 1810 |
|
|
<tr><td valign=top><em>DB_ERR_FROZEN</em> </td><td> |
| 1811 |
|
|
The table is frozen. </td></tr> |
| 1812 |
|
|
<tr><td valign=top><em>DB_ERR_NOTEMPTY</em> </td><td> |
| 1813 |
|
|
The table is not empty. </td></tr> |
| 1814 |
|
|
</table> |
| 1815 |
|
|
</dl> </td> |
| 1816 |
|
|
</tr> |
| 1817 |
|
|
</table> |
| 1818 |
|
|
<a name="a9" doxytag="st_init.c::st_init"></a><p> |
| 1819 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1820 |
|
|
<tr> |
| 1821 |
|
|
<td class="md"> |
| 1822 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1823 |
|
|
<tr> |
| 1824 |
|
|
<td class="md" nowrap valign="top"> unsigned long st_init </td> |
| 1825 |
|
|
<td class="md" valign="top">( </td> |
| 1826 |
|
|
<td class="md" nowrap valign="top"><a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> * </td> |
| 1827 |
|
|
<td class="mdname" nowrap> <em>table</em>, </td> |
| 1828 |
|
|
</tr> |
| 1829 |
|
|
<tr> |
| 1830 |
|
|
<td></td> |
| 1831 |
|
|
<td></td> |
| 1832 |
|
|
<td class="md" nowrap>unsigned long </td> |
| 1833 |
|
|
<td class="mdname" nowrap> <em>flags</em>, </td> |
| 1834 |
|
|
</tr> |
| 1835 |
|
|
<tr> |
| 1836 |
|
|
<td></td> |
| 1837 |
|
|
<td></td> |
| 1838 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a3">smat_resize_t</a> </td> |
| 1839 |
|
|
<td class="mdname" nowrap> <em>resize</em>, </td> |
| 1840 |
|
|
</tr> |
| 1841 |
|
|
<tr> |
| 1842 |
|
|
<td></td> |
| 1843 |
|
|
<td></td> |
| 1844 |
|
|
<td class="md" nowrap>void * </td> |
| 1845 |
|
|
<td class="mdname" nowrap> <em>extra</em>, </td> |
| 1846 |
|
|
</tr> |
| 1847 |
|
|
<tr> |
| 1848 |
|
|
<td></td> |
| 1849 |
|
|
<td></td> |
| 1850 |
|
|
<td class="md" nowrap>unsigned long </td> |
| 1851 |
|
|
<td class="mdname" nowrap> <em>init_mod</em></td> |
| 1852 |
|
|
</tr> |
| 1853 |
|
|
<tr> |
| 1854 |
|
|
<td></td> |
| 1855 |
|
|
<td class="md">) </td> |
| 1856 |
|
|
<td class="md" colspan="2"></td> |
| 1857 |
|
|
</tr> |
| 1858 |
|
|
|
| 1859 |
|
|
</table> |
| 1860 |
|
|
</td> |
| 1861 |
|
|
</tr> |
| 1862 |
|
|
</table> |
| 1863 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1864 |
|
|
<tr> |
| 1865 |
|
|
<td> |
| 1866 |
|
|
|
| 1867 |
|
|
</td> |
| 1868 |
|
|
<td> |
| 1869 |
|
|
|
| 1870 |
|
|
<p> |
| 1871 |
|
|
This function initializes a sparse matrix table.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 1872 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1873 |
|
|
<tr><td valign=top><em>table</em> </td><td> |
| 1874 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> to be initialized. </td></tr> |
| 1875 |
|
|
<tr><td valign=top><em>flags</em> </td><td> |
| 1876 |
|
|
A bit-wise OR of <a class="el" href="group__dbprim__hash.html#a16">HASH_FLAG_AUTOGROW</a> and <a class="el" href="group__dbprim__hash.html#a17">HASH_FLAG_AUTOSHRINK</a>. If neither behavior is desired, use 0. </td></tr> |
| 1877 |
|
|
<tr><td valign=top><em>resize</em> </td><td> |
| 1878 |
|
|
A <a class="el" href="group__dbprim__hash.html#a5">hash_resize_t</a> function pointer for determining whether resizing is permitted and/or for notification of the resize. </td></tr> |
| 1879 |
|
|
<tr><td valign=top><em>extra</em> </td><td> |
| 1880 |
|
|
Extra pointer data that should be associated with the sparse matrix table. </td></tr> |
| 1881 |
|
|
<tr><td valign=top><em>init_mod</em> </td><td> |
| 1882 |
|
|
An initial modulus for the table. This will presumably be extracted by <a class="el" href="group__dbprim__smat.html#a24">st_modulus()</a> in a previous invocation of the application. A 0 value is valid.</td></tr> |
| 1883 |
|
|
</table> |
| 1884 |
|
|
</dl><dl compact><dt><b>Return values: </b></dt><dd> |
| 1885 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1886 |
|
|
<tr><td valign=top><em>DB_ERR_BADARGS</em> </td><td> |
| 1887 |
|
|
An invalid argument was given. </td></tr> |
| 1888 |
|
|
<tr><td valign=top><em>ENOMEM</em> </td><td> |
| 1889 |
|
|
Unable to allocate memory. </td></tr> |
| 1890 |
|
|
</table> |
| 1891 |
|
|
</dl> </td> |
| 1892 |
|
|
</tr> |
| 1893 |
|
|
</table> |
| 1894 |
|
|
<a name="a13" doxytag="st_iter.c::st_iter"></a><p> |
| 1895 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1896 |
|
|
<tr> |
| 1897 |
|
|
<td class="md"> |
| 1898 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1899 |
|
|
<tr> |
| 1900 |
|
|
<td class="md" nowrap valign="top"> unsigned long st_iter </td> |
| 1901 |
|
|
<td class="md" valign="top">( </td> |
| 1902 |
|
|
<td class="md" nowrap valign="top"><a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> * </td> |
| 1903 |
|
|
<td class="mdname" nowrap> <em>table</em>, </td> |
| 1904 |
|
|
</tr> |
| 1905 |
|
|
<tr> |
| 1906 |
|
|
<td></td> |
| 1907 |
|
|
<td></td> |
| 1908 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a4">smat_iter_t</a> </td> |
| 1909 |
|
|
<td class="mdname" nowrap> <em>iter_func</em>, </td> |
| 1910 |
|
|
</tr> |
| 1911 |
|
|
<tr> |
| 1912 |
|
|
<td></td> |
| 1913 |
|
|
<td></td> |
| 1914 |
|
|
<td class="md" nowrap>void * </td> |
| 1915 |
|
|
<td class="mdname" nowrap> <em>extra</em></td> |
| 1916 |
|
|
</tr> |
| 1917 |
|
|
<tr> |
| 1918 |
|
|
<td></td> |
| 1919 |
|
|
<td class="md">) </td> |
| 1920 |
|
|
<td class="md" colspan="2"></td> |
| 1921 |
|
|
</tr> |
| 1922 |
|
|
|
| 1923 |
|
|
</table> |
| 1924 |
|
|
</td> |
| 1925 |
|
|
</tr> |
| 1926 |
|
|
</table> |
| 1927 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1928 |
|
|
<tr> |
| 1929 |
|
|
<td> |
| 1930 |
|
|
|
| 1931 |
|
|
</td> |
| 1932 |
|
|
<td> |
| 1933 |
|
|
|
| 1934 |
|
|
<p> |
| 1935 |
|
|
This function iterates over every entry in a sparse matrix (in an unspecified order), executing the given <code>iter_func</code> on each entry.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 1936 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1937 |
|
|
<tr><td valign=top><em>table</em> </td><td> |
| 1938 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>. </td></tr> |
| 1939 |
|
|
<tr><td valign=top><em>iter_func</em> </td><td> |
| 1940 |
|
|
A pointer to a callback function used to perform user-specified actions on an entry in a sparse matrix. <code>NULL</code> is an invalid value. See the documentation for <a class="el" href="group__dbprim__smat.html#a4">smat_iter_t</a> for more information. </td></tr> |
| 1941 |
|
|
<tr><td valign=top><em>extra</em> </td><td> |
| 1942 |
|
|
A <code>void</code> pointer that will be passed to <code>iter_func</code>.</td></tr> |
| 1943 |
|
|
</table> |
| 1944 |
|
|
</dl><dl compact><dt><b>Return values: </b></dt><dd> |
| 1945 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1946 |
|
|
<tr><td valign=top><em>DB_ERR_BADARGS</em> </td><td> |
| 1947 |
|
|
An argument was invalid. </td></tr> |
| 1948 |
|
|
<tr><td valign=top><em>DB_ERR_FROZEN</em> </td><td> |
| 1949 |
|
|
The sparse matrix is frozen. </td></tr> |
| 1950 |
|
|
</table> |
| 1951 |
|
|
</dl> </td> |
| 1952 |
|
|
</tr> |
| 1953 |
|
|
</table> |
| 1954 |
|
|
<a name="a11" doxytag="st_remove.c::st_remove"></a><p> |
| 1955 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 1956 |
|
|
<tr> |
| 1957 |
|
|
<td class="md"> |
| 1958 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 1959 |
|
|
<tr> |
| 1960 |
|
|
<td class="md" nowrap valign="top"> unsigned long st_remove </td> |
| 1961 |
|
|
<td class="md" valign="top">( </td> |
| 1962 |
|
|
<td class="md" nowrap valign="top"><a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> * </td> |
| 1963 |
|
|
<td class="mdname" nowrap> <em>table</em>, </td> |
| 1964 |
|
|
</tr> |
| 1965 |
|
|
<tr> |
| 1966 |
|
|
<td></td> |
| 1967 |
|
|
<td></td> |
| 1968 |
|
|
<td class="md" nowrap><a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> * </td> |
| 1969 |
|
|
<td class="mdname" nowrap> <em>entry</em></td> |
| 1970 |
|
|
</tr> |
| 1971 |
|
|
<tr> |
| 1972 |
|
|
<td></td> |
| 1973 |
|
|
<td class="md">) </td> |
| 1974 |
|
|
<td class="md" colspan="2"></td> |
| 1975 |
|
|
</tr> |
| 1976 |
|
|
|
| 1977 |
|
|
</table> |
| 1978 |
|
|
</td> |
| 1979 |
|
|
</tr> |
| 1980 |
|
|
</table> |
| 1981 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 1982 |
|
|
<tr> |
| 1983 |
|
|
<td> |
| 1984 |
|
|
|
| 1985 |
|
|
</td> |
| 1986 |
|
|
<td> |
| 1987 |
|
|
|
| 1988 |
|
|
<p> |
| 1989 |
|
|
This function removes the given entry from the specified sparse matrix.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 1990 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1991 |
|
|
<tr><td valign=top><em>table</em> </td><td> |
| 1992 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>. </td></tr> |
| 1993 |
|
|
<tr><td valign=top><em>entry</em> </td><td> |
| 1994 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> to be removed from the table.</td></tr> |
| 1995 |
|
|
</table> |
| 1996 |
|
|
</dl><dl compact><dt><b>Return values: </b></dt><dd> |
| 1997 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 1998 |
|
|
<tr><td valign=top><em>DB_ERR_BADARGS</em> </td><td> |
| 1999 |
|
|
An invalid argument was given. </td></tr> |
| 2000 |
|
|
<tr><td valign=top><em>DB_ERR_WRONGTABLE</em> </td><td> |
| 2001 |
|
|
Entry is not in this sparse matrix. </td></tr> |
| 2002 |
|
|
<tr><td valign=top><em>DB_ERR_UNRECOVERABLE</em> </td><td> |
| 2003 |
|
|
An unrecoverable error occurred while removing the entry from the table. </td></tr> |
| 2004 |
|
|
</table> |
| 2005 |
|
|
</dl> </td> |
| 2006 |
|
|
</tr> |
| 2007 |
|
|
</table> |
| 2008 |
|
|
<a name="a15" doxytag="st_resize.c::st_resize"></a><p> |
| 2009 |
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0"> |
| 2010 |
|
|
<tr> |
| 2011 |
|
|
<td class="md"> |
| 2012 |
|
|
<table cellpadding="0" cellspacing="0" border="0"> |
| 2013 |
|
|
<tr> |
| 2014 |
|
|
<td class="md" nowrap valign="top"> unsigned long st_resize </td> |
| 2015 |
|
|
<td class="md" valign="top">( </td> |
| 2016 |
|
|
<td class="md" nowrap valign="top"><a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> * </td> |
| 2017 |
|
|
<td class="mdname" nowrap> <em>table</em>, </td> |
| 2018 |
|
|
</tr> |
| 2019 |
|
|
<tr> |
| 2020 |
|
|
<td></td> |
| 2021 |
|
|
<td></td> |
| 2022 |
|
|
<td class="md" nowrap>unsigned long </td> |
| 2023 |
|
|
<td class="mdname" nowrap> <em>new_size</em></td> |
| 2024 |
|
|
</tr> |
| 2025 |
|
|
<tr> |
| 2026 |
|
|
<td></td> |
| 2027 |
|
|
<td class="md">) </td> |
| 2028 |
|
|
<td class="md" colspan="2"></td> |
| 2029 |
|
|
</tr> |
| 2030 |
|
|
|
| 2031 |
|
|
</table> |
| 2032 |
|
|
</td> |
| 2033 |
|
|
</tr> |
| 2034 |
|
|
</table> |
| 2035 |
|
|
<table cellspacing=5 cellpadding=0 border=0> |
| 2036 |
|
|
<tr> |
| 2037 |
|
|
<td> |
| 2038 |
|
|
|
| 2039 |
|
|
</td> |
| 2040 |
|
|
<td> |
| 2041 |
|
|
|
| 2042 |
|
|
<p> |
| 2043 |
|
|
This function resizes the hash table associated with a sparse matrix based on the <code>new_size</code> parameter. See the documentation for <a class="el" href="group__dbprim__hash.html#a13">ht_resize()</a> for more information.<dl compact><dt><b>Parameters: </b></dt><dd> |
| 2044 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 2045 |
|
|
<tr><td valign=top><em>table</em> </td><td> |
| 2046 |
|
|
A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>. </td></tr> |
| 2047 |
|
|
<tr><td valign=top><em>new_size</em> </td><td> |
| 2048 |
|
|
A new size value for the table.</td></tr> |
| 2049 |
|
|
</table> |
| 2050 |
|
|
</dl><dl compact><dt><b>Return values: </b></dt><dd> |
| 2051 |
|
|
<table border=0 cellspacing=2 cellpadding=0> |
| 2052 |
|
|
<tr><td valign=top><em>DB_ERR_BADARGS</em> </td><td> |
| 2053 |
|
|
An argument was invalid. </td></tr> |
| 2054 |
|
|
<tr><td valign=top><em>DB_ERR_FROZEN</em> </td><td> |
| 2055 |
|
|
The table is currently frozen. </td></tr> |
| 2056 |
|
|
<tr><td valign=top><em>DB_ERR_UNRECOVERABLE</em> </td><td> |
| 2057 |
|
|
A catastrophic error was encountered. The table is now unusable. </td></tr> |
| 2058 |
|
|
<tr><td valign=top><em>ENOMEM</em> </td><td> |
| 2059 |
|
|
No memory could be allocated for the new bucket table. </td></tr> |
| 2060 |
|
|
</table> |
| 2061 |
|
|
</dl> </td> |
| 2062 |
|
|
</tr> |
| 2063 |
|
|
</table> |
| 2064 |
|
|
<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:24:36 2003 for Database Primitives Library by |
| 2065 |
|
|
<a href="http://www.doxygen.org/index.html"> |
| 2066 |
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border=0 |
| 2067 |
|
|
width=110 height=53></a>1.2.18 </small></address> |
| 2068 |
|
|
</body> |
| 2069 |
|
|
</html> |