X-Git-Url: https://ruin.nu/git/?p=germs.git;a=blobdiff_plain;f=src%2Fgenealgorithms.h;h=6bc133fa96174478746cd828659a476e02ea52ec;hp=7f07d17f47476f617018e62494b7cb0ed9e738c6;hb=7e811915a713eeef44f03385a1fc1f74a5301c30;hpb=e81855989d0f0e124e0ec770b417bcb099959391 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