home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 21 / IOPROG_21.ISO / SOFT / LIBMAT.ZIP / LUDEC.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-16  |  2.1 KB  |  75 lines

  1. /**************************************************/
  2. /*         ludec.hpp header for luDec class       */
  3. /**************************************************/
  4.  
  5.  
  6. /**************************************************/
  7. /*            MatClass Source File                */
  8. /*       Copyright of C. R. Birchenhall           */
  9. /*       University of Manchester, UK.            */
  10. /*   MatClass is freeware. This file should be    */
  11. /* made freely available to users of any software */
  12. /* whose creation is wholly or partly dependent   */
  13. /*                on this file.                   */
  14. /**************************************************/
  15.  
  16. #ifndef MATDEC_H
  17. #include "matdec.hpp"
  18. #endif
  19.  
  20. #ifndef MATLU_H
  21. #include "matlu.hpp"
  22. #endif
  23.  
  24. #ifndef MATDECLU_H
  25.  
  26. #define MATDECLU_H
  27.  
  28.  
  29. class luDec : public matDec
  30. {
  31.       indexArray  indexp ;
  32.       REAL        sign ;
  33.  
  34.    public :
  35.  
  36.       friend void initialLudec( void ) ;
  37.  
  38.       luDec( void ) ;
  39.       luDec( luDec& lu ) ;
  40.       luDec( const matrix& x ) ;
  41.       virtual ~luDec( void ) ;
  42.       void operator = ( const luDec& lu ) ;
  43.  
  44.       virtual void assign( const matrix& x ) ;
  45.       virtual void capture( matrix& x ) ;
  46.       virtual void clear( void ) ;
  47.       virtual void decompose( void ) ;
  48.       void lu( matrix& x, indexArray& ind ) ;
  49.       void release( matrix& x, indexArray& ind ) ;
  50.       virtual void solve( matrix& b ) ;
  51.       virtual void transSolve( matrix& b ) ;
  52.       virtual void det( REAL& r1, REAL& r2 ) ;
  53.       virtual outFile& info( outFile& f ) M_CONST ;
  54.       outFile& put( outFile& f = out ) M_CONST ;
  55.       outFile& print( char* decName= 0, outFile& f = out ) M_CONST ;
  56.       inFile& get( inFile& f = in ) ;
  57.  
  58.       void operator = ( const matrix& x )
  59.          { assign( x ) ; }
  60.  
  61.       friend outFile& operator << ( outFile& f, luDec& lu )
  62.          { return lu.put(f) ; }
  63.       friend inFile& operator >> ( inFile& f, luDec& lu )
  64.          { return lu.get(f) ; }
  65.  
  66. } ; // class luDec
  67.  
  68. matrix squareEqn( const matrix& x, const matrix& b ) ;
  69. matrix normalEqn( const matrix& x, const matrix& b ) ;
  70.  
  71. #endif
  72.  
  73.  
  74.  
  75.