123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- #ifndef _NICE_PARAMETERIZEDFUNCTIONINCLUDE
- #define _NICE_PARAMETERIZEDFUNCTIONINCLUDE
- #include <vector>
- #include <limits>
- #include <core/basics/Persistent.h>
- #include <core/vector/VectorT.h>
- #include <core/vector/SparseVectorT.h>
- namespace NICE {
-
- class ParameterizedFunction : public NICE::Persistent
- {
- protected:
-
- NICE::Vector m_parameters;
- public:
-
- ParameterizedFunction ( uint dimension );
-
- virtual ~ParameterizedFunction () {};
-
- virtual double f ( uint index, double x ) const = 0;
-
-
- virtual bool isOrderPreserving () const = 0;
-
- virtual NICE::Vector getParameterLowerBounds() const = 0;
-
-
- virtual void setParameterLowerBounds(const NICE::Vector & _newLowerBounds) = 0;
-
- virtual NICE::Vector getParameterUpperBounds() const = 0;
-
-
- virtual void setParameterUpperBounds(const NICE::Vector & _newUpperBounds) = 0;
-
- const NICE::Vector & parameters() const { return m_parameters; }
-
- Vector & parameters() { return m_parameters; }
-
-
- void applyFunctionToDataMatrix ( std::vector< std::vector< double > > & dataMatrix ) const;
-
-
- virtual void restore ( std::istream & is, int format = 0 );
- virtual void store ( std::ostream & os, int format = 0 ) const;
- virtual void clear () {};
-
- virtual std::string sayYourName() const = 0;
- };
- }
- #endif
|