Conversation
|
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
| ASSERT_EQ(elem, 0); | ||
|
|
||
| EXPECT_TRUE(int32.join(elem, 100)); | ||
| ASSERT_EQ(elem, 100); |
There was a problem hiding this comment.
How am I supposed to understand this conceptually? That is, why does joining go "up" the integer values rather than down?
There was a problem hiding this comment.
In the literature, a lattice is a set and a "less than or equal" relation that together satisfy various properties (e.g. reflexivity, transitivity, anti-symmetry, least upper bound, greatest lower bound). Since we call the lattice relation "less than or equal," it is natural to use <= as the default relation for the lattice of integers.
Use cases that require >= instead can use Inverted<UInt32>, introduced in a later PR. If neither ordering is appropriate, it might be a use case for Flat<uint32_t>, also introduced in a later PR.
There was a problem hiding this comment.
I see, thanks. I think comments that briefly mention this and related things would be useful, to not assume the reader is completely familiar with that literature.
Implement a generic lattice template for integral types ordered by `<`.
Implement a generic lattice template for integral types ordered by `<`.

Implement a generic lattice template for integral types ordered by
<.