mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2024-11-10 00:45:36 +00:00
Merge branch 'master' of github.com:aportelli/LatAnalyze3
This commit is contained in:
commit
dccdefa238
@ -25,7 +25,6 @@ using namespace Latan;
|
||||
|
||||
// constructor /////////////////////////////////////////////////////////////////
|
||||
Minimizer::Minimizer(const Index dim)
|
||||
: Solver(dim)
|
||||
{
|
||||
resize(dim);
|
||||
}
|
||||
@ -33,11 +32,21 @@ Minimizer::Minimizer(const Index dim)
|
||||
// access //////////////////////////////////////////////////////////////////////
|
||||
void Minimizer::resize(const Index dim)
|
||||
{
|
||||
const Index oldDim = getDim();
|
||||
|
||||
Solver::resize(dim);
|
||||
highLimit_.conservativeResize(dim);
|
||||
lowLimit_.conservativeResize(dim);
|
||||
hasHighLimit_.conservativeResize(dim);
|
||||
hasLowLimit_.conservativeResize(dim);
|
||||
if (dim > oldDim)
|
||||
{
|
||||
highLimit_.segment(oldDim, dim - oldDim).fill(0.);
|
||||
highLimit_.segment(oldDim, dim - oldDim).fill(0.);
|
||||
lowLimit_.segment(oldDim, dim - oldDim).fill(0.);
|
||||
hasHighLimit_.segment(oldDim, dim - oldDim).fill(false);
|
||||
hasLowLimit_.segment(oldDim, dim - oldDim).fill(false);
|
||||
}
|
||||
}
|
||||
|
||||
// limits //////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user