Example #1
0
void mid(const IntervalObject &v, IntervalObject &result)
{
  if(v.dimension()!=result.dimension())
    throw std::range_error("Unequal dimensions in function chomp::vectalg::mid");
  typedef typename IntervalObject::ScalarType ScalarType;
  typename IntervalObject::iterator i = result.begin();
  typename IntervalObject::const_iterator b = v.begin(), e=v.end();

  while(b!=e)
  {
    *i = b->mid();
    ++i;
    ++b;
  }
}