| |||||||
| |||||||
![]() | |||||||
Prototype | |||||||
template <class Tnum> bool proper_subset(const interval<Tnum>& x, const interval<Tnum>& y) ; | |||||||
![]() | |||||||
Description | |||||||
Tests if the bounds of an interval x are within
the bounds of another interval y , but are not equal to the
bounds (a proper subset).
| |||||||
![]() | |||||||
Definition | |||||||
interval.cct | |||||||
![]() | |||||||
Preconditions | |||||||
| |||||||
![]() | |||||||
Complexity | |||||||
![]() | |||||||
Example | |||||||
In subset.cc:
dint A(-2,2,true); dint B(-1,1); cout << "A in B? " << subset(A,B) <<endl; cout << "B in A? " << subset(B,A) <<endl; cout << "0 in A? " << subset(double(0),A) << endl; cout << "3 in A? " << subset(double(3),A) << endl; cout << "B Proper subset of A? " << proper_subset(B,A) << endl; cout << "B Proper subset of B? " << proper_subset(B,B) << endl; | |||||||
![]() | |||||||
Notes | |||||||
![]() | |||||||
See also | |||||||
Copyright ©
1998,1999 University of Notre Dame. All Rights Reserved.