| |||||||
| |||||||
![]() | |||||||
Prototype | |||||||
template <class Tnum> interval<Tnum> hull(const interval<Tnum>& a, const interval<Tnum>& b) ; | |||||||
![]() | |||||||
Description | |||||||
Combines two intervals, returning a third which has the most extreme bounds of the two. The lower bound of the new interval will be the lower lower bound of the two input intervals. The upper bound will be the higher upper bound of the two input intervals. | |||||||
![]() | |||||||
Definition | |||||||
interval.cct | |||||||
![]() | |||||||
Preconditions | |||||||
| |||||||
![]() | |||||||
Complexity | |||||||
![]() | |||||||
Example | |||||||
In hull.cc:
dint A(1,2),B(3,4); cout << "hull(A,B)" << hull(A,B) << endl; cout << "hull(B,A)" << hull(B,A) << endl; cout << "hull(A,5)" << hull(A,Num(5)) << endl; cout << "hull(5,A)" << hull(Num(5),A) << endl; cout << "hull(5)" << hull(Num(5)) << endl; cout << "sym_hull(5)" << sym_hull(Num(5)) << endl; | |||||||
![]() | |||||||
Notes | |||||||
![]() | |||||||
See also | |||||||
Copyright ©
1998,1999 University of Notre Dame. All Rights Reserved.