void rightObject(const IntervalObject &v, ResultType& result) { typename ResultType::iterator i = result.begin(); typename IntervalObject::const_iterator b = v.begin(), e=v.end(); while(b!=e) { *i = b->rightBound(); ++i; ++b; } }
void leftObject(const IntervalObject &v, ResultType& result) { typename ResultType::iterator i = result.begin(); typename IntervalObject::const_iterator b = v.begin(), e=v.end(); while(b!=e) { *i = b->leftBound(); ++i; ++b; } // std::transform(v.begin(), v.end(), result.begin(), leftBound<ScalarType> ); }
void mid(const IntervalObject& v, ResultType& result) { if(v.dimension()!=result.dimension()) throw std::range_error("Unequal dimensions in function capd::vectalg::mid"); typename ResultType::iterator i = result.begin(); typename IntervalObject::const_iterator b = v.begin(), e=v.end(); while(b!=e) { *i = mid(*b); ++i; ++b; } }