1 #ifndef MATH_StiefelOptimizer_H
2 #define MATH_StiefelOptimizer_H
37 int mMaxIterationsNumber;
63 int mStoredIterationsNumber;
66 int mIterationsNumber;
69 int mFunctionCallsNumber;
86 SP::MATH_StiefelFunction mFunction;
111 static inline SP::MATH_StiefelOptimizer
New() {
130 mMaxIterationsNumber=n;
135 return mMaxIterationsNumber;
139 inline void setPrecisions(
const double& epsX,
const double& epsF,
const double& epsG) {
182 return (mFunction.get()!=
null);
187 return mFunction.get();
192 return mFunction.get();
198 return mFunctionCallsNumber;
272 static void verbose(
const int& iter,
const double& tau,
const double& F,
const double& GNorm,
273 const double& xDiff,
const double& fDiff,
const int& nls);
281 const double& step,
const double& F_ref,
const double& eta,
int& ncalls);
287 const tFlag& GProjectType,
int& nls,
290 const double& step,
const double& F_ref,
const double& eta,
int& ncalls);
294 static void transform(
const tFlag& transformType,
this class describes a full symmetric matrix for lapack used
Definition: LAP_DoubleFullSymmetricMatrix.h:31
const MATH_StiefelFunction * getFunction() const
get the function
Definition: MATH_StiefelOptimizer.h:186
void getPrecisions(double &epsX, double &epsF, double &epsG) const
get precisions
Definition: MATH_StiefelOptimizer.h:146
void resetFunction()
reset the function to optimize
Definition: MATH_StiefelOptimizer.h:173
int getMaxIterationsNumber() const
get the max iterations number
Definition: MATH_StiefelOptimizer.h:134
This class describes Stiefel optimizer method for MATH_StiefelFunction.
Definition: MATH_StiefelOptimizer.h:29
DEFINE_SPTR(MATH_StiefelOptimizer)
void setFunction(SP::MATH_StiefelFunction f)
set the function to optimize
Definition: MATH_StiefelOptimizer.h:164
#define tBoolean
Definition: types.h:48
void setIsVerbose(const tBoolean &v)
print iteration result on screen
Definition: MATH_StiefelOptimizer.h:124
#define null
Definition: types.h:13
void setPrecisions(const double &epsX, const double &epsF, const double &epsG)
set precisions
Definition: MATH_StiefelOptimizer.h:139
Definition: LAP_DoubleFullGeneralMatrix.h:30
DEFINE_SVPTR(MATH_StiefelOptimizer)
tBoolean minimize(LAP_DoubleFullGeneralMatrix &X, double &FValue, double &GNorm)
minimize the function
Definition: MATH_StiefelOptimizer.cpp:36
virtual tString toString() const
to string
Definition: MATH_StiefelOptimizer.cpp:31
virtual ~MATH_StiefelOptimizer(void)
destroy an StiefelOptimizer Object.
Definition: MATH_StiefelOptimizer.cpp:27
MATH_StiefelOptimizer(void)
create a StiefelOptimizer object
Definition: MATH_StiefelOptimizer.cpp:4
This class describes Stiefel function to optimize.
Definition: MATH_StiefelFunction.h:20
static SP::MATH_StiefelOptimizer New()
create a stiefel optimizer
Definition: MATH_StiefelOptimizer.h:111
tBoolean hasFunction() const
return true if the optimized method has function
Definition: MATH_StiefelOptimizer.h:181
abstract base class for most classes.
Definition: CORE_Object.h:30
#define tString
Definition: types.h:49
void setGProjectionType(const tFlag &f)
set G Projection type
Definition: MATH_StiefelOptimizer.h:158
MATH_StiefelFunction * getFunction()
get the function
Definition: MATH_StiefelOptimizer.h:191
int getFunctionCallsNumber() const
get the number of calls of the function
Definition: MATH_StiefelOptimizer.h:197
void setMaxIterationsNumber(const int &n)
set the max iterations number
Definition: MATH_StiefelOptimizer.h:129
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106
#define tFlag
Definition: types.h:14