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"
14 Constraint::Constraint(Variable *left, Variable *right, double gap)
15 {
16 this->left=left;
17 left->out.push_back(this);
18 this->right=right;
19 right->in.push_back(this);
20 this->gap=gap;
21 active=false;
22 visited=false;
23 timeStamp=0;
24 }
25 std::ostream& operator <<(std::ostream &os, const Constraint &c)
26 {
27 os<<*c.left<<"+"<<c.gap<<"<="<<*c.right<<"("<<c.slack()<<")";
28 return os;
29 }