From 75493cd96255c87027c1de0cf721271f45146be9 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sat, 25 Jun 2011 23:57:27 -0700 Subject: Whitespace cleanup. (bzr r10366) --- src/libcola/cola.h | 129 +++++++++++++++++++++++++++++------------------------ 1 file changed, 71 insertions(+), 58 deletions(-) (limited to 'src') diff --git a/src/libcola/cola.h b/src/libcola/cola.h index eda64cb5f..136c527b6 100644 --- a/src/libcola/cola.h +++ b/src/libcola/cola.h @@ -32,12 +32,13 @@ namespace cola { void moveRectangles(double x, double y); Rectangle* getBoundingBox(); }; + // for a graph of n nodes, return connected components void connectedComponents( const vector &rs, const vector &es, const SimpleConstraints &scx, - const SimpleConstraints &scy, + const SimpleConstraints &scy, vector &components); // move the contents of each component so that the components do not @@ -48,11 +49,11 @@ namespace cola { // will be altered to prefer points u-b-v are in a linear arrangement // such that b is placed at u+t(v-u). struct LinearConstraint { - LinearConstraint(unsigned u, unsigned v, unsigned b, double w, + LinearConstraint(unsigned u, unsigned v, unsigned b, double w, double frac_ub, double frac_bv, - double* X, double* Y) + double* X, double* Y) : u(u),v(v),b(b),w(w),frac_ub(frac_ub),frac_bv(frac_bv), - tAtProjection(true) + tAtProjection(true) { assert(frac_ub<=1.0); assert(frac_bv<=1.0); @@ -88,7 +89,7 @@ namespace cola { dvv=t*t; dvb=-t; dbb=1; - //printf("New LC: t=%f\n",t); + //printf("New LC: t=%f\n",t); } unsigned u; unsigned v; @@ -108,61 +109,63 @@ namespace cola { double frac_bv; bool tAtProjection; }; + typedef vector LinearConstraints; - - class TestConvergence { - public: - double old_stress; - TestConvergence(const double& tolerance = 0.001, const unsigned maxiterations = 1000) - : tolerance(tolerance), - maxiterations(maxiterations) { reset(); } - virtual ~TestConvergence() {} - - virtual bool operator()(double new_stress, double* X, double* Y) { - //std::cout<<"iteration="<