mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-30 17:40:05 +08:00
if mode==2, the user is supposed to supply diag: do some basic check.
This commit is contained in:
parent
fa0183e7c7
commit
3bca4bba87
@ -113,6 +113,7 @@ HybridNonLinearSolver<FunctorType,Scalar>::solve(
|
|||||||
fvec.resize(n);
|
fvec.resize(n);
|
||||||
if (mode != 2)
|
if (mode != 2)
|
||||||
diag.resize(n);
|
diag.resize(n);
|
||||||
|
assert( (mode!=2 || diag.size()==n) || "When using mode==2, the caller must provide a valid 'diag'");
|
||||||
|
|
||||||
/* Local variables */
|
/* Local variables */
|
||||||
int i, j, l, iwa[1];
|
int i, j, l, iwa[1];
|
||||||
@ -433,6 +434,7 @@ HybridNonLinearSolver<FunctorType,Scalar>::solveNumericalDiff(
|
|||||||
fvec.resize(n);
|
fvec.resize(n);
|
||||||
if (mode != 2)
|
if (mode != 2)
|
||||||
diag.resize(n);
|
diag.resize(n);
|
||||||
|
assert( (mode!=2 || diag.size()==n) || "When using mode==2, the caller must provide a valid 'diag'");
|
||||||
|
|
||||||
/* Local variables */
|
/* Local variables */
|
||||||
int i, j, l, iwa[1];
|
int i, j, l, iwa[1];
|
||||||
|
@ -132,6 +132,7 @@ LevenbergMarquardt<FunctorType,Scalar>::minimize(
|
|||||||
fjac.resize(m, n);
|
fjac.resize(m, n);
|
||||||
if (mode != 2)
|
if (mode != 2)
|
||||||
diag.resize(n);
|
diag.resize(n);
|
||||||
|
assert( (mode!=2 || diag.size()==n) || "When using mode==2, the caller must provide a valid 'diag'");
|
||||||
qtf.resize(n);
|
qtf.resize(n);
|
||||||
|
|
||||||
/* Local variables */
|
/* Local variables */
|
||||||
@ -410,6 +411,7 @@ LevenbergMarquardt<FunctorType,Scalar>::minimizeNumericalDiff(
|
|||||||
fjac.resize(m, n);
|
fjac.resize(m, n);
|
||||||
if (mode != 2 )
|
if (mode != 2 )
|
||||||
diag.resize(n);
|
diag.resize(n);
|
||||||
|
assert( (mode!=2 || diag.size()==n) || "When using mode==2, the caller must provide a valid 'diag'");
|
||||||
qtf.resize(n);
|
qtf.resize(n);
|
||||||
|
|
||||||
/* Local variables */
|
/* Local variables */
|
||||||
@ -688,6 +690,7 @@ LevenbergMarquardt<FunctorType,Scalar>::minimizeOptimumStorage(
|
|||||||
fjac.resize(m, n);
|
fjac.resize(m, n);
|
||||||
if (mode != 2)
|
if (mode != 2)
|
||||||
diag.resize(n);
|
diag.resize(n);
|
||||||
|
assert( (mode!=2 || diag.size()==n) || "When using mode==2, the caller must provide a valid 'diag'");
|
||||||
qtf.resize(n);
|
qtf.resize(n);
|
||||||
|
|
||||||
/* Local variables */
|
/* Local variables */
|
||||||
|
Loading…
Reference in New Issue
Block a user