Changeset 805 in Sophya for trunk/SophyaLib/NTools/poly.h


Ignore:
Timestamp:
Apr 3, 2000, 7:41:08 PM (25 years ago)
Author:
ansari
Message:

Adaptation aux modifications de TArray<T>/TVector<T> - linfit.cc integre
a TArray/sopemtx.cc - Reza 03/04/2000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/NTools/poly.h

    r552 r805  
    11// This may look like C code, but it is really -*- C++ -*-
    22//
    3 // $Id: poly.h,v 1.4 1999-11-05 13:08:31 ansari Exp $
     3// $Id: poly.h,v 1.5 2000-04-03 17:41:08 ansari Exp $
    44//
    55
     
    3434  inline void Realloc(int n, bool force=false) {Vector::Realloc(n+1,force);}
    3535
    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);}
    3842  // Retourne le coefficient de degre i
    3943
     
    6872  Poly2 operator() (Poly2 const& b) const;
    6973
    70   void Print(ostream& s) const;
     74  void Print(ostream& s, int_4 maxprt=-1, bool si=false) const;
    7175
    7276  double Fit(Vector const& x, Vector const& y, int degre);
     
    131135  inline int Deg()  const {UpdateDegIfDirty(); return deg;}
    132136  // 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); }
    133141
    134142  double operator()(double x, double y) const;
     
    183191  void Realloc(int degreX, int degreY);
    184192
    185   void Print(ostream& s) const;
     193  void Print(ostream& s, int_4 maxprt=-1, bool si=false) const;
    186194
    187195private:
Note: See TracChangeset for help on using the changeset viewer.