trfd.h

Go to the documentation of this file.
00001 // -*-c++-*-
00002 //      LAPACK++ (V. 1.1)
00003 //      (C) 1992-1996 All Rights Reserved.
00004 
00005 #ifndef _LA_TRIDIAG_FACT_DOUBLE_H_
00006 #define _LA_TRIDIAG_FACT_DOUBLE_H_
00007 
00018 #include LA_VECTOR_LONG_INT_H
00019 #include LA_TRIDIAG_MAT_DOUBLE_H
00020 
00021 #include "lapack.h"
00022 
00047 class LaTridiagFactDouble
00048 {
00049     LaTridiagMatDouble T_;
00050     LaVectorLongInt pivot_;
00051     int size_;
00052 
00053 public:
00054 
00055     // constructor
00056 
00057     LaTridiagFactDouble();
00058     LaTridiagFactDouble(int);
00059     LaTridiagFactDouble(LaTridiagFactDouble &);
00060     ~LaTridiagFactDouble();
00061 
00062     LaTridiagMatDouble& T() { return T_; }
00063     LaVectorLongInt& pivot() { return pivot_; }
00064     int size() { return size_; }
00065 
00066     LaVectorDouble& diag(int);
00067     const LaVectorDouble& diag(int k) const;
00068 
00069     // operators
00070 
00071     LaTridiagFactDouble& ref(LaTridiagMatDouble &);
00072     LaTridiagFactDouble& ref(LaTridiagFactDouble &);
00073     LaTridiagFactDouble& copy(const LaTridiagMatDouble &);
00074     LaTridiagFactDouble& copy(const LaTridiagFactDouble &);
00075 
00076 };
00077 
00078 
00079 
00080     // constructor/destructor functions
00081 
00082 inline LaTridiagFactDouble::LaTridiagFactDouble():T_(),pivot_(),size_(0)
00083 {}
00084 
00085 
00086 inline LaTridiagFactDouble::LaTridiagFactDouble(int N):T_(N),pivot_(N),size_(N)
00087 {}
00088 
00089 
00090 inline LaTridiagFactDouble::LaTridiagFactDouble(LaTridiagFactDouble &F)
00091 {
00092   T_.copy(F.T_);
00093   pivot_.copy(F.pivot_);
00094   size_ = F.size_;
00095 }
00096 
00097 inline LaTridiagFactDouble::~LaTridiagFactDouble()
00098 {}
00099 
00100     // member functions
00101 
00102 inline LaVectorDouble& LaTridiagFactDouble::diag(int k)
00103 {
00104     return T_.diag(k);
00105 }
00106 
00107 inline const LaVectorDouble& LaTridiagFactDouble::diag(int k) const
00108 {
00109     return T_.diag(k);
00110 }
00111     
00112     // operators
00113 
00114 
00115 inline LaTridiagFactDouble& LaTridiagFactDouble::ref(LaTridiagFactDouble& F)
00116 {
00117     T_.ref(F.T_);
00118     pivot_.ref(F.pivot_);
00119     size_ = F.size_;
00120     
00121     return *this;
00122 }
00123 
00124 inline LaTridiagFactDouble& LaTridiagFactDouble::ref(LaTridiagMatDouble& A)
00125 {
00126     T_.ref(A);
00127     size_ = A.size();
00128     pivot_.resize(size_, 1);
00129 
00130     return *this;
00131 }
00132 
00133 inline LaTridiagFactDouble& LaTridiagFactDouble::copy(const LaTridiagFactDouble& F)
00134 {
00135     T_.copy(F.T_);
00136     pivot_.copy(F.pivot_);
00137     size_ = F.size_;
00138     
00139     return *this;
00140 }
00141 
00142 inline LaTridiagFactDouble& LaTridiagFactDouble::copy(const LaTridiagMatDouble& A)
00143 {
00144     T_.copy(A);
00145     size_ = A.size();
00146     pivot_.resize(size_, 1);
00147 
00148     return *this;
00149 }
00150 
00159 void DLLIMPORT LaTridiagMatFactorize(const LaTridiagMatDouble &A,
00160                                   LaTridiagFactDouble &AF);
00161 
00170 void DLLIMPORT LaLinearSolve(LaTridiagFactDouble &AF, LaGenMatDouble &X,
00171                           const LaGenMatDouble &B);
00172 
00173 #endif 
00174 // _LA_TRIDIAG_FACT_DOUBLE_H_

Generated on Sat Jul 14 11:40:36 2007 for Lapack++ by  doxygen 1.5.0