16 virtual const char *ScalingMethod()
const = 0;
20 virtual void ScaleJacobian (
const RVector &unscaled,
RMatrix &J)
const {
21 return J.ColScale (JScale (unscaled));
23 virtual void ScaleGradient (
const RVector &unscaled,
RVector &grad)
const {
24 grad *= JScale (unscaled);
31 const char *ScalingMethod ()
const {
return "NULL"; }
38 void ScaleGradient (
const RVector &unscaled,
RVector &grad)
const {}
44 const char *ScalingMethod ()
const {
return "CONST"; }
45 RVector Scale (
const RVector &unscaled)
const {
return unscaled*sc; }
46 RVector Unscale (
const RVector &scaled)
const {
return scaled/sc; }
55 const char *ScalingMethod ()
const {
return "LOG"; }
56 RVector Scale (
const RVector &unscaled)
const {
return log(unscaled); }
57 RVector Unscale (
const RVector &scaled)
const {
return exp(scaled); }
58 RVector JScale (
const RVector &unscaled)
const {
return unscaled; }
64 const char *ScalingMethod ()
const {
return "LINLOG"; }
65 RVector Scale (
const RVector &unscaled)
const {
return log(unscaled*sc); }
66 RVector Unscale (
const RVector &scaled)
const {
return exp(scaled)/sc; }
67 RVector JScale (
const RVector &unscaled)
const {
return unscaled; }
75 { xmin = _xmin, xmax = _xmax; }
76 const char *ScalingMethod ()
const {
return "BOUNDED_LOG"; }
78 {
return log ((unscaled-xmin)*(xmax-unscaled)); }
85 #endif // !__PSCALER_H
int Dim() const
Returns the size of the vector.
Definition: vector.h:295