1 |
/* |
2 |
* mtx2: 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_linal.h,v $ |
8 |
* Date last modified: $Date: 1997/07/18 12:15:02 $ |
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 |
#ifndef __MTX_LINAL_H_SEEN__ |
31 |
#define __MTX_LINAL_H_SEEN__ |
32 |
/* requires #include "mtx.h" */ |
33 |
|
34 |
extern void mtx_householder_transform_region(mtx_matrix_t, |
35 |
const real64, |
36 |
const mtx_sparse_t *, |
37 |
const mtx_region_t *, |
38 |
real64, |
39 |
boolean); |
40 |
/** |
41 |
*** |
42 |
-$- mtx_householder_transform_region(mtx,coef,orgsp,reg,droptol,transpose); |
43 |
*** mtx_matrix_t mtx; |
44 |
*** real64 coef,droptol; |
45 |
*** mtx_sparse_t *sp; |
46 |
*** mtx_region_t *reg; |
47 |
*** real64 droptol; |
48 |
*** boolean transpose; |
49 |
*** |
50 |
*** Does a sparse Householder transformation to the matrix A |
51 |
*** denoted by region, resulting in Anew. |
52 |
*** Mathematically: Anew = (I - coef * u dot Transpose[u]) dot A. |
53 |
*** Slightly faster in the case of coef = 1.0. |
54 |
*** Returns immediately in the case of coef = 0.0. |
55 |
*** Note following unusual assumptions, however: |
56 |
*** 1)The user has already cleared out the leading column in the |
57 |
*** region and we will not be doing anything to it. This is usually |
58 |
*** the case since that column is where u was derived from. |
59 |
*** 2)The sparse, sp, supplied by the user contains the nonzero |
60 |
*** elements of u and is indexed by org row number. |
61 |
*** Note that a soft zero in u will not hurt us: we skip it. |
62 |
*** 3)There are no elements in the regions to the left and the right |
63 |
*** of the region. |
64 |
*** |
65 |
*** mtx_ENTIRE_MATRIX is not a valid region for this function. |
66 |
*** |
67 |
*** Current bugs (11/95) |
68 |
*** ignores the transpose and droptol arguments. |
69 |
*** does not remove soft zeroes created when 2 numbers add to zero. |
70 |
**/ |
71 |
|
72 |
#endif /* __MTX_LINAL_H_SEEN__ */ |