[pooma-dev] Domain::operator<

Scott Haney scotth at proximation.com
Wed Jun 27 17:04:51 UTC 2001


Hi Allan,

I just compiled the little snippet of code

   Range<1> R(3, 4), R1(3, 5, 2);
   std::cout << (R < R1) << std::endl;
   std::cout << (R > R1) << std::endl;
   std::cout << (R == R1) << std::endl;

   Interval<1> I(3, 4), I1(3, 5);
   std::cout << (I < I1) << std::endl;
   std::cout << (I > I1) << std::endl;
   std::cout << (I == I1) << std::endl;

and got

1
0
0
1
0
0

as the output. What exactly were you doing in your analysis? On the 
broader issue as to why operator< exists at all: I can think of no other 
reason than wanting to put domains in a map. Is LessThanComparable 
required for map elements?

Scott

On Tuesday, June 26, 2001, at 01:26 AM, Allan Stokes wrote:

> This is not a complete ordering relation.
>
>   3 4 < 3 5 : false
>   3 5 < 3 4 : false
>   3 5 == 3 4 : false
>
> I also see that operator!=, operator>, operator<=, operator>= are all
> defined individually rather than have just operator== and operator< and
> everything else defined in terms of these.
>
> Is this meant to be an ordering relation?  Or this is this just a 
> typo?  Is
> there any situation where it matters how domains are ordered?
>



More information about the pooma-dev mailing list