Minor changes to ToString().

This commit is contained in:
Ryan Curtin
2014-02-10 14:16:20 +00:00
parent 2478634261
commit 52f2b20cd7
+14 -12
View File
@@ -419,21 +419,23 @@ double L_BFGS<FunctionType>::Optimize(arma::mat& iterate,
return function.Evaluate(iterate);
}
// convert the object to a string
// Convert the object to a string.
template<typename FunctionType>
std::string L_BFGS<FunctionType>::ToString() const{
std::string L_BFGS<FunctionType>::ToString() const
{
std::ostringstream convert;
convert << "L_BFGS [" << this << "]" << std::endl;
convert << " Memory Size: " << numBasis << std::endl;
convert << " Cube Size" << s.n_rows << "x" << s.n_cols << "x" << s.n_slices;
convert << std::endl;
convert << " Maximum Iterations: " << maxIterations << std::endl;
convert << " Armijo condition Parameter: " << armijoConstant << std::endl;
convert << " Wolfe Parameter: " << wolfe << std::endl;
convert << " Minimum Gradient: " << minGradientNorm << std::endl;
convert << " Minimum Step of Line Search: " << minStep << std::endl;
convert << " Maximum Step of Line Search: " << maxStep << std::endl;
convert << " Function:" << std::endl;
convert << util::Indent(function.ToString(), 2);
convert << " Memory size: " << numBasis << std::endl;
convert << " Cube size: " << s.n_rows << "x" << s.n_cols << "x"
<< s.n_slices << std::endl;
convert << " Maximum iterations: " << maxIterations << std::endl;
convert << " Armijo condition constant: " << armijoConstant << std::endl;
convert << " Wolfe parameter: " << wolfe << std::endl;
convert << " Minimum gradient norm: " << minGradientNorm << std::endl;
convert << " Minimum step for line search: " << minStep << std::endl;
convert << " Maximum step for line search: " << maxStep << std::endl;
return convert.str();
}