diff options
Diffstat (limited to 'src/removeoverlap/constraint.cpp')
| -rw-r--r-- | src/removeoverlap/constraint.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/removeoverlap/constraint.cpp b/src/removeoverlap/constraint.cpp new file mode 100644 index 000000000..78c5f03ad --- /dev/null +++ b/src/removeoverlap/constraint.cpp @@ -0,0 +1,29 @@ +/** + * \brief Remove overlaps function + * + * Authors: + * Tim Dwyer <tgdwyer@gmail.com> + * + * Copyright (C) 2005 Authors + * + * Released under GNU GPL. Read the file 'COPYING' for more information. + */ + +#include "constraint.h" + +Constraint::Constraint(Variable *left, Variable *right, double gap) +{ + this->left=left; + left->out.push_back(this); + this->right=right; + right->in.push_back(this); + this->gap=gap; + active=false; + visited=false; + timeStamp=0; +} +std::ostream& operator <<(std::ostream &os, const Constraint &c) +{ + os<<*c.left<<"+"<<c.gap<<"<="<<*c.right<<"("<<c.slack()<<")"; + return os; +} |
