TISampledFunction.h
Go to the documentation of this file.
1 #ifndef imath_TISampledFunction_included
2 #define imath_TISampledFunction_included
3 
4 
5 #include <istd/IChangeable.h>
6 #include <istd/TIndex.h>
7 #include <istd/TRange.h>
8 
9 #include <imath/TIMathFunction.h>
10 #include <imath/TVector.h>
11 
12 
13 namespace imath
14 {
15 
19 template <int ArgumentDimensions, int ResultDimensions>
21  virtual public imath::TIMathFunction<
22  istd::TIndex<ArgumentDimensions>,
23  TVector<ResultDimensions> >,
24  virtual public istd::IChangeable
25 {
26 public:
27  typedef imath::TIMathFunction<
31 
35  virtual bool CreateFunction(double* dataPtr, const ArgumentType& sizes) = 0;
36 
40  virtual int GetTotalSamplesCount() const = 0;
41 
45  virtual int GetGridSize(int dimensionIndex) const = 0;
46 
51  virtual istd::CRange GetLogicalRange(int dimensionIndex) const = 0;
52 
60  virtual istd::CRange GetResultValueRange(int dimensionIndex, int resultDimension = -1) const = 0;
61 
65  virtual int GetArgumentDimensionality() const;
66 
70  virtual int GetResultDimensionality() const;
71 };
72 
73 
74 template <int ArgumentDimensions, int ResultDimensions>
76 {
77  return ArgumentDimensions;
78 }
79 
80 
81 template <int ArgumentDimensions, int ResultDimensions>
83 {
84  return ResultDimensions;
85 }
86 
87 
88 // standard templatization
89 
92 
93 
94 } // namespace imath
95 
96 
97 #endif // !imath_TISampledFunction_included
98 
99 
virtual bool CreateFunction(double *dataPtr, const ArgumentType &sizes)=0
Create function from input data.
virtual istd::CRange GetLogicalRange(int dimensionIndex) const =0
Get logical grid position range for specified dimension.
virtual int GetTotalSamplesCount() const =0
Get number of samples stored in this container.
Multidimensional index used to addressing fixed-size array.
Definition: TIndex.h:17
virtual int GetGridSize(int dimensionIndex) const =0
Get number of samples for specified dimension.
virtual int GetResultDimensionality() const
Get the number of result components.
virtual int GetArgumentDimensionality() const
Get the number of argument components.
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
Interface for a resampled function with a regular grid design.
Implementation of fixed-size mathematical vector with specified type of elements. ...
Definition: TVector.h:27
TISampledFunction< 1, 1 > ISampledFunction
Template interface for any mathematical function.
virtual istd::CRange GetResultValueRange(int dimensionIndex, int resultDimension=-1) const =0
Get range of result value for the given axis.
imath::TIMathFunction< istd::TIndex< ArgumentDimensions >, imath::TVector< ResultDimensions > > BaseClass
BaseClass::ArgumentType ArgumentType
TISampledFunction< 2, 1 > ISampledFunction2d

© 2007-2017 Witold Gantzke and Kirill Lepskiy