posgte [MTL Home] Programmers Guide
  Contents | Index |  Search 


Category:intervals,math Component type:function
Prototype
template <class Tnum>
bool posgte(const interval<Tnum>& x, const interval<Tnum>& y) ;
Description
Tests if there could be a number in x which is greater than or equal to a number in y. Returns true unless the upper bound of x is less than or equal to the lower bound of y.
Definition
interval.cct
Preconditions
Complexity
Example
In possibly.cc:
  A = Interval(1.1,3.3);
  B = Interval(2.2,4.4);
  cout << poslte(A,B) << endl;
  cout << posgt(A,B) << endl;
  cout << poslt(A,B) << endl;
    
  A = Interval(4.5,6.0);
  B = Interval(2.2,4.4);
  cout << poslte(A,B) << endl;
  cout << poslt(A,B) << endl;
      
  A = Interval(1.1,2.0);
  B = Interval(2.2,4.4);
  cout << posgt(A,B) << endl; 
  cout << posgte(A,B) << endl; 

Notes
See also

[MTL Home] Copyright © 1998,1999 University of Notre Dame. All Rights Reserved.