1 /**
2 * \brief Remove overlaps function
3 *
4 * Authors:
5 * Tim Dwyer <tgdwyer@gmail.com>
6 *
7 * Copyright (C) 2005 Authors
8 *
9 * Released under GNU GPL. Read the file 'COPYING' for more information.
10 */
12 #include "constraint.h"
13 #include <cassert>
14 Constraint::Constraint(Variable *left, Variable *right, double gap)
15 : left(left),
16 right(right),
17 gap(gap),
18 timeStamp(0),
19 active(false),
20 visited(false)
21 {
22 left->out.push_back(this);
23 right->in.push_back(this);
24 }
25 std::ostream& operator <<(std::ostream &os, const Constraint &c)
26 {
27 os<<*c.left<<"+"<<c.gap<<"<="<<*c.right<<"("<<c.slack()<<"):lts="<<c.left->block->timeStamp<<",cts="<<c.timeStamp;
28 return os;
29 }