memoize timeouts
[satune.git] / src / Backend / orderpair.h
index 05c8ffa06034f9cfb02552aad3a116948fdd3105..7c1cabdcf962ed8c713fde165e72b28c8c0e204d 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * File:   orderpair.h
  * Author: hamed
  *
 #include "mymemory.h"
 #include "constraint.h"
 
-struct OrderPair{
+class OrderPair {
+public:
+       OrderPair(uint64_t first, uint64_t second, Edge constraint = E_NULL);
+       OrderPair();
+       virtual ~OrderPair();
+       virtual Edge getConstraint();
+       virtual bool getConstraintValue(CSolver *solver);
+       //for the cases that we swap first and second ... For total order is straight forward.
+       // but for partial order it has some complexity which should be hidden ... -HG
+       virtual Edge getNegatedConstraint();
+       virtual bool getNegatedConstraintValue(CSolver *solver);
        uint64_t first;
        uint64_t second;
+       CMEMALLOC;
+protected:
        Edge constraint;
-}; 
+};
 
-OrderPair* allocOrderPair(uint64_t first, uint64_t second, Edge constraint);
-void deleteOrderPair(OrderPair* pair);
-
-#endif /* ORDERPAIR_H */
+#endif/* ORDERPAIR_H */