SparsedbleCHOL.h

Go to the documentation of this file.
00001 /*
00002 
00003 Copyright (C) 2005-2012 David Bateman
00004 Copyright (C) 1998-2005 Andy Adler
00005 
00006 This file is part of Octave.
00007 
00008 Octave is free software; you can redistribute it and/or modify it
00009 under the terms of the GNU General Public License as published by the
00010 Free Software Foundation; either version 3 of the License, or (at your
00011 option) any later version.
00012 
00013 Octave is distributed in the hope that it will be useful, but WITHOUT
00014 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00015 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00016 for more details.
00017 
00018 You should have received a copy of the GNU General Public License
00019 along with Octave; see the file COPYING.  If not, see
00020 <http://www.gnu.org/licenses/>.
00021 
00022 */
00023 
00024 #if !defined (octave_sparse_CHOL_h)
00025 #define octave_sparse_CHOL_h 1
00026 
00027 #include "sparse-base-chol.h"
00028 #include "dSparse.h"
00029 
00030 class
00031 OCTAVE_API
00032 SparseCHOL : public sparse_base_chol <SparseMatrix, double, SparseMatrix>
00033 {
00034 public:
00035 
00036   SparseCHOL (void) : sparse_base_chol<SparseMatrix, double, SparseMatrix> () { }
00037 
00038   SparseCHOL (const SparseMatrix& a, bool natural = true) :
00039     sparse_base_chol<SparseMatrix, double, SparseMatrix> (a, natural) { }
00040 
00041   SparseCHOL (const SparseMatrix& a, octave_idx_type& info,
00042               bool natural = true) :
00043     sparse_base_chol<SparseMatrix, double, SparseMatrix> (a, info, natural) { }
00044 
00045   SparseCHOL (const SparseCHOL& a) :
00046     sparse_base_chol<SparseMatrix, double, SparseMatrix> (a) { }
00047 
00048   ~SparseCHOL (void) { }
00049 
00050   SparseCHOL& operator = (const SparseCHOL& a)
00051     {
00052       if (this != &a)
00053         sparse_base_chol <SparseMatrix, double, SparseMatrix> :: operator = (a);
00054 
00055       return *this;
00056     }
00057 
00058   SparseMatrix chol_matrix (void) const { return R(); }
00059 
00060   SparseMatrix L (void) const
00061   { return sparse_base_chol<SparseMatrix, double, SparseMatrix>:: L (); }
00062 
00063   SparseMatrix R (void) const
00064     { return sparse_base_chol<SparseMatrix, double, SparseMatrix>:: R (); }
00065 
00066   octave_idx_type P (void) const
00067     { return sparse_base_chol<SparseMatrix, double, SparseMatrix>:: P (); }
00068 
00069   ColumnVector perm (void) const
00070     { return sparse_base_chol<SparseMatrix, double, SparseMatrix>:: perm (); }
00071 
00072   SparseMatrix Q (void) const
00073     { return sparse_base_chol<SparseMatrix, double, SparseMatrix>:: Q (); }
00074 
00075   double rcond (void) const
00076     { return sparse_base_chol<SparseMatrix, double, SparseMatrix>:: rcond (); }
00077 
00078   // Compute the inverse of a matrix using the Cholesky factorization.
00079   SparseMatrix inverse (void) const
00080    { return sparse_base_chol<SparseMatrix, double, SparseMatrix>::
00081        inverse (); }
00082 };
00083 
00084 SparseMatrix OCTAVE_API chol2inv (const SparseMatrix& r);
00085 
00086 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines