提交 09af4e58 编写于 作者: S stevenj

fixed comment, added some basic argument checks

darcs-hash:20070829054323-c8de0-df6dfb55434e77aa9fb87aa0cdb7f14a516379e5.gz
上级 b1e23a05
......@@ -194,6 +194,10 @@ static nlopt_result nlopt_minimize_(
nlopt_data d;
nlopt_stopping stop;
/* some basic argument checks */
if (n <= 0 || !f || !lb || !ub || !x || !fmin)
return NLOPT_INVALID_ARGS;
d.f = f;
d.f_data = f_data;
d.lb = lb;
......
......@@ -19,9 +19,10 @@
* measure (d) of the rectangle, [2..n+1] are the coordinates of the
* center (c), and [n+2..2n+1] are the widths of the sides (w).
*
* a list of rectangles is just an array of N hyper-rectangles
* stored as an N x L in row-major order. Generally,
* we allocate more than we need, allocating Na hyper-rectangles.
* we store the hyper-rectangles in a red-black tree, sorted by (d,f)
* in lexographic order, to allow us to perform quick convex-hull
* calculations (in the future, we might make this data structure
* more sophisticated based on the dynamic convex-hull literature).
*
* n > 0 always
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册