| |||||||
| |||||||
![]() | |||||||
Prototype | |||||||
template <class Tnum> bool proper_subset(Tnum x, const interval<Tnum>& y) ; | |||||||
![]() | |||||||
Description | |||||||
Tests if the number x is within the bounds of the interval
y exclusivly. That is, x is within but not equal
to the bounds of y . Returns true if x is greater
than the lower bound of y and x is less than the upper
bound of y.
| |||||||
![]() | |||||||
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.