Adaptagrams
cc_clustercontainmentconstraints.h
1 /*
2  * vim: ts=4 sw=4 et tw=0 wm=0
3  *
4  * libcola - A library providing force-directed network layout using the
5  * stress-majorization method subject to separation constraints.
6  *
7  * Copyright (C) 2010 Monash University
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  * See the file LICENSE.LGPL distributed with the library.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18  *
19  * Author(s): Michael Wybrow
20  *
21 */
22 
23 #ifndef COLA_CC_CLUSTERCONTAINMENTCONSTRAINTS_H
24 #define COLA_CC_CLUSTERCONTAINMENTCONSTRAINTS_H
25 
26 #include <vector>
27 #include "libcola/compound_constraints.h"
28 
29 namespace vpsc {
30 class Rectangle;
31 }
32 
33 namespace cola {
34 
35 class ClusterContainmentConstraints : public CompoundConstraint
36 {
37  public:
38  ClusterContainmentConstraints(Cluster *cluster, unsigned int priority,
39  std::vector<vpsc::Rectangle*>& boundingBoxes);
40  SubConstraintAlternatives getCurrSubConstraintAlternatives(
41  vpsc::Variables vs[]);
42 
43  void generateVariables(const vpsc::Dim dim, vpsc::Variables& vars);
46  std::vector<vpsc::Rectangle*>& bbs);
47  std::string toString(void) const;
48 };
49 
50 
51 } // namespace cola
52 #endif // COLA_CC_CLUSTERCONTAINMENTCONSTRAINTS
libvpsc: Variable Placement with Separation Constraints quadratic program solver library.
Definition: assertions.h:61
std::vector< Variable * > Variables
A vector of pointers to Variable objects.
Definition: constraint.h:38
std::vector< Constraint * > Constraints
A vector of pointers to Constraint objects.
Definition: constraint.h:125
virtual void generateSeparationConstraints(const vpsc::Dim dim, vpsc::Variables &var, vpsc::Constraints &cs, vpsc::Rectangles &bbs)=0
Implemented by the compound constraint to generate the low-level separation constraints in the given ...
libcola: Force-directed network layout subject to separation constraints library. ...
Definition: box.cpp:25
Dim
Indicates the x- or y-dimension.
Definition: rectangle.h:41
void generateVariables(CompoundConstraints &ccs, const vpsc::Dim dim, vpsc::Variables &vars)
Generate just all the variables for a collection of CompoundConstraints.
Definition: compound_constraints.cpp:1466