Overture  Version 25
PolynomialMapping.h
Go to the documentation of this file.
1 #ifndef POLYNOMIAL_MAPPING_H
2 #define POLYNOMIAL_MAPPING_H "Polynomial.h"
3 
4 #include "Mapping.h"
5 
6 class PolynomialMapping : public Mapping
7 {
8 //-------------------------------------------------------------
9 // Here is a derived class to define a polynomial mapping
10 //-------------------------------------------------------------
11 public:
12 
13  PolynomialMapping( int numberOfDimensions =2 );
14 
15  // Copy constructor is deep by default
16  PolynomialMapping( const PolynomialMapping &, const CopyType copyType=DEEP );
17 
19 
21 
22  void setCoefficients(const RealArray & coeff);
23 
24  void getCoefficients(RealArray & coeff) const;
25 
28 
29  virtual int get( const GenericDataBase & dir, const aString & name); // get from a database file
30  virtual int put( GenericDataBase & dir, const aString & name) const; // put to a database file
31 
32 
34  aString getClassName() const { return PolynomialMapping::className; }
35 
36  int update( MappingInformation & mapInfo ) ;
37 
38 private:
39 
40  aString className;
41  RealArray pc;
42 
43  private:
44 
45  //
46  // Virtual member functions used only through class ReferenceCounting:
47  //
49  { return operator=((PolynomialMapping &)x); }
50  virtual void reference( const ReferenceCounting& x)
51  { reference((PolynomialMapping &)x); } // *** Conversion to this class for the virtual = ****
52  virtual ReferenceCounting* virtualConstructor( const CopyType ct = DEEP ) const
53  { return ::new PolynomialMapping(*this, ct); }
54 
55 };
56 
57 
58 #endif // POLYNOMIAL_H
59 
60