home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / octave-1.1.1p1-bin.lha / include / octave / dbleDET.h < prev    next >
C/C++ Source or Header  |  1996-10-12  |  2KB  |  91 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_DET_h)
  25. #define octave_DET_h 1
  26.  
  27. class ostream;
  28.  
  29. extern "C++" {
  30.  
  31. class DET
  32. {
  33. friend class Matrix;
  34.  
  35. public:
  36.  
  37.   DET (void);
  38.  
  39.   DET (const DET& a);
  40.  
  41.   DET& operator = (const DET& a);
  42.  
  43.   int value_will_overflow (void) const;
  44.   int value_will_underflow (void) const;
  45.   double coefficient (void) const;
  46.   int exponent (void) const;
  47.   double value (void) const;
  48.  
  49.   friend ostream&  operator << (ostream& os, const DET& a);
  50.  
  51. private:
  52.  
  53.   DET (const double *d);
  54.  
  55.   double det [2];
  56. };
  57.  
  58. inline DET::DET (void)
  59. {
  60. }
  61.  
  62. inline DET::DET (const DET& a)
  63. {
  64.   det[0] = a.det[0];
  65.   det[1] = a.det[1];
  66. }
  67.  
  68. inline DET& DET::operator = (const DET& a)
  69. {
  70.   det[0] = a.det[0];
  71.   det[1] = a.det[1];
  72.   return *this;
  73. }
  74.  
  75. inline DET::DET (const double *d)
  76. {
  77.   det[0] = d[0];
  78.   det[1] = d[1];
  79. }
  80.  
  81. } // extern "C++"
  82.  
  83. #endif
  84.  
  85. /*
  86. ;;; Local Variables: ***
  87. ;;; mode: C++ ***
  88. ;;; page-delimiter: "^/\\*" ***
  89. ;;; End: ***
  90. */
  91.