Skip to content

Commit

Permalink
[ctceval] corrected pessimism on [t]x[z]
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonRohou committed Jan 15, 2022
1 parent d9dce98 commit a134aec
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions src/core/contractors/dyn/codac_CtcEval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,15 @@ namespace codac
return;
}

t &= y.invert(z, t); // is this useful?
z &= y(t);
vector<Interval> v_t;
y.invert(z, v_t, t);
Interval t_ = Interval::EMPTY_SET;
for(const auto& ti : v_t)
{
z &= y(ti);
t_ |= ti;
}
t &= t_;

for(int i = 0 ; i < y.size() ; i++)
contract(t, z[i], y[i], w[i]);
Expand All @@ -374,8 +381,15 @@ namespace codac
return;
}

t &= y.invert(z, t);
z &= y(t);
vector<Interval> v_t;
y.invert(z, v_t, t);
Interval t_ = Interval::EMPTY_SET;
for(const auto& ti : v_t)
{
z &= y(ti);
t_ |= ti;
}
t &= t_;
}

void CtcEval::contract(Interval& t, IntervalVector& z, const TubeVector& y)
Expand All @@ -392,7 +406,14 @@ namespace codac
return;
}

t &= y.invert(z, t);
z &= y(t);
vector<Interval> v_t;
y.invert(z, v_t, t);
Interval t_ = Interval::EMPTY_SET;
for(const auto& ti : v_t)
{
z &= y(ti);
t_ |= ti;
}
t &= t_;
}
}

0 comments on commit a134aec

Please sign in to comment.