~vaifrax/inkscape/bugfix170049

« back to all changes in this revision

Viewing changes to src/removeoverlap/constraint.cpp

  • Committer: mental
  • Date: 2006-01-16 02:36:01 UTC
  • Revision ID: mental@users.sourceforge.net-20060116023601-wkr0h7edl5veyudq
moving trunk for module inkscape

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 */
 
11
 
 
12
#include "constraint.h"
 
13
 
 
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
}