Changeset 805 in Sophya for trunk/SophyaLib/NTools
- Timestamp:
- Apr 3, 2000, 7:41:08 PM (25 years ago)
- Location:
- trunk/SophyaLib/NTools
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/NTools/NTools.o.list
r756 r805 19 19 imageop.o 20 20 integ.o 21 linfit.o22 21 matxop.o 23 22 median.o -
trunk/SophyaLib/NTools/fftmserver.cc
r717 r805 184 184 void FFTMayerServer::FFTForward(TVector< r_4 > const & in, TVector< complex<r_4> > & out) 185 185 { 186 r_4 a,b ,c,d;186 r_4 a,b; 187 187 int i,j,k; 188 188 int n = in.NElts(); … … 227 227 void FFTMayerServer::FFTBackward(TVector< complex<r_4> > const & in, TVector< r_4 > & out) 228 228 { 229 r_4 a,b ,c,d;229 r_4 a,b; 230 230 int i,j,k; 231 231 int n = in.NElts(); … … 269 269 void FFTMayerServer::FFTForward(TVector< r_8 > const & in, TVector< complex<r_8> > & out) 270 270 { 271 r_8 a,b ,c,d;271 r_8 a,b; 272 272 int i,j,k; 273 273 int n = in.NElts(); … … 311 311 void FFTMayerServer::FFTBackward(TVector< complex<r_8> > const & in, TVector< r_8 > & out) 312 312 { 313 r_8 a,b ,c,d;313 r_8 a,b; 314 314 int i,j,k; 315 315 int n = in.NElts(); … … 356 356 if (n < 2) return(true); 357 357 int nc = n; 358 int r;359 358 while (nc > 1) { 360 359 if (nc%2 != 0) return(true); -
trunk/SophyaLib/NTools/fftpserver.cc
r791 r805 288 288 out.ReSize(ncs); 289 289 out(0) = complex<r_8> (in(0),0.); 290 int k;291 290 for(int k=1;k<nc;k++) 292 291 out(k) = complex<r_4> (in(2*k-1), in(2*k)); … … 303 302 out.ReSize(ncs); 304 303 out(0) = complex<r_4> (in(0),0.); 305 int k;306 304 for(int k=1;k<nc;k++) 307 305 out(k) = complex<r_4> (in(2*k-1), in(2*k)); -
trunk/SophyaLib/NTools/linfit.h
r552 r805 1 1 // This may look like C code, but it is really -*- C++ -*- 2 2 // 3 // $Id: linfit.h,v 1. 6 1999-11-05 13:08:30ansari Exp $3 // $Id: linfit.h,v 1.7 2000-04-03 17:41:07 ansari Exp $ 4 4 // 5 5 … … 9 9 #define LINFIT_SEEN 10 10 11 #include "machdefs.h" 12 #include "tvector.h" 11 // Mis ds TArray/sopemtx.h - fichier garde pour back-compatibilite 12 // Reza 03/2000 13 #include "sopemtx.h" 13 14 14 namespace SOPHYA {15 16 class LinFitter {17 public :18 LinFitter();19 virtual ~LinFitter();20 21 double LinFit(const Vector& x, const Vector& y, int nf,22 double (*f)(int, double), Vector& c);23 // fit lineaire des y en tant que somme de c(i)f(i,x), i=0..nf-1;24 25 double LinFit(const Matrix& fx, const Vector& y, Vector& c);26 // fit lineaire des y en tant que somme de c(i)f(i,x), i=0..nf-1,27 // la matrice fx contient les valeurs des f:28 // fx(i,j) = f(i, x(j)).29 30 double LinFit(const Vector& x, const Vector& y, const Vector& errY2, int nf,31 double (*f)(int, double), Vector& c, Vector& errC);32 // fit lineaire des y en tant que somme de c(i)f(i,x), i=0..nf-1,33 // errY2 contient les carres des erreurs sur les Y.34 // au retour, errC contient les erreurs sur les coefs.35 36 double LinFit(const Matrix& fx, const Vector& y, const Vector& errY2,37 Vector& c, Vector& errC);38 // fit lineaire des y en tant que somme de c(i)f(i,x), i=0..nf-1,39 // la matrice fx contient les valeurs des f:40 // fx(i,j) = f(i, x(j)).41 // errY2 contient les carres des erreurs sur les Y.42 // au retour, errC contient les erreurs sur les coefs.43 };44 45 } // Fin du namespace46 15 47 16 #endif // LINFIT_SEEN -
trunk/SophyaLib/NTools/objfitter.h
r756 r805 60 60 61 61 62 #endif // ARRFITTER_SEEN62 #endif // OBJFITTER_SEEN -
trunk/SophyaLib/NTools/poly.cc
r540 r805 2 2 #include "poly.h" 3 3 #include "linfit.h" 4 #include "fioarr.h" 4 5 5 6 //++ … … 254 255 255 256 //++ 256 void Poly::Print(ostream& s ) const257 void Poly::Print(ostream& s, int_4 , bool ) const 257 258 // 258 259 // Impresssion. … … 484 485 Poly2 tmp(*this); 485 486 Vector::Realloc((degreX+1)*(degreY+1)); 486 Reset();487 DataBlock().Reset(); 487 488 maxDegX = degreX; 488 489 maxDegY = degreY; … … 721 722 722 723 //++ 723 void Poly2::Print(ostream& s ) const724 void Poly2::Print(ostream& s, int_4 , bool ) const 724 725 // 725 726 // Impression sur stream s. -
trunk/SophyaLib/NTools/poly.h
r552 r805 1 1 // This may look like C code, but it is really -*- C++ -*- 2 2 // 3 // $Id: poly.h,v 1. 4 1999-11-05 13:08:31ansari Exp $3 // $Id: poly.h,v 1.5 2000-04-03 17:41:08 ansari Exp $ 4 4 // 5 5 … … 34 34 inline void Realloc(int n, bool force=false) {Vector::Realloc(n+1,force);} 35 35 36 inline double operator[](int i) const {return Element(i);} 37 inline double& operator[](int i) {dirty = 1; return Element(i);} 36 // Pour compatibilite PEIDA - Reza 03/2000 37 inline double Element(int i) const { return Elem(i,0,0,0,0); } 38 inline double & Element(int i) { return Elem(i,0,0,0,0); } 39 40 inline double operator[](int i) const {return Elem(i,0,0,0,0);} 41 inline double& operator[](int i) {dirty = 1; return Elem(i,0,0,0,0);} 38 42 // Retourne le coefficient de degre i 39 43 … … 68 72 Poly2 operator() (Poly2 const& b) const; 69 73 70 void Print(ostream& s ) const;74 void Print(ostream& s, int_4 maxprt=-1, bool si=false) const; 71 75 72 76 double Fit(Vector const& x, Vector const& y, int degre); … … 131 135 inline int Deg() const {UpdateDegIfDirty(); return deg;} 132 136 // les degres partiels en x et y, et totaux. 137 138 // Pour compatibilite PEIDA - Reza 03/2000 139 inline double Element(int i) const { return Elem(i,0,0,0,0); } 140 inline double & Element(int i) { return Elem(i,0,0,0,0); } 133 141 134 142 double operator()(double x, double y) const; … … 183 191 void Realloc(int degreX, int degreY); 184 192 185 void Print(ostream& s ) const;193 void Print(ostream& s, int_4 maxprt=-1, bool si=false) const; 186 194 187 195 private:
Note:
See TracChangeset
for help on using the changeset viewer.