casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LUdecomp.h
Go to the documentation of this file.
1 //# LUdecomp.h: LU matrix decomposition
2 //# Copyright (C) 1994,1995,1999
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef NRAO_LUDECOMP_H
29 #define NRAO_LUDECOMP_H
30 
31 //# Includes
32 #include <casa/aips.h>
33 #include <casa/Containers/Block.h>
34 #include <casa/Arrays/Matrix.h>
35 
36 #define AIPS_ARRAY_INDEX_CHECK
37 
38 // On suns, at least, this needs to link with: lapack.a blas.a
39 // Since this links fortran libraries, check also whether "underscores"
40 // are needed for FORTRAN on your machine, and whether a FORTRAN MAIN is
41 // needed to initialize the fortran libraries (as it is on suns).
42 
43 // This is needed on Sun machines, likely not on IBM. Should be set in
44 // makedefs.
45 
46 // LUdecomp objects are a 2-D template matrix of numeric type which
47 // contains (in packed form) a Lower Triangular (L) and Upper Triangular (U)
48 // factorization of some numeric type matrix (A) and a block of integer type
49 // which contains (in packed form) the Permutation casacore::Matrix (P), i.e. A=PLU.
50 // The data members are filled by the LUdecomp constructors calling LAPACK's
51 // Fortran xGETRF subroutine.
52 
53 template<class T> class LUdecomp
54 {
55 public:
56  LUdecomp<T>(); // 0-length Matrices
58  LUdecomp<T>(const LUdecomp<T> &);
59  // The copy constructor uses reference semantics.
60 
64 
65  casacore::Matrix<T> getLU() const {return LU.copy();}
67 
68 private:
71 };
72 
73 #endif
On suns, at least, this needs to link with: lapack.a blas.a Since this links fortran libraries...
Definition: MatrixMath.h:36
casacore::Block< casacore::Int > thePivot
Definition: LUdecomp.h:70
casacore::Matrix< T > getUpper() const
The copy constructor uses reference semantics.
A 2-D Specialization of the Array class.
casacore::Block< casacore::Int > getPivot() const
Definition: LUdecomp.h:66
casacore::Matrix< T > getPerm() const
casacore::Matrix< T > getLU() const
Definition: LUdecomp.h:65
casacore::Matrix< T > LU
Definition: LUdecomp.h:69
casacore::Matrix< T > getLower() const