| |||||||
| |||||||
![]() | |||||||
Prototype | |||||||
template <class Tnum> pair<interval<Tnum>,interval<Tnum> > bisect(const interval<Tnum> x) ; | |||||||
![]() | |||||||
Description | |||||||
Returns an STL pair<T,U> comprised of two exact intervals.
The intervals which comprise the pair are the original interval
x bisected along its midpoint.
In other words,
| |||||||
![]() | |||||||
Definition | |||||||
interval.cct | |||||||
![]() | |||||||
Preconditions | |||||||
| |||||||
![]() | |||||||
Complexity | |||||||
![]() | |||||||
Example | |||||||
In half.cc:
cout << "positive half :" << pos_half(A) << endl; cout << "negative half :" << neg_half(A) << endl; cout << "midpoint :" << midpoint(A) << endl; cout << "bisect (left) :" << bisect(A).first << endl; cout << "bisect (right):" << bisect(A).second << endl; cout << "diameter :" << diameter(A) << endl; cout << "abs :" << abs(A) << endl; | |||||||
![]() | |||||||
Notes | |||||||
![]() | |||||||
See also | |||||||
Copyright ©
1998,1999 University of Notre Dame. All Rights Reserved.