Mercurial > octave-nkf
comparison liboctave/fCmplxCHOL.h @ 7789:82be108cc558
First attempt at single precision tyeps
* * *
corrections to qrupdate single precision routines
* * *
prefer demotion to single over promotion to double
* * *
Add single precision support to log2 function
* * *
Trivial PROJECT file update
* * *
Cache optimized hermitian/transpose methods
* * *
Add tests for tranpose/hermitian and ChangeLog entry for new transpose code
author | David Bateman <dbateman@free.fr> |
---|---|
date | Sun, 27 Apr 2008 22:34:17 +0200 |
parents | |
children | d66c9b6e506a |
comparison
equal
deleted
inserted
replaced
7788:45f5faba05a2 | 7789:82be108cc558 |
---|---|
1 /* | |
2 | |
3 Copyright (C) 1994, 1995, 1996, 1997, 2000, 2002, 2004, 2005, 2006, | |
4 2007 John W. Eaton | |
5 | |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
10 Free Software Foundation; either version 3 of the License, or (at your | |
11 option) any later version. | |
12 | |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
19 along with Octave; see the file COPYING. If not, see | |
20 <http://www.gnu.org/licenses/>. | |
21 | |
22 */ | |
23 | |
24 // updating/downdating by Jaroslav Hajek 2008 | |
25 | |
26 #if !defined (octave_FloatComplexCHOL_h) | |
27 #define octave_FloatComplexCHOL_h 1 | |
28 | |
29 #include <iostream> | |
30 | |
31 #include "fCMatrix.h" | |
32 | |
33 class | |
34 OCTAVE_API | |
35 FloatComplexCHOL | |
36 { | |
37 public: | |
38 | |
39 FloatComplexCHOL (void) : chol_mat () { } | |
40 | |
41 FloatComplexCHOL (const FloatComplexMatrix& a, bool calc_cond = false) { init (a, calc_cond); } | |
42 | |
43 FloatComplexCHOL (const FloatComplexMatrix& a, octave_idx_type& info, bool calc_cond = false) | |
44 { | |
45 info = init (a, calc_cond); | |
46 } | |
47 | |
48 FloatComplexCHOL (const FloatComplexCHOL& a) | |
49 : chol_mat (a.chol_mat), xrcond (a.xrcond) { } | |
50 | |
51 FloatComplexCHOL& operator = (const FloatComplexCHOL& a) | |
52 { | |
53 if (this != &a) | |
54 { | |
55 chol_mat = a.chol_mat; | |
56 xrcond = a.xrcond; | |
57 } | |
58 | |
59 return *this; | |
60 } | |
61 | |
62 FloatComplexMatrix chol_matrix (void) const { return chol_mat; } | |
63 | |
64 float rcond (void) const { return xrcond; } | |
65 | |
66 FloatComplexMatrix inverse (void) const; | |
67 | |
68 void set (const FloatComplexMatrix& R); | |
69 | |
70 void update (const FloatComplexMatrix& u); | |
71 | |
72 octave_idx_type downdate (const FloatComplexMatrix& u); | |
73 | |
74 octave_idx_type insert_sym (const FloatComplexMatrix& u, octave_idx_type j); | |
75 | |
76 void delete_sym (octave_idx_type j); | |
77 | |
78 void shift_sym (octave_idx_type i, octave_idx_type j); | |
79 | |
80 friend OCTAVE_API std::ostream& operator << (std::ostream& os, const FloatComplexCHOL& a); | |
81 | |
82 private: | |
83 | |
84 FloatComplexMatrix chol_mat; | |
85 | |
86 float xrcond; | |
87 | |
88 octave_idx_type init (const FloatComplexMatrix& a, bool calc_cond); | |
89 }; | |
90 | |
91 FloatComplexMatrix OCTAVE_API chol2inv (const FloatComplexMatrix& r); | |
92 | |
93 #endif | |
94 | |
95 /* | |
96 ;;; Local Variables: *** | |
97 ;;; mode: C++ *** | |
98 ;;; End: *** | |
99 */ |