Skip to content

Expose box constraints as intervals

pipping requested to merge (removed):feature/box-constraints-as-intervals into master

As the changes to obstacletnnmgstep.hh illustrate, this allows us to replace code like

{
    if (coarseCorrection_[i][j] < defectConstraint.lower(j))
        coarseCorrection_[i][j] = defectConstraint.lower(j);
    if (coarseCorrection_[i][j] > defectConstraint.upper(j))
        coarseCorrection_[i][j] = defectConstraint.upper(j);
}

with

    coarseCorrection_[i][j]
        = defectConstraint[j].projectIn(coarseCorrection_[i][j]);

which is no less efficient yes far easier to read.

I have no removed any functionality. The set of features that a BoxConstraint currently comes with is quite odd, though. It ha an operator-= but no operator+= e.g.

Merge request reports