46 #include "AbstractLinAlgPack_BFGS_helpers.hpp"
47 #include "AbstractLinAlgPack_Vector.hpp"
48 #include "AbstractLinAlgPack_VectorStdOps.hpp"
50 bool AbstractLinAlgPack::BFGS_sTy_suff_p_d(
53 ,
const value_type *sTy_in
55 ,
const char func_name[]
62 sqrt_macheps = ::sqrt(std::numeric_limits<value_type>::epsilon()),
63 min_sTy = sqrt_macheps * nrm_s * nrm_y;
66 sufficiently_p_d = sTy > min_sTy;
67 if( !sufficiently_p_d && out ) {
69 *out << func_name <<
" : ";
71 <<
"Error, s'*y = " << sTy <<
" < sqrt(mach_eps) * ||s||2 * ||y||2 = "
72 << sqrt_macheps <<
" * " << nrm_s <<
" * " << nrm_y <<
" = " << min_sTy
73 <<
"\nTherefore the BFGS update is illdefined!\n";
75 return sufficiently_p_d;
value_type dot(const Vector &v_rhs1, const Vector &v_rhs2)
result = v_rhs1' * v_rhs2