Commit e90c1d7d authored by Davis King's avatar Davis King

Minor style changes.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403498
parent 764f0ea5
...@@ -27,11 +27,11 @@ namespace dlib ...@@ -27,11 +27,11 @@ namespace dlib
unsigned long unsigned long
) const {} ) const {}
virtual bool R_has_lower_bound ( virtual bool r_has_lower_bound (
scalar_type& scalar_type&
) const { return false; } ) const { return false; }
virtual scalar_type get_C ( virtual scalar_type get_c (
) const = 0; ) const = 0;
virtual long get_num_dimensions ( virtual long get_num_dimensions (
...@@ -150,11 +150,11 @@ namespace dlib ...@@ -150,11 +150,11 @@ namespace dlib
) const ) const
{ {
// make sure requires clause is not broken // make sure requires clause is not broken
DLIB_ASSERT(problem.get_C() > 0 && DLIB_ASSERT(problem.get_c() > 0 &&
problem.get_num_dimensions() > 0, problem.get_num_dimensions() > 0,
"\t void oca::operator()" "\t void oca::operator()"
<< "\n\t The oca_problem is invalid" << "\n\t The oca_problem is invalid"
<< "\n\t problem.get_C(): " << problem.get_C() << "\n\t problem.get_c(): " << problem.get_c()
<< "\n\t problem.get_num_dimensions(): " << problem.get_num_dimensions() << "\n\t problem.get_num_dimensions(): " << problem.get_num_dimensions()
<< "\n\t this: " << this << "\n\t this: " << this
); );
...@@ -164,7 +164,7 @@ namespace dlib ...@@ -164,7 +164,7 @@ namespace dlib
typedef typename matrix_type::mem_manager_type mem_manager_type; typedef typename matrix_type::mem_manager_type mem_manager_type;
typedef matrix_type vect_type; typedef matrix_type vect_type;
const scalar_type C = problem.get_C(); const scalar_type C = problem.get_c();
std::list<vect_type> planes; std::list<vect_type> planes;
std::vector<scalar_type> bs, miss_count; std::vector<scalar_type> bs, miss_count;
...@@ -184,7 +184,7 @@ namespace dlib ...@@ -184,7 +184,7 @@ namespace dlib
scalar_type cp_obj = 0; scalar_type cp_obj = 0;
scalar_type R_lower_bound; scalar_type R_lower_bound;
if (problem.R_has_lower_bound(R_lower_bound)) if (problem.r_has_lower_bound(R_lower_bound))
{ {
// The flat lower bounding plane is always good to have if we know // The flat lower bounding plane is always good to have if we know
// what it is. // what it is.
......
...@@ -40,7 +40,7 @@ namespace dlib ...@@ -40,7 +40,7 @@ namespace dlib
exists to allow the user to monitor the progress of the optimization. exists to allow the user to monitor the progress of the optimization.
!*/ !*/
virtual bool R_has_lower_bound ( virtual bool r_has_lower_bound (
scalar_type& lower_bound scalar_type& lower_bound
) const { return false; } ) const { return false; }
/*! /*!
...@@ -52,7 +52,7 @@ namespace dlib ...@@ -52,7 +52,7 @@ namespace dlib
- returns false - returns false
!*/ !*/
virtual scalar_type get_C ( virtual scalar_type get_c (
) const = 0; ) const = 0;
/*! /*!
ensures ensures
...@@ -82,7 +82,7 @@ namespace dlib ...@@ -82,7 +82,7 @@ namespace dlib
- #risk_value == R(#current_solution) - #risk_value == R(#current_solution)
- #risk_subgradient == an element of the subgradient of R() at the - #risk_subgradient == an element of the subgradient of R() at the
point #current_solution point #current_solution
- Note that risk_value and risk_subgradient are NOT multiplied by get_C() - Note that risk_value and risk_subgradient are NOT multiplied by get_c()
!*/ !*/
}; };
...@@ -135,11 +135,11 @@ namespace dlib ...@@ -135,11 +135,11 @@ namespace dlib
) const; ) const;
/*! /*!
requires requires
- problem.get_C() > 0 - problem.get_c() > 0
- problem.get_num_dimensions() > 0 - problem.get_num_dimensions() > 0
ensures ensures
- solves the given oca problem and stores the solution in #w - solves the given oca problem and stores the solution in #w
- returns the objective value at the soltuion #w - returns the objective value at the solution #w
!*/ !*/
void set_epsilon ( void set_epsilon (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment