00001
00008 #ifndef _InnerPenalty_h
00009 #define _InnerPenalty_h
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "Error.h"
00021 #include "PenaltyFunction.h"
00022
00023
00024
00025
00026
00027 class InnerPenalty
00028 : public PenaltyFunction
00029 {
00030 public:
00031
00032
00035 InnerPenalty();
00036
00042 InnerPenalty(CountedPtr<const FunctionBase> cpFunction);
00043
00044
00047 ~InnerPenalty(void);
00048
00049
00050
00051
00052
00053
00056
00057
00060
00061
00062
00063
00064
00065 virtual wxString ToString(bool full = true) const;
00066
00067 static FunctionIdType ClassId();
00068
00071 virtual FunctionIdType Id() const;
00072
00073
00074
00075 virtual bool IsValid(const ColumnVector& point) const;
00076
00077 virtual bool IsValidStartingPoint(const ColumnVector& point) const;
00078
00079 protected:
00085 virtual double DoEvaluate(const ColumnVector& point) const
00086 throw(EvaluationError);
00087
00088 virtual double DoEvaluateNoThrow(const ColumnVector& point) const
00089 throw();
00090
00091 virtual double PenaltyValue(double arg) const = 0;
00092
00093 private:
00094
00096 static const double mNan;
00097 };
00098
00099
00100
00101
00102
00103
00104
00105 #endif // _InnerPenalty_h