1 // Copyright (C) 2010-2012 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __vtkMedFraction_h_
21 #define __vtkMedFraction_h_
23 #include "vtkObject.h"
28 class VTK_EXPORT vtkMedFraction : public vtkObject
31 static vtkMedFraction* New();
32 vtkTypeRevisionMacro(vtkMedFraction, vtkObject)
33 void PrintSelf(ostream& os, vtkIndent indent);
36 // the powers of this polynomial function
37 // the number of components of this array is equal to the maximum degree
38 // and the number of tuples to the numner of coefficients
39 virtual vtkIntArray* GetPowers();
42 // The coefficients of this polynomial function
43 virtual vtkDoubleArray* GetCoefficients();
46 // the powers of this polynomial function
47 // the number of components of this array is equal to the maximum degree
48 // and the number of tuples to the numner of coefficients
49 virtual vtkIntArray* GetDenominatorPowers();
52 // The coefficients of this polynomial function
53 virtual vtkDoubleArray* GetDenominatorCoefficients();
56 // This sets the number of coefficients in this polynom
57 void SetNumberOfCoefficients(int);
60 // This sets the number of coefficients in this polynom
61 void SetNumberOfDenominatorCoefficients(int);
64 // This sets the maximum degree of this polynom.
65 // This also allocates the array to store the powers of this
67 void SetNumberOfVariable(int);
68 vtkGetMacro(NumberOfVariable, int);
71 // Evaluate the value of this function at this point.
72 virtual double Evaluate(double*);
73 virtual double Evaluate1(double);
74 virtual double Evaluate2(double, double);
75 virtual double Evaluate3(double, double, double);
82 vtkDoubleArray* Coefficients;
84 vtkIntArray* DenominatorPowers;
85 vtkDoubleArray* DenominatorCoefficients;
90 vtkMedFraction(const vtkMedFraction&); // Not implemented.
91 void operator=(const vtkMedFraction&); // Not implemented.
94 #endif //__vtkMedFraction_h_