2 ** Copyright (C) 2002 by Kevin L. Mitchell <klmitch@mit.edu>
4 ** This library is free software; you can redistribute it and/or
5 ** modify it under the terms of the GNU Library General Public
6 ** License as published by the Free Software Foundation; either
7 ** version 2 of the License, or (at your option) any later version.
9 ** This library is distributed in the hope that it will be useful,
10 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 ** Library General Public License for more details.
14 ** You should have received a copy of the GNU Library General Public
15 ** License along with this library; if not, write to the Free
16 ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 #include "dbprim_int.h"
26 /** \ingroup dbprim_smat
27 * \brief Resize a sparse matrix table.
29 * This function resizes the hash table associated with a sparse
30 * matrix based on the \p new_size parameter. See the documentation
31 * for ht_resize() for more information.
33 * \param table A pointer to a #smat_table_t.
35 * A new size value for the table.
37 * \retval DB_ERR_BADARGS An argument was invalid.
38 * \retval DB_ERR_FROZEN The table is currently frozen.
39 * \retval DB_ERR_UNRECOVERABLE A catastrophic error was encountered.
40 * The table is now unusable.
41 * \retval ENOMEM No memory could be allocated for the
45 st_resize(smat_table_t *table, unsigned long new_size)
47 initialize_dbpr_error_table(); /* initialize error table */
49 if (!st_verify(table)) /* verify that it's really a table */
50 return DB_ERR_BADARGS;
52 return ht_resize(&table->st_table, new_size); /* call out to hash */