X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=src%2Fgenealgorithms.h;h=6bc133fa96174478746cd828659a476e02ea52ec;hb=90e2c43b99205b0d7a300209011231cd8d11f7a0;hp=7f07d17f47476f617018e62494b7cb0ed9e738c6;hpb=e44303f027e957d05c9e9418fbd68171f3707599;p=germs.git diff --git a/src/genealgorithms.h b/src/genealgorithms.h index 7f07d17..6bc133f 100644 --- a/src/genealgorithms.h +++ b/src/genealgorithms.h @@ -34,7 +34,16 @@ struct Component{ int end; int sign; }; -typedef std::pair Interval; + +struct Interval{ + Interval(size_t f,size_t s,bool o = false):first(f),second(s),oriented(o){} + bool operator==(const Interval& i){ + return first == i.first && second == i.second && oriented == i.oriented; + } + size_t first; + size_t second; + bool oriented; +}; /** * Returns the length of the longest increasing sequence and the longest