Commit b6b83798 authored by Davis King's avatar Davis King

Relaxed the requirements for calling find_min_box_constrained() and

find_max_box_constrained().  Now the bounds can be empty for some variables.
parent 97474376
...@@ -482,7 +482,7 @@ namespace dlib ...@@ -482,7 +482,7 @@ namespace dlib
<< "\n\t x_upper.size(): " << x_upper.size() << "\n\t x_upper.size(): " << x_upper.size()
); );
DLIB_ASSERT ( DLIB_ASSERT (
min(x_upper-x_lower) > 0, min(x_upper-x_lower) >= 0,
"\tdouble find_min_box_constrained()" "\tdouble find_min_box_constrained()"
<< "\n\t You have to supply proper box constraints to this function." << "\n\t You have to supply proper box constraints to this function."
<< "\n\r min(x_upper-x_lower): " << min(x_upper-x_lower) << "\n\r min(x_upper-x_lower): " << min(x_upper-x_lower)
...@@ -610,7 +610,7 @@ namespace dlib ...@@ -610,7 +610,7 @@ namespace dlib
<< "\n\t x_upper.size(): " << x_upper.size() << "\n\t x_upper.size(): " << x_upper.size()
); );
DLIB_ASSERT ( DLIB_ASSERT (
min(x_upper-x_lower) > 0, min(x_upper-x_lower) >= 0,
"\tdouble find_max_box_constrained()" "\tdouble find_max_box_constrained()"
<< "\n\t You have to supply proper box constraints to this function." << "\n\t You have to supply proper box constraints to this function."
<< "\n\r min(x_upper-x_lower): " << min(x_upper-x_lower) << "\n\r min(x_upper-x_lower): " << min(x_upper-x_lower)
......
...@@ -297,7 +297,7 @@ namespace dlib ...@@ -297,7 +297,7 @@ namespace dlib
- is_col_vector(x_upper) == true - is_col_vector(x_upper) == true
- x.size() == x_lower.size() == x_upper.size() - x.size() == x_lower.size() == x_upper.size()
(i.e. x, x_lower, and x_upper need to all be column vectors of the same dimensionality) (i.e. x, x_lower, and x_upper need to all be column vectors of the same dimensionality)
- min(x_upper-x_lower) > 0 - min(x_upper-x_lower) >= 0
(i.e. x_upper must contain upper bounds relative to x_lower) (i.e. x_upper must contain upper bounds relative to x_lower)
ensures ensures
- Performs a box constrained minimization of the function f() using the given - Performs a box constrained minimization of the function f() using the given
...@@ -391,7 +391,7 @@ namespace dlib ...@@ -391,7 +391,7 @@ namespace dlib
- is_col_vector(x_upper) == true - is_col_vector(x_upper) == true
- x.size() == x_lower.size() == x_upper.size() - x.size() == x_lower.size() == x_upper.size()
(i.e. x, x_lower, and x_upper need to all be column vectors of the same dimensionality) (i.e. x, x_lower, and x_upper need to all be column vectors of the same dimensionality)
- min(x_upper-x_lower) > 0 - min(x_upper-x_lower) >= 0
(i.e. x_upper must contain upper bounds relative to x_lower) (i.e. x_upper must contain upper bounds relative to x_lower)
ensures ensures
- Performs a box constrained maximization of the function f() using the given - Performs a box constrained maximization of the function f() using the given
......
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