home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / octave-1.1.1p1-bin.lha / include / octave / dbleCHOL.h < prev    next >
C/C++ Source or Header  |  1996-10-12  |  2KB  |  95 lines

  1. //                                  -*- C++ -*-
  2. /*
  3.  
  4. Copyright (C) 1992, 1993, 1994, 1995 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 2, or (at your option) any
  11. 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, write to the Free
  20. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22. */
  23.  
  24. #if !defined (octave_CHOL_h)
  25. #define octave_CHOL_h 1
  26.  
  27. class ostream;
  28.  
  29. #include "dMatrix.h"
  30.  
  31. extern "C++" {
  32.  
  33. class CHOL
  34. {
  35. friend class Matrix;
  36.  
  37. public:
  38.  
  39.   CHOL (void) {}
  40.  
  41.   CHOL (const Matrix& a);
  42.   CHOL (const Matrix& a, int& info);
  43.  
  44.   CHOL (const CHOL& a);
  45.  
  46.   CHOL& operator = (const CHOL& a);
  47.   Matrix chol_matrix (void) const;
  48.   friend ostream& operator << (ostream& os, const CHOL& a);
  49.  
  50. private:
  51.  
  52.   int init (const Matrix& a);
  53.  
  54.   Matrix chol_mat;
  55. };
  56.  
  57. inline CHOL::CHOL (const Matrix& a)
  58. {
  59.   init (a);
  60. }
  61.  
  62. inline CHOL::CHOL (const Matrix& a, int& info)
  63. {
  64.   info = init (a);
  65. }
  66.  
  67. inline CHOL::CHOL (const CHOL& a)
  68. {
  69.   chol_mat = a.chol_mat;
  70. }
  71.  
  72. inline CHOL&
  73. CHOL::operator = (const CHOL& a)
  74. {
  75.   chol_mat = a.chol_mat;
  76.  
  77.   return *this;
  78. }
  79.  
  80. inline Matrix CHOL::chol_matrix (void) const
  81. {
  82.   return chol_mat;
  83. }
  84.  
  85. } // extern "C++"
  86.  
  87. #endif
  88.  
  89. /*
  90. ;;; Local Variables: ***
  91. ;;; mode: C++ ***
  92. ;;; page-delimiter: "^/\\*" ***
  93. ;;; End: ***
  94. */
  95.