print functions for use in MATLAB

release/4.3a0
Frank Dellaert 2012-01-28 19:43:09 +00:00
parent 58c4808679
commit c309047d7a
2 changed files with 23 additions and 2 deletions

View File

@ -105,7 +105,21 @@ namespace gtsam {
/// @name Standard Interface
/// @{
/// a copy of old instance except new lambda
/// print
void print(const std::string& s="") const {
cout << "NonlinearOptimizationParameters " << s << endl;
cout << "absolute decrease threshold: " << absDecrease_ << endl;
cout << "relative decrease threshold: " << relDecrease_ << endl;
cout << " error sum threshold: " << sumError_ << endl;
cout << " maximum nr. of iterations: " << maxIterations_ << endl;
cout << " initial lambda value: " << lambda_ << endl;
cout << " factor to multiply lambda: " << lambdaFactor_ << endl;
cout << " verbosity level: " << verbosity_ << endl;
cout << " lambda mode: " << lambdaMode_ << endl;
cout << " use QR: " << useQR_ << endl;
}
/// a copy of old instance except new lambda
sharedThis newLambda_(double lambda) const {
sharedThis ptr(
boost::make_shared < NonlinearOptimizationParameters > (*this));

View File

@ -193,7 +193,14 @@ public:
/// @name Standard Interface
/// @{
/** Return current error */
/// print
void print(const std::string& s="") const {
cout << "NonlinearOptimizer " << s << endl;
cout << " current error: " << error_ << endl;
cout << "iterations count: " << iterations_ << endl;
}
/** Return current error */
double error() const { return error_; }
/** Return current lambda */