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