/[ascend]/trunk/base/generic/solver/mtx_reorder.h
ViewVC logotype

Contents of /trunk/base/generic/solver/mtx_reorder.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1015 - (show annotations) (download) (as text)
Wed Jan 3 05:03:43 2007 UTC (13 years, 1 month ago) by johnpye
File MIME type: text/x-chdr
File size: 4002 byte(s)
Trying doxygen comments once again
1 /*
2 * mtx: Ascend Sparse Matrix Package
3 * by Benjamin Andrew Allan
4 * Derived from mtx by Karl Michael Westerberg
5 * Created: 5/3/90
6 * Version: $Revision: 1.4 $
7 * Version control file: $RCSfile: mtx_reorder.h,v $
8 * Date last modified: $Date: 1997/07/18 12:15:17 $
9 * Last modified by: $Author: mthomas $
10 *
11 * This file is part of the SLV solver.
12 *
13 * Copyright (C) 1996 Benjamin Andrew Allan
14 *
15 * The SLV solver is free software; you can redistribute
16 * it and/or modify it under the terms of the GNU General Public License as
17 * published by the Free Software Foundation; either version 2 of the
18 * License, or (at your option) any later version.
19 *
20 * The SLV solver is distributed in hope that it will be
21 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License along with
26 * the program; if not, write to the Free Software Foundation, Inc., 675
27 * Mass Ave, Cambridge, MA 02139 USA. Check the file named COPYING.
28 * COPYING is found in ../compiler.
29 */
30
31 /** @file
32 * mtx2: Ascend Sparse Matrix Package.
33 * <pre>
34 * requires: #include "utilities/ascConfig.h"
35 * requires: #include "mtx.h"
36 * </pre>
37 */
38
39 #ifndef __MTX_REORDER_H_SEEN__
40 #define __MTX_REORDER_H_SEEN__
41
42 /** @addtogroup linear
43 * @{
44 */
45
46 enum mtx_reorder_method {
47 mtx_UNKNOWN, /**< junk method */
48 mtx_SPK1, /**< Stadtherr's SPK1 reordering */
49 mtx_TSPK1, /**< transpose of Stadtherr's SPK1 reordering */
50 mtx_NATURAL /**< kinda pointless, don't you think? */
51 };
52
53 extern int mtx_reorder(mtx_matrix_t mtx,
54 mtx_region_t *region,
55 enum mtx_reorder_method rmeth);
56 /**<
57 *** <!-- mtx_reorder(sys,region,rmeth) -->
58 *** <!-- mtx_matrix_t mtx; -->
59 *** <!-- mtx_region_t *region; -->
60 *** <!-- enum mtx_reorder_method; -->
61 ***
62 *** The specified region of the coefficient matrix is reordered.
63 *** The specified region
64 *** is assumed to contain only nonempty rows and columns and have a full
65 *** diagonal.
66 *** If the matrix in is from a nonlinear system, the
67 *** pattern in the matrix should probably be the structural one (as
68 *** opposed to the numerically derived incidence which may be less.)<br><br>
69 ***
70 *** If you use the numerically derived incidence, you will need to reorder
71 *** before every factorization. This is generally not cost effective.
72 *** If region given is mtx_ENTIRE_MATRIX, a search will be done to find
73 *** an appropriate bounding region in the coefficient mtx. This is
74 *** not a particularly cheap search.<br><br>
75 ***
76 *** The reorder call should be done (once) at
77 *** the beginning of any series of linear solutions being performed on
78 *** on structurally identical matrices.<br><br>
79 ***
80 *** We HATE mtx_ENTIRE_MATRIX as the input region.<br><br>
81 ***
82 *** Brief notes on the reorderings available.
83 *** - SPK1:
84 *** - TSPK1: Both these operate only on a square region which is of.
85 *** full rank (in particular it should have a 0 free diagonal).
86 *** If you give us a bogus region, we will Try to make something
87 *** decent of it, but good results are improbable.
88 *** - Natural: Blesses the system and does nothing.
89 *** Again, the rows/cols not in the diagonal are dependent.
90 ***
91 *** On reordering in general: 'Optimal' reordering is an NP complete
92 *** task. Real reordering methods are heuristic and tend to break down
93 *** when the matrix being reordered is in some sense 'large' so that
94 *** the tie-breaking and other heuristics fail.<br><br>
95 ***
96 *** Return 0 if ok, 1 if bad input detected, 2 if unable to do.
97 **/
98
99 /** @} */
100
101 #endif /* __MTX_REORDER_H_SEEN__ */
102

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22