├── .github └── workflows │ └── build-and-test.yml ├── .gitignore ├── README.md ├── cola ├── .gitignore ├── AUTHORS ├── COPYING ├── ChangeLog ├── Doxyfile ├── INSTALL ├── LICENSE ├── Makefile-swig-java ├── Makefile-swig-python ├── Makefile.am ├── NEWS ├── README ├── __init__.py ├── adaptagrams.i ├── autogen.sh ├── buildPythonSWIG.sh ├── buildSWIGVersionForMac.sh ├── configure.ac ├── libavoid │ ├── Doxyfile │ ├── LICENSE.LGPL │ ├── Makefile.am │ ├── README │ ├── actioninfo.cpp │ ├── actioninfo.h │ ├── assertions.h │ ├── connectionpin.cpp │ ├── connectionpin.h │ ├── connector.cpp │ ├── connector.h │ ├── connend.cpp │ ├── connend.h │ ├── debug.h │ ├── debughandler.h │ ├── dllexport.h │ ├── doc │ │ ├── description.doc │ │ └── example.doc │ ├── geometry.cpp │ ├── geometry.h │ ├── geomtypes.cpp │ ├── geomtypes.h │ ├── graph.cpp │ ├── graph.h │ ├── hyperedge.cpp │ ├── hyperedge.h │ ├── hyperedgeimprover.cpp │ ├── hyperedgeimprover.h │ ├── hyperedgetree.cpp │ ├── hyperedgetree.h │ ├── junction.cpp │ ├── junction.h │ ├── libavoid.h │ ├── libavoid.pc.in │ ├── libavoid.sln │ ├── libavoid.vcxproj │ ├── makepath.cpp │ ├── makepath.h │ ├── mtst.cpp │ ├── mtst.h │ ├── obstacle.cpp │ ├── obstacle.h │ ├── orthogonal.cpp │ ├── orthogonal.h │ ├── router.cpp │ ├── router.h │ ├── scanline.cpp │ ├── scanline.h │ ├── shape.cpp │ ├── shape.h │ ├── tests │ │ ├── 2junctions.cpp │ │ ├── Makefile.am │ │ ├── buildOrthogonalChannelInfo1.cpp │ │ ├── checkpointNudging1.cpp │ │ ├── checkpointNudging2.cpp │ │ ├── checkpointNudging3.cpp │ │ ├── checkpoints01.cpp │ │ ├── checkpoints02.cpp │ │ ├── checkpoints03.cpp │ │ ├── complex.cpp │ │ ├── connectionpin01.cpp │ │ ├── connectionpin02.cpp │ │ ├── connectionpin03.cpp │ │ ├── connendmove.cpp │ │ ├── corneroverlap01.cpp │ │ ├── endlessLoop01.cpp │ │ ├── example.cpp │ │ ├── finalSegmentNudging1.cpp │ │ ├── finalSegmentNudging2.cpp │ │ ├── finalSegmentNudging3.cpp │ │ ├── forwardFlowingConnectors01.cpp │ │ ├── freeFloatingDirection01.cpp │ │ ├── hola01.cpp │ │ ├── hyperedge01.cpp │ │ ├── hyperedge02.cpp │ │ ├── hyperedgeLoop1.cpp │ │ ├── hyperedgeRerouting01.cpp │ │ ├── improveHyperedge01.cpp │ │ ├── improveHyperedge02.cpp │ │ ├── improveHyperedge03.cpp │ │ ├── improveHyperedge04.cpp │ │ ├── improveHyperedge05.cpp │ │ ├── improveHyperedge06.cpp │ │ ├── infinity.cpp │ │ ├── inline.cpp │ │ ├── inlineOverlap09.cpp │ │ ├── inlineOverlap10.cpp │ │ ├── inlineOverlap11.cpp │ │ ├── inlineShapes.cpp │ │ ├── inlineoverlap01.cpp │ │ ├── inlineoverlap02.cpp │ │ ├── inlineoverlap03.cpp │ │ ├── inlineoverlap04.cpp │ │ ├── inlineoverlap05.cpp │ │ ├── inlineoverlap06.cpp │ │ ├── inlineoverlap07.cpp │ │ ├── inlineoverlap08.cpp │ │ ├── junction01.cpp │ │ ├── junction02.cpp │ │ ├── junction03.cpp │ │ ├── junction04.cpp │ │ ├── latesetup.cpp │ │ ├── lineSegWrapperCrash1.cpp │ │ ├── lineSegWrapperCrash2.cpp │ │ ├── lineSegWrapperCrash3.cpp │ │ ├── lineSegWrapperCrash4.cpp │ │ ├── lineSegWrapperCrash5.cpp │ │ ├── lineSegWrapperCrash6.cpp │ │ ├── lineSegWrapperCrash7.cpp │ │ ├── lineSegWrapperCrash8.cpp │ │ ├── msctests │ │ │ ├── 2junctions.vcxproj │ │ │ ├── buildOrthogonalChannelInfo1.vcxproj │ │ │ ├── checkpointNudging1.vcxproj │ │ │ ├── checkpointNudging2.vcxproj │ │ │ ├── checkpoints01.vcxproj │ │ │ ├── connectionpin01.vcxproj │ │ │ ├── connectionpin02.vcxproj │ │ │ ├── connectionpin03.vcxproj │ │ │ ├── connendmove.vcxproj │ │ │ ├── corneroverlap01.vcxproj │ │ │ ├── example.vcxproj │ │ │ ├── finalSegmentNudging1.vcxproj │ │ │ ├── finalSegmentNudging2.vcxproj │ │ │ ├── finalSegmentNudging3.vcxproj │ │ │ ├── freeFloatingDirection01.vcxproj │ │ │ └── junction01.vcxproj │ │ ├── multiconnact.cpp │ │ ├── node1.cpp │ │ ├── nudgeCrossing01.cpp │ │ ├── nudgeintobug.cpp │ │ ├── nudgeold.cpp │ │ ├── nudgingSkipsCheckpoint01.cpp │ │ ├── nudgingSkipsCheckpoint02.cpp │ │ ├── orderassertion.cpp │ │ ├── orthordering01.cpp │ │ ├── orthordering02.cpp │ │ ├── output │ │ │ └── README.txt │ │ ├── overlappingRects.cpp │ │ ├── penaltyRerouting01.cpp │ │ ├── performance01.cpp │ │ ├── reallyslowrouting.cpp │ │ ├── removeJunctions01.cpp │ │ ├── restrictedNudging.cpp │ │ ├── slowrouting.cpp │ │ ├── tjunct.cpp │ │ ├── treeRootCrash01.cpp │ │ ├── treeRootCrash02.cpp │ │ ├── unsatisfiableRangeAssertion.cpp │ │ ├── validPaths01.cpp │ │ ├── validPaths02.cpp │ │ └── vertlineassertion.cpp │ ├── timer.cpp │ ├── timer.h │ ├── vertices.cpp │ ├── vertices.h │ ├── viscluster.cpp │ ├── viscluster.h │ ├── visibility.cpp │ ├── visibility.h │ ├── vpsc.cpp │ └── vpsc.h ├── libcola │ ├── Makefile.am │ ├── box.cpp │ ├── box.h │ ├── cc_clustercontainmentconstraints.cpp │ ├── cc_clustercontainmentconstraints.h │ ├── cc_nonoverlapconstraints.cpp │ ├── cc_nonoverlapconstraints.h │ ├── cluster.cpp │ ├── cluster.h │ ├── cola.cpp │ ├── cola.h │ ├── cola_log.h │ ├── colafd.cpp │ ├── commondefs.h │ ├── compound_constraints.cpp │ ├── compound_constraints.h │ ├── conjugate_gradient.cpp │ ├── conjugate_gradient.h │ ├── connected_components.cpp │ ├── connected_components.h │ ├── convex_hull.cpp │ ├── convex_hull.h │ ├── doc │ │ └── description.doc │ ├── exceptions.h │ ├── gradient_projection.cpp │ ├── gradient_projection.h │ ├── libcola.pc.in │ ├── output_svg.cpp │ ├── output_svg.h │ ├── pseudorandom.cpp │ ├── pseudorandom.h │ ├── shapepair.cpp │ ├── shapepair.h │ ├── shortest_paths.h │ ├── sparse_matrix.h │ ├── straightener.cpp │ ├── straightener.h │ ├── tests │ │ ├── FixedRelativeConstraint01.cpp │ │ ├── Makefile.am │ │ ├── StillOverlap01.cpp │ │ ├── StillOverlap02.cpp │ │ ├── boundary.cpp │ │ ├── connected_components.cpp │ │ ├── constrained.cpp │ │ ├── containment.cpp │ │ ├── containment2.cpp │ │ ├── convex_hull.cpp │ │ ├── cycle_detector.cpp │ │ ├── data │ │ │ ├── 1138_bus.txt │ │ │ └── uetzNetworkGSC-all.gml │ │ ├── gml_graph.cpp │ │ ├── graphlayouttest.h │ │ ├── initialOverlap.cpp │ │ ├── invalid.cpp │ │ ├── large_graph.cpp │ │ ├── makefeasible.cpp │ │ ├── makefeasible02.cpp │ │ ├── makemovie.sh │ │ ├── max_acyclic_subgraph.cpp │ │ ├── overlappingClusters01.cpp │ │ ├── overlappingClusters02.cpp │ │ ├── overlappingClusters04.cpp │ │ ├── page_bounds.cpp │ │ ├── planar.cpp │ │ ├── random_graph.cpp │ │ ├── rectangularClusters01.cpp │ │ ├── rectclustershapecontainment.cpp │ │ ├── resize.cpp │ │ ├── runtest.sh │ │ ├── scale_free.cpp │ │ ├── shortest_paths.cpp │ │ ├── small_graph.cpp │ │ ├── sparse_matrix.cpp │ │ ├── test_cg.cpp │ │ ├── topology.cpp │ │ ├── trees.cpp │ │ ├── unconstrained.cpp │ │ ├── unsatisfiable.cpp │ │ ├── view_cd_output.sh │ │ └── view_mas_output.sh │ └── unused.h ├── libdialect │ ├── Makefile.am │ ├── aca.cpp │ ├── aca.h │ ├── bendseqlookup.cpp │ ├── chains.cpp │ ├── chains.h │ ├── commontypes.h │ ├── constraints.cpp │ ├── constraints.h │ ├── doc │ │ └── description.doc │ ├── edges.cpp │ ├── expansion.cpp │ ├── expansion.h │ ├── faces.cpp │ ├── faces.h │ ├── gen_bend_seq_lookup.py │ ├── gen_qa_lookup.py │ ├── graphs.cpp │ ├── graphs.h │ ├── hola.cpp │ ├── hola.h │ ├── io.cpp │ ├── io.h │ ├── libdialect.h │ ├── libdialect.pc.in │ ├── logging.cpp │ ├── logging.h │ ├── nearalign.cpp │ ├── nearalign.h │ ├── nexes.cpp │ ├── nodeconfig.cpp │ ├── nodeconfig.h │ ├── nodes.cpp │ ├── opts.h │ ├── ortho.cpp │ ├── ortho.h │ ├── peeling.cpp │ ├── peeling.h │ ├── planarise.cpp │ ├── planarise.h │ ├── qalookup.cpp │ ├── quadaction.cpp │ ├── quadaction.h │ ├── routing.cpp │ ├── routing.h │ ├── sides.cpp │ ├── tests │ │ ├── Makefile.am │ │ ├── aca.cpp │ │ ├── assignments.cpp │ │ ├── bbox.cpp │ │ ├── bendcosts.cpp │ │ ├── chainconfig01.cpp │ │ ├── chainconfig02.cpp │ │ ├── chainconfig03.cpp │ │ ├── chainsandcycles.cpp │ │ ├── cmplayout01.cpp │ │ ├── collateralexpand01.cpp │ │ ├── collateralexpand02.cpp │ │ ├── conncomps.cpp │ │ ├── containedsegment01.cpp │ │ ├── destress.cpp │ │ ├── destress02.cpp │ │ ├── destress_aca.cpp │ │ ├── expand01.cpp │ │ ├── expand02.cpp │ │ ├── expand03.cpp │ │ ├── expand04.cpp │ │ ├── expand05.cpp │ │ ├── expand06.cpp │ │ ├── expand07.cpp │ │ ├── expand08.cpp │ │ ├── expand09.cpp │ │ ├── extrabdrygap.cpp │ │ ├── faceset01.cpp │ │ ├── faceset02.cpp │ │ ├── graphs │ │ │ ├── metro │ │ │ │ ├── london.gml │ │ │ │ ├── london.tglf │ │ │ │ ├── melb.gml │ │ │ │ ├── melb.tglf │ │ │ │ ├── sydney.gml │ │ │ │ ├── sydney.tglf │ │ │ │ ├── wien-kurz.gml │ │ │ │ └── wien-kurz.tglf │ │ │ ├── random │ │ │ │ ├── makeCorpus.py │ │ │ │ ├── randomGraph │ │ │ │ ├── v100e100.gml │ │ │ │ ├── v100e100.tglf │ │ │ │ ├── v100e110.gml │ │ │ │ ├── v100e110.tglf │ │ │ │ ├── v100e120.gml │ │ │ │ ├── v100e120.tglf │ │ │ │ ├── v100e130.gml │ │ │ │ ├── v100e130.tglf │ │ │ │ ├── v100e140.gml │ │ │ │ ├── v100e140.tglf │ │ │ │ ├── v100e150.gml │ │ │ │ ├── v100e150.tglf │ │ │ │ ├── v10e10.gml │ │ │ │ ├── v10e10.tglf │ │ │ │ ├── v10e11.gml │ │ │ │ ├── v10e11.tglf │ │ │ │ ├── v10e12.gml │ │ │ │ ├── v10e12.tglf │ │ │ │ ├── v10e13.gml │ │ │ │ ├── v10e13.tglf │ │ │ │ ├── v10e14.gml │ │ │ │ ├── v10e14.tglf │ │ │ │ ├── v10e15.gml │ │ │ │ ├── v10e15.tglf │ │ │ │ ├── v110e110.gml │ │ │ │ ├── v110e110.tglf │ │ │ │ ├── v110e121.gml │ │ │ │ ├── v110e121.tglf │ │ │ │ ├── v110e132.gml │ │ │ │ ├── v110e132.tglf │ │ │ │ ├── v110e143.gml │ │ │ │ ├── v110e143.tglf │ │ │ │ ├── v110e154.gml │ │ │ │ ├── v110e154.tglf │ │ │ │ ├── v110e165.gml │ │ │ │ ├── v110e165.tglf │ │ │ │ ├── v120e120.gml │ │ │ │ ├── v120e120.tglf │ │ │ │ ├── v120e132.gml │ │ │ │ ├── v120e132.tglf │ │ │ │ ├── v120e144.gml │ │ │ │ ├── v120e144.tglf │ │ │ │ ├── v120e156.gml │ │ │ │ ├── v120e156.tglf │ │ │ │ ├── v120e168.gml │ │ │ │ ├── v120e168.tglf │ │ │ │ ├── v120e180.gml │ │ │ │ ├── v120e180.tglf │ │ │ │ ├── v130e130.gml │ │ │ │ ├── v130e130.tglf │ │ │ │ ├── v130e143.gml │ │ │ │ ├── v130e143.tglf │ │ │ │ ├── v130e156.gml │ │ │ │ ├── v130e156.tglf │ │ │ │ ├── v130e169.gml │ │ │ │ ├── v130e169.tglf │ │ │ │ ├── v130e182.gml │ │ │ │ ├── v130e182.tglf │ │ │ │ ├── v130e195.gml │ │ │ │ ├── v130e195.tglf │ │ │ │ ├── v140e140.gml │ │ │ │ ├── v140e140.tglf │ │ │ │ ├── v140e154.gml │ │ │ │ ├── v140e154.tglf │ │ │ │ ├── v140e168.gml │ │ │ │ ├── v140e168.tglf │ │ │ │ ├── v140e182.gml │ │ │ │ ├── v140e182.tglf │ │ │ │ ├── v140e196.gml │ │ │ │ ├── v140e196.tglf │ │ │ │ ├── v140e210.gml │ │ │ │ ├── v140e210.tglf │ │ │ │ ├── v150e150.gml │ │ │ │ ├── v150e150.tglf │ │ │ │ ├── v150e165.gml │ │ │ │ ├── v150e165.tglf │ │ │ │ ├── v150e180.gml │ │ │ │ ├── v150e180.tglf │ │ │ │ ├── v150e195.gml │ │ │ │ ├── v150e195.tglf │ │ │ │ ├── v150e210.gml │ │ │ │ ├── v150e210.tglf │ │ │ │ ├── v150e225.gml │ │ │ │ ├── v150e225.tglf │ │ │ │ ├── v160e160.gml │ │ │ │ ├── v160e160.tglf │ │ │ │ ├── v160e176.gml │ │ │ │ ├── v160e176.tglf │ │ │ │ ├── v160e192.gml │ │ │ │ ├── v160e192.tglf │ │ │ │ ├── v160e208.gml │ │ │ │ ├── v160e208.tglf │ │ │ │ ├── v160e224.gml │ │ │ │ ├── v160e224.tglf │ │ │ │ ├── v160e240.gml │ │ │ │ ├── v160e240.tglf │ │ │ │ ├── v170e170.gml │ │ │ │ ├── v170e170.tglf │ │ │ │ ├── v170e187.gml │ │ │ │ ├── v170e187.tglf │ │ │ │ ├── v170e204.gml │ │ │ │ ├── v170e204.tglf │ │ │ │ ├── v170e221.gml │ │ │ │ ├── v170e221.tglf │ │ │ │ ├── v170e238.gml │ │ │ │ ├── v170e238.tglf │ │ │ │ ├── v170e255.gml │ │ │ │ ├── v170e255.tglf │ │ │ │ ├── v180e180.gml │ │ │ │ ├── v180e180.tglf │ │ │ │ ├── v180e198.gml │ │ │ │ ├── v180e198.tglf │ │ │ │ ├── v180e216.gml │ │ │ │ ├── v180e216.tglf │ │ │ │ ├── v180e234.gml │ │ │ │ ├── v180e234.tglf │ │ │ │ ├── v180e252.gml │ │ │ │ ├── v180e252.tglf │ │ │ │ ├── v180e270.gml │ │ │ │ ├── v180e270.tglf │ │ │ │ ├── v190e190.gml │ │ │ │ ├── v190e190.tglf │ │ │ │ ├── v190e209.gml │ │ │ │ ├── v190e209.tglf │ │ │ │ ├── v190e228.gml │ │ │ │ ├── v190e228.tglf │ │ │ │ ├── v190e247.gml │ │ │ │ ├── v190e247.tglf │ │ │ │ ├── v190e266.gml │ │ │ │ ├── v190e266.tglf │ │ │ │ ├── v190e285.gml │ │ │ │ ├── v190e285.tglf │ │ │ │ ├── v200e200.gml │ │ │ │ ├── v200e200.tglf │ │ │ │ ├── v200e220.gml │ │ │ │ ├── v200e220.tglf │ │ │ │ ├── v200e240.gml │ │ │ │ ├── v200e240.tglf │ │ │ │ ├── v200e260.gml │ │ │ │ ├── v200e260.tglf │ │ │ │ ├── v200e280.gml │ │ │ │ ├── v200e280.tglf │ │ │ │ ├── v200e300.gml │ │ │ │ ├── v200e300.tglf │ │ │ │ ├── v20e20.gml │ │ │ │ ├── v20e20.tglf │ │ │ │ ├── v20e22.gml │ │ │ │ ├── v20e22.tglf │ │ │ │ ├── v20e24.gml │ │ │ │ ├── v20e24.tglf │ │ │ │ ├── v20e26.gml │ │ │ │ ├── v20e26.tglf │ │ │ │ ├── v20e28.gml │ │ │ │ ├── v20e28.tglf │ │ │ │ ├── v20e30.gml │ │ │ │ ├── v20e30.tglf │ │ │ │ ├── v30e30.gml │ │ │ │ ├── v30e30.tglf │ │ │ │ ├── v30e33.gml │ │ │ │ ├── v30e33.tglf │ │ │ │ ├── v30e36.gml │ │ │ │ ├── v30e36.tglf │ │ │ │ ├── v30e39.gml │ │ │ │ ├── v30e39.tglf │ │ │ │ ├── v30e42.gml │ │ │ │ ├── v30e42.tglf │ │ │ │ ├── v30e45.gml │ │ │ │ ├── v30e45.tglf │ │ │ │ ├── v40e40.gml │ │ │ │ ├── v40e40.tglf │ │ │ │ ├── v40e42.gml │ │ │ │ ├── v40e42.tglf │ │ │ │ ├── v40e44.gml │ │ │ │ ├── v40e44.tglf │ │ │ │ ├── v40e48.gml │ │ │ │ ├── v40e48.tglf │ │ │ │ ├── v40e52.gml │ │ │ │ ├── v40e52.tglf │ │ │ │ ├── v40e56.gml │ │ │ │ ├── v40e56.tglf │ │ │ │ ├── v40e60.gml │ │ │ │ ├── v40e60.tglf │ │ │ │ ├── v50e50.gml │ │ │ │ ├── v50e50.tglf │ │ │ │ ├── v50e55.gml │ │ │ │ ├── v50e55.tglf │ │ │ │ ├── v50e60.gml │ │ │ │ ├── v50e60.tglf │ │ │ │ ├── v50e65.gml │ │ │ │ ├── v50e65.tglf │ │ │ │ ├── v50e70.gml │ │ │ │ ├── v50e70.tglf │ │ │ │ ├── v50e75.gml │ │ │ │ ├── v50e75.tglf │ │ │ │ ├── v60e60.gml │ │ │ │ ├── v60e60.tglf │ │ │ │ ├── v60e66.gml │ │ │ │ ├── v60e66.tglf │ │ │ │ ├── v60e72.gml │ │ │ │ ├── v60e72.tglf │ │ │ │ ├── v60e78.gml │ │ │ │ ├── v60e78.tglf │ │ │ │ ├── v60e84.gml │ │ │ │ ├── v60e84.tglf │ │ │ │ ├── v60e90.gml │ │ │ │ ├── v60e90.tglf │ │ │ │ ├── v70e105.gml │ │ │ │ ├── v70e105.tglf │ │ │ │ ├── v70e70.gml │ │ │ │ ├── v70e70.tglf │ │ │ │ ├── v70e77.gml │ │ │ │ ├── v70e77.tglf │ │ │ │ ├── v70e84.gml │ │ │ │ ├── v70e84.tglf │ │ │ │ ├── v70e91.gml │ │ │ │ ├── v70e91.tglf │ │ │ │ ├── v70e98.gml │ │ │ │ ├── v70e98.tglf │ │ │ │ ├── v80e104.gml │ │ │ │ ├── v80e104.tglf │ │ │ │ ├── v80e112.gml │ │ │ │ ├── v80e112.tglf │ │ │ │ ├── v80e120.gml │ │ │ │ ├── v80e120.tglf │ │ │ │ ├── v80e80.gml │ │ │ │ ├── v80e80.tglf │ │ │ │ ├── v80e88.gml │ │ │ │ ├── v80e88.tglf │ │ │ │ ├── v80e96.gml │ │ │ │ ├── v80e96.tglf │ │ │ │ ├── v90e108.gml │ │ │ │ ├── v90e108.tglf │ │ │ │ ├── v90e117.gml │ │ │ │ ├── v90e117.tglf │ │ │ │ ├── v90e126.gml │ │ │ │ ├── v90e126.tglf │ │ │ │ ├── v90e135.gml │ │ │ │ ├── v90e135.tglf │ │ │ │ ├── v90e90.gml │ │ │ │ ├── v90e90.tglf │ │ │ │ ├── v90e99.gml │ │ │ │ └── v90e99.tglf │ │ │ ├── sbgn │ │ │ │ ├── calvin.tglf │ │ │ │ ├── glyco.tglf │ │ │ │ ├── keratan.tglf │ │ │ │ └── urea1.tglf │ │ │ ├── special │ │ │ │ ├── 3cross4cross.gml │ │ │ │ ├── 3cross4cross.tglf │ │ │ │ ├── 3cross4cross_wTrees.gml │ │ │ │ ├── 3cross4cross_wTrees.tglf │ │ │ │ ├── Arpanet19728_input.tglf │ │ │ │ ├── Belnet2004.tglf │ │ │ │ ├── Cernet.tglf │ │ │ │ ├── Claranet.tglf │ │ │ │ ├── Garr201001.tglf │ │ │ │ ├── GtsSlovakia_input.tglf │ │ │ │ ├── Janetlense.tglf │ │ │ │ ├── SepMatrixIter.tglf │ │ │ │ ├── X_4.gml │ │ │ │ ├── X_4.tglf │ │ │ │ ├── Y_4.gml │ │ │ │ ├── Y_4.tglf │ │ │ │ ├── aspectratio01.gml │ │ │ │ ├── bend_costs.tglf │ │ │ │ ├── bundlecross.gml │ │ │ │ ├── bundlecross.tglf │ │ │ │ ├── bundlerouting.gml │ │ │ │ ├── bundlerouting.tglf │ │ │ │ ├── bundlerouting1.gml │ │ │ │ ├── bundlerouting1.tglf │ │ │ │ ├── bundlerouting2.gml │ │ │ │ ├── bundlerouting2.tglf │ │ │ │ ├── chainconfig01.gml │ │ │ │ ├── chainconfig01.tglf │ │ │ │ ├── chains_and_cycles.gml │ │ │ │ ├── chains_and_cycles.tglf │ │ │ │ ├── cmplayout01.tglf │ │ │ │ ├── cmplayout02.tglf │ │ │ │ ├── cmplayout03.tglf │ │ │ │ ├── cmplayout04.tglf │ │ │ │ ├── coincidentnodes.tglf │ │ │ │ ├── column8.gml │ │ │ │ ├── column8.tglf │ │ │ │ ├── components.gml │ │ │ │ ├── components.tglf │ │ │ │ ├── core_with_trees.gml │ │ │ │ ├── core_with_trees.tglf │ │ │ │ ├── expand02.gml │ │ │ │ ├── expand02.tglf │ │ │ │ ├── expand03.gml │ │ │ │ ├── expand03.tglf │ │ │ │ ├── expand04.gml │ │ │ │ ├── expand04.tglf │ │ │ │ ├── expand04b.gml │ │ │ │ ├── expand04b.tglf │ │ │ │ ├── expand05.gml │ │ │ │ ├── expand05.tglf │ │ │ │ ├── expand07.tglf │ │ │ │ ├── expand08.gml │ │ │ │ ├── expand08.tglf │ │ │ │ ├── expand09.gml │ │ │ │ ├── expand09.tglf │ │ │ │ ├── holasbgn01_layout.tglf │ │ │ │ ├── lone_node.gml │ │ │ │ ├── lone_node.tglf │ │ │ │ ├── nearalign01.gml │ │ │ │ ├── nearalign01.tglf │ │ │ │ ├── octogon.gml │ │ │ │ ├── octogon.tglf │ │ │ │ ├── readconstraints.tglf │ │ │ │ ├── rotate01.gml │ │ │ │ ├── rotate01.tglf │ │ │ │ ├── rotate02.gml │ │ │ │ ├── rotate02.tglf │ │ │ │ ├── routing01.gml │ │ │ │ ├── routing01.tglf │ │ │ │ ├── samesiderouting.gml │ │ │ │ ├── samesiderouting.tglf │ │ │ │ ├── straight_6.gml │ │ │ │ ├── straight_6.tglf │ │ │ │ ├── treeplacement2.gml │ │ │ │ ├── treeplacement2.tglf │ │ │ │ ├── treeplacement3.gml │ │ │ │ ├── treeplacement3.tglf │ │ │ │ ├── treeplacement4.gml │ │ │ │ ├── treeplacement4.tglf │ │ │ │ ├── treeplacement5.gml │ │ │ │ └── treeplacement5.tglf │ │ │ └── trees │ │ │ │ ├── tree01.gml │ │ │ │ ├── tree01.tglf │ │ │ │ ├── tree01m.gml │ │ │ │ ├── tree01m.tglf │ │ │ │ ├── tree02.gml │ │ │ │ ├── tree02.tglf │ │ │ │ ├── tree03.gml │ │ │ │ └── tree03.tglf │ │ ├── hola10.cpp │ │ ├── hola11.cpp │ │ ├── hola12.cpp │ │ ├── holaRand.cpp │ │ ├── hola_arpa.cpp │ │ ├── hola_belnet.cpp │ │ ├── hola_cernet.cpp │ │ ├── hola_claranet.cpp │ │ ├── hola_garr.cpp │ │ ├── hola_janetlense.cpp │ │ ├── hola_slovakia.cpp │ │ ├── hola_tree.cpp │ │ ├── holalonenode.cpp │ │ ├── holametro01.cpp │ │ ├── holasbgn01.cpp │ │ ├── holasbgn02.cpp │ │ ├── holasbgn03.cpp │ │ ├── holasbgn04.cpp │ │ ├── inserttrees01.cpp │ │ ├── leaflessroute01.cpp │ │ ├── leaflessroute02.cpp │ │ ├── lookupqas.cpp │ │ ├── nbroctal.cpp │ │ ├── nearalign01.cpp │ │ ├── nearalign02.cpp │ │ ├── nearby.cpp │ │ ├── negativesepco.cpp │ │ ├── negativezero.cpp │ │ ├── nodeconfig01.cpp │ │ ├── nudgeopt.cpp │ │ ├── output │ │ │ ├── README.txt │ │ │ └── svg │ │ │ │ └── README.txt │ │ ├── partition01.cpp │ │ ├── peel.cpp │ │ ├── planarise01.cpp │ │ ├── planarise02.cpp │ │ ├── projseq01.cpp │ │ ├── readconstraints.cpp │ │ ├── rotate01.cpp │ │ ├── rotate02.cpp │ │ ├── rotate03.cpp │ │ ├── rotate04.cpp │ │ ├── routing01.cpp │ │ ├── sep_matrix_iter.cpp │ │ ├── solidify.cpp │ │ ├── swig_tests │ │ │ ├── aca.py │ │ │ ├── chainconfig.py │ │ │ ├── destress_aca.py │ │ │ ├── expand.py │ │ │ ├── faceset.py │ │ │ ├── hola.py │ │ │ ├── leafless.py │ │ │ ├── nearalign.py │ │ │ ├── orthohub.py │ │ │ ├── output │ │ │ │ ├── README.txt │ │ │ │ └── svg │ │ │ │ │ └── README.txt │ │ │ ├── planarise.py │ │ │ ├── run_tests │ │ │ └── treeplacement.py │ │ ├── symmtree.cpp │ │ ├── tglf01.cpp │ │ ├── treeboxes01.cpp │ │ ├── treeplacement01.cpp │ │ ├── treeplacement02.cpp │ │ ├── treeplacement03.cpp │ │ ├── trees.cpp │ │ ├── trees2.cpp │ │ └── vpsc01.cpp │ ├── treeplacement.cpp │ ├── treeplacement.h │ ├── trees.cpp │ ├── trees.h │ └── util.h ├── libproject │ ├── Makefile.am │ ├── project.cpp │ ├── project.h │ ├── project_log.h │ ├── tests │ │ ├── Makefile.am │ │ ├── quadprogpp │ │ │ ├── LICENSE.txt │ │ │ ├── QuadProg++.cc │ │ │ ├── QuadProg++.h │ │ │ └── main.cc │ │ ├── random.cpp │ │ ├── simple.cpp │ │ ├── static.cpp │ │ ├── testutil.cpp │ │ ├── testutil.h │ │ ├── treeqp.cpp │ │ ├── treeqp.h │ │ └── treeqptest.cpp │ ├── util.cpp │ ├── util.h │ └── variable.h ├── libtopology │ ├── Makefile.am │ ├── cola_topology_addon.cpp │ ├── cola_topology_addon.h │ ├── compute_forces.cpp │ ├── doc │ │ └── description.doc │ ├── libtopology.pc.in │ ├── orthogonal_topology.cpp │ ├── orthogonal_topology.h │ ├── resize.cpp │ ├── tests │ │ ├── Makefile.am │ │ ├── beautify.cpp │ │ ├── bend2.m │ │ ├── kamada.cpp │ │ ├── nodedragging.cpp │ │ ├── nooverlap.cpp │ │ ├── orthogonalOpt.cpp │ │ ├── output │ │ │ └── README.txt │ │ ├── simple_bend.cpp │ │ ├── simple_bend.m │ │ ├── split.cpp │ │ ├── split.m │ │ ├── test.h │ │ └── triangle.cpp │ ├── topology_constraints.cpp │ ├── topology_constraints.h │ ├── topology_constraints_constructor.cpp │ ├── topology_graph.cpp │ ├── topology_graph.h │ ├── topology_log.h │ ├── topologyconstraint.nb │ └── util.h ├── libvpsc │ ├── COPYING │ ├── Makefile.am │ ├── assertions.h │ ├── block.cpp │ ├── block.h │ ├── blocks.cpp │ ├── blocks.h │ ├── cbuffer.cpp │ ├── cbuffer.h │ ├── constraint.cpp │ ├── constraint.h │ ├── doc │ │ └── description.doc │ ├── exceptions.h │ ├── libvpsc.pc.in │ ├── linesegment.h │ ├── pairing_heap.h │ ├── rectangle.cpp │ ├── rectangle.h │ ├── solve_VPSC.cpp │ ├── solve_VPSC.h │ ├── tests │ │ ├── Makefile.am │ │ ├── block.cpp │ │ ├── cycle.cpp │ │ ├── rectangleoverlap.cpp │ │ └── satisfy_inc.cpp │ ├── variable.cpp │ └── variable.h └── swig-python-setup.py └── experimental ├── RectangleOverlapSolver ├── .cRectangleOverlap.log.swp ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── logging.properties ├── manifest.mf ├── placement │ ├── ActiveSetPlacement.java │ ├── Block.java │ ├── Blocks.java │ ├── Constraint.java │ ├── ConstraintGenerator.java │ ├── Constraints.java │ ├── DebugFrame.java │ ├── DebugPanel.java │ ├── DrawingDimensions.java │ ├── FSA.java │ ├── GUITest.java │ ├── Graph.java │ ├── GraphParser.java │ ├── GraphParserTest.java │ ├── MaxPairingHeap.java │ ├── MaxPriorityQueue.java │ ├── MinPairingHeap.java │ ├── MosekPlacement.java │ ├── NativeFSA.java │ ├── PNode.java │ ├── PerformanceTest.java │ ├── Placement.java │ ├── PlacementTest.java │ ├── QPRectanglePlacement.java │ ├── RectangleDrawerFrame.java │ ├── RectangleDrawerPanel.java │ ├── RectanglePlacement.java │ ├── RectangleView.java │ ├── ScanListPriorityQueue.java │ ├── SimpleTest.java │ ├── SlowPriorityQueue.java │ ├── SolveVPSC.java │ ├── Variable.java │ ├── Variables.java │ └── prolog │ │ ├── Part 1.2 │ │ ├── Part 1.4 │ │ └── blocks.pl ├── placement_SolveVPSC.h ├── problem.blocks ├── prolog │ ├── Part 1.2 │ ├── Part 1.4 │ └── blocks.pl └── testdata │ ├── Test1.dot │ ├── graph1.dot │ ├── graph2.dot │ ├── graph3.dot │ └── graph4.dot ├── draw-bn ├── Asia.dne ├── Makefile ├── TODO ├── asia.cpp ├── constrained.svg ├── draw-bn.cpp ├── graphlayouttest.cpp ├── graphlayouttest.h ├── libcola └── libvpsc ├── neatogen ├── .constrained_majorization_diredges.c.swp ├── .quad_prog_vpsc.h.swo ├── Makefile ├── Makefile.am ├── Makefile.in ├── Makefile.old ├── adjust.c ├── adjust.h ├── bfs.c ├── bfs.h ├── circuit.c ├── closest.c ├── closest.h ├── compute_hierarchy.c ├── conjgrad.c ├── conjgrad.h ├── constrained_majorization.c ├── constrained_majorization_vsep.c ├── constraint.c ├── defs.h ├── digcola.h ├── dijkstra.c ├── dijkstra.h ├── edges.c ├── edges.h ├── embed_graph.c ├── embed_graph.h ├── find_ints.c ├── geometry.c ├── geometry.h ├── heap.c ├── heap.h ├── hedges.c ├── hedges.h ├── info.c ├── info.h ├── intersect.c ├── kkutils.c ├── kkutils.h ├── legal.c ├── lu.c ├── matinv.c ├── matrix_ops.c ├── matrix_ops.h ├── mem.h ├── memory.c ├── mosek_quad_solve.c ├── mosek_quad_solve.h ├── neato.h ├── neatoinit.c ├── neatoprocs.h ├── neatosplines.c ├── opt_arrangement.c ├── pca.c ├── pca.h ├── poly.c ├── poly.h ├── printvis.c ├── quad_prog_solve.c ├── quad_prog_solver.h ├── quad_prog_vpsc.c ├── quad_prog_vpsc.h ├── simple.h ├── site.c ├── site.h ├── smart_ini_x.c ├── solve.c ├── stress.c ├── stress.h ├── stuff.c ├── voronoi.c └── voronoi.h └── solve_VPSC ├── .Makefile.am.swp ├── .test_rectangleoverlap.cpp.swp ├── AUTHORS ├── ChangeLog ├── Makefile.am ├── Makefile.in ├── NEWS ├── README ├── aclocal.m4 ├── configure ├── configure.in ├── libvpsc ├── COPYING ├── Makefile.am ├── block.cpp ├── block.h ├── blocks.cpp ├── blocks.h ├── constraint.cpp ├── constraint.h ├── csolve_VPSC.cpp ├── csolve_VPSC.h ├── generate-constraints.cpp ├── generate-constraints.h ├── pairingheap │ ├── PairingHeap.cpp │ ├── PairingHeap.h │ └── dsexceptions.h ├── placement_SolveVPSC.cpp ├── placement_SolveVPSC.h ├── remove_rectangle_overlap-test.cpp ├── remove_rectangle_overlap.cpp ├── remove_rectangle_overlap.h ├── removeoverlap.cpp ├── removeoverlap.h ├── solve_VPSC.cpp ├── solve_VPSC.h ├── variable.cpp └── variable.h └── tests ├── Makefile.am ├── block.cpp ├── csolve_VPSC.c ├── rectangleoverlap.cpp └── satisfy_inc.cpp /.github/workflows/build-and-test.yml: -------------------------------------------------------------------------------- 1 | name: build-and-test 2 | on: 3 | workflow_dispatch: 4 | pull_request: 5 | jobs: 6 | build-and-test: 7 | runs-on: ubuntu-22.04 8 | steps: 9 | - name: Checkout 10 | uses: actions/checkout@v3 11 | - name: autogen 12 | working-directory: cola 13 | run: ./autogen.sh 14 | 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vscode 3 | .idea 4 | 5 | -------------------------------------------------------------------------------- /cola/.gitignore: -------------------------------------------------------------------------------- 1 | # http://www.gnu.org/software/automake 2 | 3 | Makefile.in 4 | 5 | # http://www.gnu.org/software/autoconf 6 | 7 | /autom4te.cache 8 | /aclocal.m4 9 | /compile 10 | /configure 11 | /depcomp 12 | /install-sh 13 | /missing 14 | 15 | # Compiled Object files 16 | *.slo 17 | *.lo 18 | *.o 19 | 20 | # Compiled Dynamic libraries 21 | *.so 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | 28 | .*.swp 29 | 30 | .DS_Store 31 | 32 | *.pyc 33 | 34 | Makefile 35 | 36 | /m4 37 | config.guess 38 | config.log 39 | config.status 40 | config.sub 41 | 42 | libtool 43 | ltmain.sh 44 | 45 | .deps/ 46 | 47 | libcola/config.h.in 48 | libcola/stamp-h1 49 | libcola/config.h 50 | libcola/config.h.in~ 51 | 52 | diff 53 | 54 | */tests/* 55 | !*/tests/*.cpp 56 | !*/tests/*.h 57 | !*/tests/Makefile.am 58 | !libdialect/tests/swig_tests 59 | libdialect/tests/swig_tests/output/* 60 | !libdialect/tests/swig_tests/output/README.txt 61 | !libdialect/tests/graphs 62 | 63 | 64 | lib*/.libs 65 | lib*/lib*.pc 66 | 67 | adaptagrams* 68 | !adaptagrams.i 69 | 70 | swig-worked 71 | test-driver 72 | 73 | -------------------------------------------------------------------------------- /cola/AUTHORS: -------------------------------------------------------------------------------- 1 | Tim Dwyer 2 | Michael Wybrow 3 | -------------------------------------------------------------------------------- /cola/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mjwybrow/adaptagrams/01b92d4fe69ca1de59e0c45021267c63ca580461/cola/ChangeLog -------------------------------------------------------------------------------- /cola/INSTALL: -------------------------------------------------------------------------------- 1 | from svn 2 | autoreconf 3 | ./configure 4 | make 5 | make install 6 | -------------------------------------------------------------------------------- /cola/Makefile-swig-python: -------------------------------------------------------------------------------- 1 | OSNAME:=$(shell uname -s | sed 's/_.*//') 2 | 3 | COMPILER = 4 | # to get a list of available compilers run 5 | # python swig-python-setup.py build_ext --help-compiler 6 | # no changes necessary on Linux and MacOS 7 | # change compiler to mingw32 on MinGW 8 | ifeq ($(OSNAME),MINGW32) 9 | COMPILER = --compiler=mingw32 10 | endif 11 | 12 | all: adaptagrams 13 | 14 | adaptagrams_wrap.cxx: clean adaptagrams.i 15 | swig -DNDEBUG -c++ -python adaptagrams.i 16 | 17 | adaptagrams: adaptagrams_wrap.cxx 18 | python swig-python-setup.py build_ext --inplace $(COMPILER) 19 | 20 | realclean: clean 21 | 22 | clean: mostlyclean 23 | rm -f _adaptagrams.so _adaptagrams.dylib _adaptagrams.dll 24 | rm -f adaptagrams.py 25 | 26 | mostlyclean: 27 | rm -f swig-worked 28 | rm -f adaptagrams_wrap.o adaptagrams_wrap.cxx 29 | rm -rf java/* 30 | 31 | .PHONY: all clean mostlyclean realclean 32 | 33 | -------------------------------------------------------------------------------- /cola/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | AUTOMAKE_OPTIONS = gnu 3 | SUBDIRS = libavoid libvpsc libcola libtopology libdialect 4 | 5 | -------------------------------------------------------------------------------- /cola/NEWS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mjwybrow/adaptagrams/01b92d4fe69ca1de59e0c45021267c63ca580461/cola/NEWS -------------------------------------------------------------------------------- /cola/README: -------------------------------------------------------------------------------- 1 | See README.md in the parent directory. 2 | -------------------------------------------------------------------------------- /cola/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mjwybrow/adaptagrams/01b92d4fe69ca1de59e0c45021267c63ca580461/cola/__init__.py -------------------------------------------------------------------------------- /cola/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -xe 2 | # 3 | # We use gnu automake to build. I've tried to make the contents of the 4 | # repository as platform agnostic as possible, so you'll need to call 5 | # autoreconf before configure. 6 | 7 | # Make m4 directory, otherwise autoreconf fails when it doesn't exist. 8 | mkdir -p m4 9 | 10 | autoreconf --install --verbose 11 | 12 | # The following sequence gives the manual steps if autoreconf isn't available. 13 | # 14 | #aclocal $ACLOCAL_FLAGS 15 | #glibtoolize 16 | #autoheader 17 | #autoconf 18 | #automake -a --add-missing 19 | 20 | 21 | # Configure. 22 | ./configure 23 | # Compile with CXXFLAGS="-std=c++11" when using g++ 14 or newer 24 | # ./configure CXXFLAGS="-std=c++11" 25 | 26 | # Instead, use this line if building for SWIG Java: 27 | # ./configure CPPFLAGS="-DUSE_ASSERT_EXCEPTIONS" 28 | # Compile with CXXFLAGS="-std=c++11" when using g++ 14 or newer 29 | # ./configure CXXFLAGS="-std=c++11" CPPFLAGS="-DUSE_ASSERT_EXCEPTIONS" 30 | 31 | # Instead, use this line if building for SWIG Python: 32 | # ./configure CXXFLAGS="-O3 -DNDEBUG -arch x86_64 -arch i386" LDFLAGS="-arch x86_64 -arch i386" 33 | 34 | # Instead, use this line for development and for debugging the tests: 35 | #./configure --disable-shared CXXFLAGS="-g -O0" 36 | 37 | make 38 | 39 | # The following builds examples and tests for each of the libraries. 40 | # Please look at these before sending me questions. 41 | make check 42 | 43 | -------------------------------------------------------------------------------- /cola/buildPythonSWIG.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | make -f Makefile-swig-python CPPFLAGS="-Wno-c++11-extensions" 4 | 5 | -------------------------------------------------------------------------------- /cola/buildSWIGVersionForMac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Builds a universeral 32/64-bet Mac Java version of the Adaptagrams libraries. 4 | 5 | FATFLAGS="-arch i386 -arch x86_64" 6 | 7 | mkdir -p m4 8 | autoreconf --install --verbose 9 | 10 | ./configure --disable-dependency-tracking CPPFLAGS="-DNDEBUG -O3 -DUSE_ASSERT_EXCEPTIONS" CXXFLAGS="$FATFLAGS" LDFLAGS="$FATFLAGS" 11 | 12 | make clean 13 | make -j8 14 | make -f Makefile-swig-java CXXFLAGS="$FATFLAGS" LDFLAGS="$FATFLAGS" 15 | make -f Makefile-swig-python 16 | 17 | -------------------------------------------------------------------------------- /cola/libavoid/README: -------------------------------------------------------------------------------- 1 | libavoid - Fast, Incremental, Object-avoiding Line Router 2 | 3 | Copyright (C) 2004-2009 Monash University 4 | 5 | A cross-platform C++ library providing fast, object-avoiding connector 6 | routing for use in interactive diagram editors. 7 | 8 | Documentation is available for libavoid through Doxygen. Install Doxygen and 9 | run it in the libavoid directory to generate documentation for the interface. 10 | 11 | libavoid is written and maintained by Michael Wybrow, a member of the 12 | Adaptive Diagrams and Documents lab at Monash University, Australia. 13 | 14 | libavoid is available under the terms of open-source GNU Lesser General Public 15 | License v2.1. Commercial licenses are also available, for more information 16 | please contact Michael Wybrow . 17 | 18 | The algorithms used for the connector routing are described in: 19 | 20 | M. Wybrow, K. Marriott, and P.J. Stuckey. Incremental connector routing. 21 | In Proceedings of 13th International Symposium on Graph Drawing, LNCS 3843, 22 | pages 446-457. Springer-Verlag, 2006. 23 | http://www.csse.monash.edu.au/~mwybrow/papers/wybrow-gd-2005.pdf 24 | 25 | M. Wybrow, K. Marriott, and P.J. Stuckey. Orthogonal connector routing. 26 | In Proceedings of 17th International Symposium on Graph Drawing (GD '09), 27 | To appear 2010. 28 | http://www.csse.monash.edu.au/~mwybrow/papers/wybrow-gd-2009.pdf 29 | 30 | libavoid is currently used in the prototype research diagram editor "Dunnart": 31 | http://www.csse.monash.edu.au/~mwybrow/dunnart/ 32 | As well as the professional open-source vector graphics editor "Inkscape": 33 | http://www.inkscape.org/ 34 | 35 | 36 | -------------------------------------------------------------------------------- /cola/libavoid/assertions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libavoid - Fast, Incremental, Object-avoiding Line Router 5 | * 6 | * Copyright (C) 2009 Monash University 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * See the file LICENSE.LGPL distributed with the library. 13 | * 14 | * Licensees holding a valid commercial license may use this file in 15 | * accordance with the commercial license agreement provided with the 16 | * library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Michael Wybrow 23 | */ 24 | 25 | #ifndef AVOID_ASSERTIONS_H 26 | #define AVOID_ASSERTIONS_H 27 | 28 | #define COLA_UNUSED(expr) do { (void)(expr); } while (0) 29 | 30 | #ifdef NDEBUG 31 | 32 | #define COLA_ASSERT(expr) static_cast(0) 33 | 34 | #else // Not NDEBUG 35 | 36 | #ifdef _MSC_VER 37 | // Compiling with Microsoft Visual C++ compiler 38 | 39 | // Prevent inclusion of min and max macros. 40 | #define NOMINMAX 41 | 42 | #include 43 | #define COLA_ASSERT(expr) ASSERT(expr) 44 | 45 | #elif defined(USE_ASSERT_EXCEPTIONS) 46 | 47 | #include "libvpsc/assertions.h" 48 | 49 | #else 50 | 51 | #include 52 | #define COLA_ASSERT(expr) assert(expr) 53 | 54 | #endif 55 | 56 | #endif 57 | 58 | 59 | #endif // AVOID_ASSERTIONS_H 60 | 61 | -------------------------------------------------------------------------------- /cola/libavoid/dllexport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libavoid - Fast, Incremental, Object-avoiding Line Router 5 | * 6 | * Copyright (C) 2012 Monash University 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * See the file LICENSE.LGPL distributed with the library. 13 | * 14 | * Licensees holding a valid commercial license may use this file in 15 | * accordance with the commercial license agreement provided with the 16 | * library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Michael Wybrow 23 | */ 24 | 25 | 26 | #ifndef AVOID_DLLEXPORT_H 27 | #define AVOID_DLLEXPORT_H 28 | 29 | #if defined(_MSC_VER) && !defined(LIBAVOID_NO_DLL) 30 | #ifdef LIBAVOID_EXPORTS 31 | #define AVOID_EXPORT __declspec(dllexport) 32 | #else 33 | #define AVOID_EXPORT __declspec(dllimport) 34 | #endif 35 | #else 36 | #define AVOID_EXPORT 37 | #endif 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /cola/libavoid/libavoid.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libavoid 7 | Description: A library for object-avoiding polyline and orthogonal connector routing for use in interactive diagram editors. 8 | URL: http://www.adaptagrams.org/ 9 | Version: @VERSION@ 10 | Requires: 11 | Libs: -L${libdir} -lavoid 12 | Cflags: -I${includedir}/libavoid -------------------------------------------------------------------------------- /cola/libavoid/makepath.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libavoid - Fast, Incremental, Object-avoiding Line Router 5 | * 6 | * Copyright (C) 2004-2008 Monash University 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * See the file LICENSE.LGPL distributed with the library. 13 | * 14 | * Licensees holding a valid commercial license may use this file in 15 | * accordance with the commercial license agreement provided with the 16 | * library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Michael Wybrow 23 | */ 24 | 25 | 26 | #ifndef AVOID_MAKEPATH_H 27 | #define AVOID_MAKEPATH_H 28 | 29 | 30 | namespace Avoid { 31 | 32 | class ConnRef; 33 | class AStarPathPrivate; 34 | class ANode; 35 | class VertInf; 36 | 37 | class AStarPath 38 | { 39 | public: 40 | AStarPath(); 41 | ~AStarPath(); 42 | void search(ConnRef *lineRef, VertInf *src, VertInf *tar, 43 | VertInf *start); 44 | private: 45 | AStarPathPrivate *m_private; 46 | }; 47 | 48 | } 49 | 50 | #endif 51 | 52 | 53 | -------------------------------------------------------------------------------- /cola/libavoid/orthogonal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libavoid - Fast, Incremental, Object-avoiding Line Router 5 | * 6 | * Copyright (C) 2009-2011 Monash University 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * See the file LICENSE.LGPL distributed with the library. 13 | * 14 | * Licensees holding a valid commercial license may use this file in 15 | * accordance with the commercial license agreement provided with the 16 | * library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Michael Wybrow 23 | */ 24 | 25 | 26 | #ifndef AVOID_ORTHOGONAL_H 27 | #define AVOID_ORTHOGONAL_H 28 | 29 | namespace Avoid { 30 | 31 | class Router; 32 | 33 | extern void generateStaticOrthogonalVisGraph(Router *router); 34 | extern void improveOrthogonalRoutes(Router *router); 35 | 36 | 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /cola/libavoid/tests/infinity.cpp: -------------------------------------------------------------------------------- 1 | #include "libavoid/libavoid.h" 2 | using namespace Avoid; 3 | int main(void) { 4 | Router *router = new Router(OrthogonalRouting); 5 | router->setRoutingPenalty(segmentPenalty, 50); 6 | router->setRoutingParameter(idealNudgingDistance, 10); 7 | Rectangle rect47(Point(51145, 50195), Point(51145+360, 50195+685)); 8 | new ShapeRef(router, rect47); 9 | Rectangle rect46(Point(51920, 49770), Point(51920+360, 49770+310)); 10 | new ShapeRef(router, rect46); 11 | Rectangle rect45(Point(51151, 49770), Point(51151+360, 49770+310)); 12 | new ShapeRef(router, rect45); 13 | ConnEnd srcPt53(Point(51150,49850), 4); 14 | ConnEnd dstPt53(Point(51500,50350), 8); 15 | new ConnRef(router, srcPt53, dstPt53); 16 | ConnEnd srcPt52(Point(52275,49850), 8); 17 | ConnEnd dstPt52(Point(51150,49925), 4); 18 | new ConnRef(router, srcPt52, dstPt52); 19 | ConnEnd srcPt6(Point(51150,50500), 4); 20 | ConnEnd dstPt6(Point(51925,50000), 4); 21 | new ConnRef(router, srcPt6, dstPt6, 6); 22 | router->processTransaction(); 23 | router->outputDiagram("output/infinity"); 24 | delete router; 25 | return 0; 26 | }; 27 | -------------------------------------------------------------------------------- /cola/libavoid/tests/inlineoverlap01.cpp: -------------------------------------------------------------------------------- 1 | #include "libavoid/libavoid.h" 2 | using namespace Avoid; 3 | int main(void) { 4 | Router *router = new Router(OrthogonalRouting); 5 | router->setRoutingPenalty(segmentPenalty); 6 | router->setRoutingPenalty(fixedSharedPathPenalty); 7 | router->setRoutingParameter(idealNudgingDistance, 20); 8 | Rectangle rect335855988(Point(51140, 50190), Point(51510, 50885)); 9 | new ShapeRef(router, rect335855988, 335855988); 10 | Rectangle rect548374163(Point(51915, 50415), Point(52285, 50885)); 11 | new ShapeRef(router, rect548374163, 548374163); 12 | Rectangle rect942733064(Point(51771, 50790), Point(51829, 50885)); 13 | new ShapeRef(router, rect942733064, 942733064); 14 | ConnEnd srcPt100850179(Point(51925, 50800), 4); 15 | ConnEnd dstPt100850179(Point(51500, 50650), 8); 16 | new ConnRef(router, srcPt100850179, dstPt100850179, 100850179); 17 | ConnEnd srcPt240732432(Point(51925, 50650), 4); 18 | ConnEnd dstPt240732432(Point(51800, 50800), 1); 19 | new ConnRef(router, srcPt240732432, dstPt240732432, 240732432); 20 | router->processTransaction(); 21 | router->outputDiagram("output/inlineoverlap01"); 22 | bool overlap = router->existsOrthogonalTouchingPaths(); 23 | delete router; 24 | return (overlap) ? 1 : 0; 25 | }; 26 | -------------------------------------------------------------------------------- /cola/libavoid/tests/output/README.txt: -------------------------------------------------------------------------------- 1 | This directory is used to for output debug svg files from the testcases. 2 | -------------------------------------------------------------------------------- /cola/libavoid/visibility.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libavoid - Fast, Incremental, Object-avoiding Line Router 5 | * 6 | * Copyright (C) 2004-2008 Monash University 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * See the file LICENSE.LGPL distributed with the library. 13 | * 14 | * Licensees holding a valid commercial license may use this file in 15 | * accordance with the commercial license agreement provided with the 16 | * library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Michael Wybrow 23 | */ 24 | 25 | 26 | #ifndef AVOID_VISIBILITY_H 27 | #define AVOID_VISIBILITY_H 28 | 29 | 30 | namespace Avoid { 31 | 32 | class VertInf; 33 | 34 | extern void vertexVisibility(VertInf *point, VertInf *partner, bool knownNew, 35 | const bool gen_contains = false); 36 | 37 | } 38 | 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /cola/libcola/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST=libcola.pc.in 2 | 3 | lib_LTLIBRARIES = libcola.la 4 | libcola_la_CPPFLAGS = -I$(top_srcdir) $(CAIROMM_CFLAGS) -I$(includedir)/libcola -fPIC 5 | 6 | # Depends on libvpsc 7 | libcola_la_LIBADD = $(top_builddir)/libvpsc/libvpsc.la $(CAIROMM_LIBS) 8 | 9 | libcola_la_SOURCES = cola.h\ 10 | cola.cpp\ 11 | colafd.cpp\ 12 | conjugate_gradient.cpp\ 13 | conjugate_gradient.h\ 14 | exceptions.h\ 15 | gradient_projection.cpp\ 16 | gradient_projection.h\ 17 | shortest_paths.h\ 18 | straightener.h\ 19 | straightener.cpp\ 20 | connected_components.cpp\ 21 | convex_hull.h\ 22 | convex_hull.cpp\ 23 | cluster.cpp\ 24 | compound_constraints.h\ 25 | compound_constraints.cpp\ 26 | pseudorandom.h \ 27 | pseudorandom.cpp \ 28 | output_svg.cpp\ 29 | output_svg.h \ 30 | unused.h \ 31 | cc_clustercontainmentconstraints.cpp \ 32 | cc_clustercontainmentconstraints.h \ 33 | cc_nonoverlapconstraints.cpp \ 34 | cc_nonoverlapconstraints.h \ 35 | box.cpp \ 36 | box.h \ 37 | shapepair.cpp \ 38 | shapepainr.h 39 | 40 | libcolaincludedir = $(includedir)/libcola 41 | libcolainclude_HEADERS = cola.h\ 42 | cluster.h\ 43 | commondefs.h\ 44 | compound_constraints.h\ 45 | pseudorandom.h \ 46 | exceptions.h\ 47 | gradient_projection.h\ 48 | sparse_matrix.h\ 49 | straightener.h \ 50 | output_svg.h \ 51 | unused.h \ 52 | cc_clustercontainmentconstraints.h \ 53 | cc_nonoverlapconstraints.h \ 54 | box.h \ 55 | shapepair.h 56 | 57 | pkgconfigdir = $(libdir)/pkgconfig 58 | pkgconfig_DATA = libcola.pc 59 | 60 | SUBDIRS = . tests 61 | -------------------------------------------------------------------------------- /cola/libcola/conjugate_gradient.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) 2006-2008 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 | */ 20 | 21 | #ifndef _CONJUGATE_GRADIENT_H 22 | #define _CONJUGATE_GRADIENT_H 23 | 24 | #include 25 | 26 | double 27 | inner(std::valarray const &x, 28 | std::valarray const &y); 29 | 30 | void 31 | conjugate_gradient(std::valarray const &A, 32 | std::valarray &x, 33 | std::valarray const &b, 34 | unsigned const n, double const tol, 35 | unsigned const max_iterations); 36 | #endif // _CONJUGATE_GRADIENT_H 37 | -------------------------------------------------------------------------------- /cola/libcola/convex_hull.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) 2006-2008 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 | */ 20 | 21 | #ifndef CONVEX_HULL_H 22 | #define CONVEX_HULL_H 23 | #include 24 | #include 25 | 26 | namespace hull { 27 | void convex(const unsigned n, const double* X, const double* Y, std::vector & hull); 28 | void convex(const std::valarray & X, const std::valarray & Y, std::vector & hull); 29 | } 30 | 31 | #endif // CONVEX_HULL_H 32 | -------------------------------------------------------------------------------- /cola/libcola/exceptions.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) 2008 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 | */ 20 | 21 | #ifndef SEEN_LIBCOLA_EXCEPTIONS_H 22 | #define SEEN_LIBCOLA_EXCEPTIONS_H 23 | #include 24 | #include 25 | 26 | namespace cola { 27 | class CompoundConstraint; 28 | 29 | struct InvalidConstraint { 30 | InvalidConstraint(CompoundConstraint *c):constraint(c) {} 31 | CompoundConstraint *constraint; 32 | }; 33 | 34 | 35 | class InvalidVariableIndexException 36 | { 37 | public: 38 | InvalidVariableIndexException(CompoundConstraint *c, unsigned i) 39 | : constraint(c), 40 | index(i) 41 | { } 42 | std::string what() const throw() 43 | { 44 | std::stringstream s; 45 | s << "Invalid variable index: " << index; 46 | return s.str(); 47 | } 48 | CompoundConstraint *constraint; 49 | unsigned index; 50 | }; 51 | 52 | 53 | } // namespace cola 54 | #endif //SEEN_LIBCOLA_EXCEPTIONS_H 55 | -------------------------------------------------------------------------------- /cola/libcola/libcola.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libcola 7 | Description: A library for constraint graph layout 8 | URL: http://www.adaptagrams.org/ 9 | Version: @VERSION@ 10 | Libs: -L${libdir} -lcola 11 | Cflags: -I${includedir}/libcola 12 | -------------------------------------------------------------------------------- /cola/libcola/pseudorandom.cpp: -------------------------------------------------------------------------------- 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) 2015 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): Tim Dwyer 20 | */ 21 | 22 | #include "libcola/pseudorandom.h" 23 | 24 | namespace cola { 25 | 26 | PseudoRandom::PseudoRandom(double s) 27 | : a(214013), 28 | c(2531011), 29 | m(2147483648), 30 | range(32767), 31 | seed(s) 32 | { 33 | } 34 | 35 | double PseudoRandom::getNext(void) 36 | { 37 | seed = (seed * a + c) % m; 38 | return (seed >> 16) / range; 39 | } 40 | 41 | double PseudoRandom::getNextBetween(double min, double max) 42 | { 43 | return min + getNext() * (max - min); 44 | } 45 | 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /cola/libcola/pseudorandom.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) 2015 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): Tim Dwyer 20 | */ 21 | 22 | #ifndef COLA_PSEUDORANDOM_H 23 | #define COLA_PSEUDORANDOM_H 24 | 25 | namespace cola { 26 | 27 | class PseudoRandom 28 | { 29 | public: 30 | PseudoRandom(double s = 1); 31 | 32 | double getNext(void); 33 | double getNextBetween(double min, double max); 34 | 35 | private: 36 | int a; 37 | int c; 38 | unsigned int m; 39 | double range; 40 | unsigned int seed; 41 | }; 42 | 43 | } 44 | #endif // COLA_PSEUDORANDOM_H 45 | -------------------------------------------------------------------------------- /cola/libcola/shapepair.cpp: -------------------------------------------------------------------------------- 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) 2014 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 | #include "libvpsc/assertions.h" 24 | 25 | #include "libcola/shapepair.h" 26 | 27 | namespace cola { 28 | 29 | ShapePair::ShapePair(unsigned ind1, unsigned ind2) 30 | { 31 | COLA_ASSERT(ind1 != ind2); 32 | // Assign the lesser value to m_index1. 33 | m_index1 = (ind1 < ind2) ? ind1 : ind2; 34 | // Assign the greater value to m_index2. 35 | m_index2 = (ind1 > ind2) ? ind1 : ind2; 36 | } 37 | 38 | bool ShapePair::operator<(const ShapePair& rhs) const 39 | { 40 | if (m_index1 != rhs.m_index1) 41 | { 42 | return m_index1 < rhs.m_index1; 43 | } 44 | return m_index2 < rhs.m_index2; 45 | } 46 | 47 | }; 48 | -------------------------------------------------------------------------------- /cola/libcola/shapepair.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) 2014 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_SHAPEPAIR_H 24 | #define COLA_SHAPEPAIR_H 25 | 26 | namespace cola { 27 | 28 | // A pair of indexes. 29 | // Specified unordered but stored ordered so it can be compared and 30 | // stored in a set. 31 | // 32 | class ShapePair 33 | { 34 | public: 35 | ShapePair(unsigned ind1, unsigned ind2); 36 | bool operator<(const ShapePair& rhs) const; 37 | unsigned short index1(void) const {return m_index1;} 38 | unsigned short index2(void) const {return m_index2;} 39 | 40 | private: 41 | unsigned short m_index1; 42 | unsigned short m_index2; 43 | }; 44 | 45 | 46 | } 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /cola/libcola/tests/FixedRelativeConstraint01.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "libcola/cola.h" 3 | using namespace cola; 4 | int main(void) { 5 | CompoundConstraints ccs; 6 | std::vector es; 7 | double defaultEdgeLength=40; 8 | std::vector rs; 9 | vpsc::Rectangle *rect = nullptr; 10 | std::vector fixedShapes; 11 | 12 | double textW = 100; 13 | double textH = 10; 14 | double circleW = 5; 15 | double circleH = 5; 16 | 17 | rect = new vpsc::Rectangle(303-circleW, 303+circleW, 300-circleH, 300+circleH); 18 | rs.push_back(rect); 19 | fixedShapes.push_back(rs.size() - 1); 20 | 21 | rect = new vpsc::Rectangle(310-circleW, 310+circleW, 302-circleH, 302+circleH); 22 | rs.push_back(rect); 23 | fixedShapes.push_back(rs.size() - 1); 24 | 25 | rect = new vpsc::Rectangle(313-circleW, 313+circleW, 297-circleH, 297+circleH); 26 | rs.push_back(rect); 27 | fixedShapes.push_back(rs.size() - 1); 28 | 29 | rect = new vpsc::Rectangle(300-textW, 300+textW, 300-textH, 300+textH); 30 | rs.push_back(rect); 31 | 32 | rect = new vpsc::Rectangle(310-textW, 310+textW, 305-textH, 305+textH); 33 | rs.push_back(rect); 34 | 35 | rect = new vpsc::Rectangle(317-textW, 317+textW, 295-textH, 295+textH); 36 | rs.push_back(rect); 37 | 38 | ConstrainedFDLayout alg(rs, es, defaultEdgeLength); 39 | alg.setAvoidNodeOverlaps(true); 40 | 41 | ccs.push_back(new FixedRelativeConstraint(rs, fixedShapes, true)); 42 | alg.setConstraints(ccs); 43 | 44 | alg.makeFeasible(); 45 | 46 | // Can be used to output a "libcola-debug.svg" file: 47 | //alg.outputInstanceToSVG(); 48 | alg.freeAssociatedObjects(); 49 | 50 | return 0; 51 | }; 52 | -------------------------------------------------------------------------------- /cola/libcola/tests/makemovie.sh: -------------------------------------------------------------------------------- 1 | pattern=containment 2 | width=200 3 | height=260 4 | rm ${pattern}*.pdf 5 | for file in ${pattern}*.svg 6 | do 7 | echo adding $file... 8 | inkscape -w$width -h$height -A ${file%.svg}.pdf $file 2> /dev/null 9 | done 10 | convert -page ${width}x${height} -delay 15 ${pattern}*.pdf $pattern.gif 11 | -------------------------------------------------------------------------------- /cola/libcola/tests/runtest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | r=0 3 | while [ $r == 0 ] 4 | do 5 | ./beautify 6 | r=$? 7 | echo result=$r 8 | done 9 | -------------------------------------------------------------------------------- /cola/libcola/tests/view_cd_output.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | if [ $# -lt 1 ] ; then 4 | echo "Need case letter (eg: A) or ALL for all cases (CLEAN to delete)" 5 | exit 6 | else 7 | CASE=$1 8 | shift 9 | fi 10 | 11 | cd /home/kierans/libcola3/libcola/tests 12 | 13 | if [ $CASE == 'a' -o $CASE == 'A' ] ; then 14 | inkview cycle_detector_case_a.svg 15 | fi 16 | 17 | if [ $CASE == 'b' -o $CASE == 'B' ] ; then 18 | inkview cycle_detector_case_b.svg 19 | fi 20 | 21 | if [ $CASE == 'c' -o $CASE == 'C' ] ; then 22 | inkview cycle_detector_case_c.svg 23 | fi 24 | 25 | if [ $CASE == 'd' -o $CASE == 'D' ] ; then 26 | inkview cycle_detector_case_d.svg 27 | fi 28 | 29 | if [ $CASE == 'e' -o $CASE == 'E' ] ; then 30 | inkview cycle_detector_case_e.svg 31 | fi 32 | 33 | if [ $CASE == 'f' -o $CASE == 'F' ] ; then 34 | inkview cycle_detector_case_f.svg 35 | fi 36 | 37 | if [ $CASE == 'all' -o $CASE == 'ALL' ] ; then 38 | inkview cycle_detector_case_a.svg cycle_detector_case_b.svg cycle_detector_case_c.svg cycle_detector_case_d.svg cycle_detector_case_e.svg cycle_detector_case_f.svg 39 | fi 40 | 41 | if [ $CASE == 'clean' ] ; then 42 | rm cycle_detector_case* -fv 43 | fi 44 | -------------------------------------------------------------------------------- /cola/libcola/tests/view_mas_output.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | if [ $# -lt 1 ] ; then 4 | echo "Need case letter (eg: A) or ALL for all cases (CLEAN to delete)" 5 | exit 6 | else 7 | CASE=$1 8 | shift 9 | fi 10 | 11 | cd /home/kierans/libcola3/libcola/tests 12 | 13 | if [ $CASE == 'a' -o $CASE == 'A' ] ; then 14 | inkview mas_case_a.svg 15 | fi 16 | 17 | if [ $CASE == 'b' -o $CASE == 'B' ] ; then 18 | inkview mas_case_b.svg 19 | fi 20 | 21 | if [ $CASE == 'c' -o $CASE == 'C' ] ; then 22 | inkview mas_case_c.svg 23 | fi 24 | 25 | if [ $CASE == 'd' -o $CASE == 'D' ] ; then 26 | inkview mas_case_d.svg 27 | fi 28 | 29 | if [ $CASE == 'e' -o $CASE == 'E' ] ; then 30 | inkview mas_case_e.svg 31 | fi 32 | 33 | if [ $CASE == 'f' -o $CASE == 'F' ] ; then 34 | inkview mas_case_f.svg 35 | fi 36 | 37 | if [ $CASE == 'all' -o $CASE == 'ALL' ] ; then 38 | inkview mas_case_a.svg mas_case_b.svg mas_case_c.svg mas_case_d.svg mas_case_e.svg mas_case_f.svg 39 | fi 40 | 41 | if [ $CASE == 'clean' ] ; then 42 | rm mas_case* -fv 43 | fi 44 | -------------------------------------------------------------------------------- /cola/libcola/unused.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) 2006-2008 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 | */ 20 | 21 | #ifndef _UNUSED_H 22 | #define _UNUSED_H 23 | 24 | #define COLA_UNUSED(expr) do { (void)(expr); } while (0) 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /cola/libdialect/libdialect.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | //! @file libdialect.h 26 | //! @brief Standard libdialect include file which includes all libdialect 27 | //! functionality. 28 | 29 | /** 30 | * @namespace dialect 31 | * @brief libdialect: A library for computing human-like orthogonal network 32 | * (DiAlEcT) layouts. 33 | * 34 | */ 35 | #ifndef DIALECT_LIBDIALECT_H 36 | #define DIALECT_LIBDIALECT_H 37 | 38 | #include "libdialect/aca.h" 39 | #include "libdialect/hola.h" 40 | 41 | #endif 42 | 43 | 44 | -------------------------------------------------------------------------------- /cola/libdialect/libdialect.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libdialect 7 | Description: DiAlEcT = Distribute + Arrange + Emend + Transform 8 | URL: http://www.adaptagrams.org/ 9 | Version: @VERSION@ 10 | Libs: -L${libdir} -ldialect 11 | Cflags: -I${includedir}/libdialect 12 | 13 | -------------------------------------------------------------------------------- /cola/libdialect/tests/destress02.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include 26 | 27 | #include "libdialect/commontypes.h" 28 | #include "libdialect/io.h" 29 | #include "libdialect/graphs.h" 30 | 31 | using namespace dialect; 32 | 33 | using std::cout; 34 | using std::endl; 35 | 36 | int main(void) { 37 | 38 | ColaOptions opts; 39 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "special/coincidentnodes.tglf"); 40 | graph->destress(opts); 41 | writeStringToFile(graph->writeTglf(), "output/" "destress02_" "destressed.tglf"); 42 | 43 | return 0; 44 | } 45 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/makeCorpus.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | 5 | def genNM(): 6 | nm = [] 7 | for n in range(10, 210, 10): 8 | M = int(round(1.5*n)) 9 | d = int(round((M-n)/5)) 10 | nm.extend([(n,m) for m in range(n, M+1, d)]) 11 | return nm 12 | 13 | if __name__ == '__main__': 14 | nm = genNM() 15 | for n, m in nm: 16 | os.system('./randomGraph -a %d %d' % (n, m)) 17 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v10e10.tglf: -------------------------------------------------------------------------------- 1 | 0 35.000 225.000 30.000 30.000 2 | 1 179.000 250.000 30.000 30.000 3 | 2 56.000 54.000 30.000 30.000 4 | 3 233.000 158.000 30.000 30.000 5 | 4 129.000 271.000 30.000 30.000 6 | 5 217.000 146.000 30.000 30.000 7 | 6 277.000 98.000 30.000 30.000 8 | 7 211.000 164.000 30.000 30.000 9 | 8 168.000 196.000 30.000 30.000 10 | 9 267.000 88.000 30.000 30.000 11 | # 12 | 1 0 13 | 4 1 14 | 7 1 15 | 2 1 16 | 3 1 17 | 8 3 18 | 6 8 19 | 5 2 20 | 9 8 21 | 6 2 22 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v10e11.tglf: -------------------------------------------------------------------------------- 1 | 0 224.000 208.000 30.000 30.000 2 | 1 58.000 136.000 30.000 30.000 3 | 2 276.000 10.000 30.000 30.000 4 | 3 29.000 251.000 30.000 30.000 5 | 4 204.000 158.000 30.000 30.000 6 | 5 55.000 24.000 30.000 30.000 7 | 6 12.000 47.000 30.000 30.000 8 | 7 67.000 66.000 30.000 30.000 9 | 8 52.000 210.000 30.000 30.000 10 | 9 185.000 276.000 30.000 30.000 11 | # 12 | 5 1 13 | 9 1 14 | 4 8 15 | 3 2 16 | 7 1 17 | 1 0 18 | 8 5 19 | 4 1 20 | 2 1 21 | 6 0 22 | 7 6 23 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v10e12.tglf: -------------------------------------------------------------------------------- 1 | 0 123.000 213.000 30.000 30.000 2 | 1 215.000 253.000 30.000 30.000 3 | 2 156.000 199.000 30.000 30.000 4 | 3 208.000 208.000 30.000 30.000 5 | 4 164.000 34.000 30.000 30.000 6 | 5 232.000 80.000 30.000 30.000 7 | 6 16.000 232.000 30.000 30.000 8 | 7 269.000 58.000 30.000 30.000 9 | 8 60.000 15.000 30.000 30.000 10 | 9 183.000 42.000 30.000 30.000 11 | # 12 | 1 0 13 | 8 7 14 | 7 0 15 | 2 1 16 | 9 2 17 | 0 2 18 | 4 1 19 | 9 7 20 | 5 2 21 | 3 0 22 | 5 3 23 | 6 2 24 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v10e13.tglf: -------------------------------------------------------------------------------- 1 | 0 281.000 156.000 30.000 30.000 2 | 1 126.000 14.000 30.000 30.000 3 | 2 1.000 239.000 30.000 30.000 4 | 3 129.000 152.000 30.000 30.000 5 | 4 28.000 211.000 30.000 30.000 6 | 5 130.000 3.000 30.000 30.000 7 | 6 41.000 58.000 30.000 30.000 8 | 7 6.000 207.000 30.000 30.000 9 | 8 99.000 182.000 30.000 30.000 10 | 9 88.000 13.000 30.000 30.000 11 | # 12 | 5 0 13 | 2 6 14 | 7 6 15 | 6 4 16 | 9 1 17 | 4 2 18 | 1 8 19 | 6 0 20 | 3 9 21 | 1 0 22 | 2 0 23 | 3 1 24 | 8 6 25 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v10e14.tglf: -------------------------------------------------------------------------------- 1 | 0 235.000 8.000 30.000 30.000 2 | 1 130.000 248.000 30.000 30.000 3 | 2 258.000 164.000 30.000 30.000 4 | 3 265.000 84.000 30.000 30.000 5 | 4 102.000 27.000 30.000 30.000 6 | 5 43.000 17.000 30.000 30.000 7 | 6 0.000 102.000 30.000 30.000 8 | 7 31.000 259.000 30.000 30.000 9 | 8 86.000 214.000 30.000 30.000 10 | 9 276.000 199.000 30.000 30.000 11 | # 12 | 3 6 13 | 9 3 14 | 1 0 15 | 1 9 16 | 5 0 17 | 6 5 18 | 8 1 19 | 2 1 20 | 1 3 21 | 7 4 22 | 2 7 23 | 4 3 24 | 3 0 25 | 4 1 26 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v10e15.tglf: -------------------------------------------------------------------------------- 1 | 0 209.000 153.000 30.000 30.000 2 | 1 52.000 272.000 30.000 30.000 3 | 2 251.000 224.000 30.000 30.000 4 | 3 119.000 86.000 30.000 30.000 5 | 4 63.000 26.000 30.000 30.000 6 | 5 131.000 168.000 30.000 30.000 7 | 6 254.000 215.000 30.000 30.000 8 | 7 235.000 186.000 30.000 30.000 9 | 8 127.000 100.000 30.000 30.000 10 | 9 201.000 130.000 30.000 30.000 11 | # 12 | 6 3 13 | 9 7 14 | 5 4 15 | 2 1 16 | 4 2 17 | 3 0 18 | 8 0 19 | 6 2 20 | 4 1 21 | 0 5 22 | 2 3 23 | 4 0 24 | 2 0 25 | 7 2 26 | 1 0 27 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v20e20.tglf: -------------------------------------------------------------------------------- 1 | 0 376.000 244.000 30.000 30.000 2 | 1 218.000 131.000 30.000 30.000 3 | 2 142.000 317.000 30.000 30.000 4 | 3 237.000 352.000 30.000 30.000 5 | 4 92.000 400.000 30.000 30.000 6 | 5 197.000 166.000 30.000 30.000 7 | 6 368.000 19.000 30.000 30.000 8 | 7 104.000 1.000 30.000 30.000 9 | 8 210.000 306.000 30.000 30.000 10 | 9 318.000 212.000 30.000 30.000 11 | 10 183.000 127.000 30.000 30.000 12 | 11 215.000 356.000 30.000 30.000 13 | 12 211.000 309.000 30.000 30.000 14 | 13 32.000 108.000 30.000 30.000 15 | 14 267.000 298.000 30.000 30.000 16 | 15 355.000 374.000 30.000 30.000 17 | 16 399.000 217.000 30.000 30.000 18 | 17 144.000 326.000 30.000 30.000 19 | 18 394.000 15.000 30.000 30.000 20 | 19 368.000 42.000 30.000 30.000 21 | # 22 | 13 2 23 | 14 10 24 | 2 1 25 | 10 1 26 | 7 2 27 | 18 2 28 | 4 2 29 | 15 7 30 | 9 3 31 | 16 8 32 | 1 0 33 | 12 7 34 | 8 18 35 | 11 2 36 | 5 4 37 | 19 3 38 | 8 5 39 | 6 0 40 | 3 0 41 | 17 15 42 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v20e22.tglf: -------------------------------------------------------------------------------- 1 | 0 338.000 26.000 30.000 30.000 2 | 1 148.000 282.000 30.000 30.000 3 | 2 113.000 362.000 30.000 30.000 4 | 3 0.000 108.000 30.000 30.000 5 | 4 341.000 376.000 30.000 30.000 6 | 5 282.000 32.000 30.000 30.000 7 | 6 74.000 294.000 30.000 30.000 8 | 7 92.000 154.000 30.000 30.000 9 | 8 307.000 256.000 30.000 30.000 10 | 9 324.000 173.000 30.000 30.000 11 | 10 373.000 314.000 30.000 30.000 12 | 11 224.000 23.000 30.000 30.000 13 | 12 398.000 50.000 30.000 30.000 14 | 13 78.000 105.000 30.000 30.000 15 | 14 64.000 1.000 30.000 30.000 16 | 15 41.000 12.000 30.000 30.000 17 | 16 238.000 283.000 30.000 30.000 18 | 17 40.000 4.000 30.000 30.000 19 | 18 315.000 86.000 30.000 30.000 20 | 19 228.000 395.000 30.000 30.000 21 | # 22 | 14 4 23 | 5 3 24 | 10 16 25 | 15 1 26 | 16 5 27 | 1 0 28 | 3 1 29 | 19 2 30 | 15 17 31 | 2 0 32 | 11 9 33 | 4 3 34 | 9 2 35 | 17 13 36 | 12 8 37 | 10 1 38 | 18 12 39 | 8 1 40 | 13 12 41 | 6 4 42 | 2 12 43 | 7 2 44 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v20e24.tglf: -------------------------------------------------------------------------------- 1 | 0 54.000 86.000 30.000 30.000 2 | 1 205.000 147.000 30.000 30.000 3 | 2 64.000 230.000 30.000 30.000 4 | 3 53.000 314.000 30.000 30.000 5 | 4 189.000 350.000 30.000 30.000 6 | 5 320.000 67.000 30.000 30.000 7 | 6 289.000 211.000 30.000 30.000 8 | 7 75.000 64.000 30.000 30.000 9 | 8 235.000 185.000 30.000 30.000 10 | 9 222.000 223.000 30.000 30.000 11 | 10 147.000 346.000 30.000 30.000 12 | 11 360.000 52.000 30.000 30.000 13 | 12 250.000 48.000 30.000 30.000 14 | 13 134.000 342.000 30.000 30.000 15 | 14 13.000 222.000 30.000 30.000 16 | 15 270.000 283.000 30.000 30.000 17 | 16 27.000 78.000 30.000 30.000 18 | 17 3.000 395.000 30.000 30.000 19 | 18 19.000 29.000 30.000 30.000 20 | 19 99.000 391.000 30.000 30.000 21 | # 22 | 15 6 23 | 19 11 24 | 3 1 25 | 12 1 26 | 11 6 27 | 2 17 28 | 7 3 29 | 5 3 30 | 17 14 31 | 2 1 32 | 13 10 33 | 16 9 34 | 8 7 35 | 9 5 36 | 18 11 37 | 15 0 38 | 4 0 39 | 10 9 40 | 11 4 41 | 1 8 42 | 14 11 43 | 6 1 44 | 1 0 45 | 13 15 46 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v20e26.tglf: -------------------------------------------------------------------------------- 1 | 0 89.000 162.000 30.000 30.000 2 | 1 248.000 173.000 30.000 30.000 3 | 2 274.000 127.000 30.000 30.000 4 | 3 62.000 299.000 30.000 30.000 5 | 4 243.000 156.000 30.000 30.000 6 | 5 10.000 123.000 30.000 30.000 7 | 6 374.000 158.000 30.000 30.000 8 | 7 159.000 83.000 30.000 30.000 9 | 8 347.000 203.000 30.000 30.000 10 | 9 359.000 133.000 30.000 30.000 11 | 10 9.000 214.000 30.000 30.000 12 | 11 192.000 86.000 30.000 30.000 13 | 12 299.000 370.000 30.000 30.000 14 | 13 168.000 285.000 30.000 30.000 15 | 14 290.000 119.000 30.000 30.000 16 | 15 73.000 393.000 30.000 30.000 17 | 16 209.000 166.000 30.000 30.000 18 | 17 78.000 343.000 30.000 30.000 19 | 18 224.000 122.000 30.000 30.000 20 | 19 294.000 357.000 30.000 30.000 21 | # 22 | 4 3 23 | 7 1 24 | 17 14 25 | 9 1 26 | 15 17 27 | 10 3 28 | 5 4 29 | 12 9 30 | 17 2 31 | 13 17 32 | 7 4 33 | 3 0 34 | 16 9 35 | 14 11 36 | 2 1 37 | 11 6 38 | 8 5 39 | 8 2 40 | 1 0 41 | 15 11 42 | 13 11 43 | 18 2 44 | 19 14 45 | 8 13 46 | 6 2 47 | 19 4 48 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v20e28.tglf: -------------------------------------------------------------------------------- 1 | 0 163.000 129.000 30.000 30.000 2 | 1 102.000 396.000 30.000 30.000 3 | 2 309.000 101.000 30.000 30.000 4 | 3 134.000 309.000 30.000 30.000 5 | 4 56.000 78.000 30.000 30.000 6 | 5 19.000 204.000 30.000 30.000 7 | 6 111.000 353.000 30.000 30.000 8 | 7 282.000 258.000 30.000 30.000 9 | 8 140.000 222.000 30.000 30.000 10 | 9 366.000 193.000 30.000 30.000 11 | 10 219.000 387.000 30.000 30.000 12 | 11 122.000 391.000 30.000 30.000 13 | 12 242.000 120.000 30.000 30.000 14 | 13 401.000 50.000 30.000 30.000 15 | 14 285.000 236.000 30.000 30.000 16 | 15 397.000 379.000 30.000 30.000 17 | 16 221.000 106.000 30.000 30.000 18 | 17 34.000 22.000 30.000 30.000 19 | 18 186.000 263.000 30.000 30.000 20 | 19 330.000 210.000 30.000 30.000 21 | # 22 | 18 12 23 | 11 7 24 | 12 10 25 | 10 8 26 | 6 2 27 | 19 5 28 | 17 4 29 | 13 11 30 | 15 12 31 | 1 0 32 | 7 15 33 | 1 11 34 | 3 0 35 | 2 1 36 | 14 10 37 | 8 1 38 | 9 2 39 | 5 17 40 | 18 13 41 | 17 11 42 | 5 3 43 | 11 19 44 | 7 3 45 | 4 2 46 | 11 12 47 | 16 2 48 | 0 5 49 | 13 8 50 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v20e30.tglf: -------------------------------------------------------------------------------- 1 | 0 33.000 337.000 30.000 30.000 2 | 1 23.000 93.000 30.000 30.000 3 | 2 310.000 71.000 30.000 30.000 4 | 3 76.000 296.000 30.000 30.000 5 | 4 142.000 91.000 30.000 30.000 6 | 5 85.000 127.000 30.000 30.000 7 | 6 256.000 103.000 30.000 30.000 8 | 7 390.000 353.000 30.000 30.000 9 | 8 265.000 37.000 30.000 30.000 10 | 9 351.000 259.000 30.000 30.000 11 | 10 103.000 157.000 30.000 30.000 12 | 11 336.000 39.000 30.000 30.000 13 | 12 135.000 294.000 30.000 30.000 14 | 13 189.000 222.000 30.000 30.000 15 | 14 311.000 153.000 30.000 30.000 16 | 15 208.000 105.000 30.000 30.000 17 | 16 250.000 228.000 30.000 30.000 18 | 17 88.000 105.000 30.000 30.000 19 | 18 179.000 45.000 30.000 30.000 20 | 19 216.000 199.000 30.000 30.000 21 | # 22 | 13 0 23 | 19 3 24 | 14 9 25 | 4 0 26 | 7 1 27 | 2 19 28 | 5 3 29 | 10 1 30 | 17 13 31 | 4 10 32 | 12 8 33 | 8 5 34 | 12 10 35 | 16 13 36 | 5 4 37 | 19 8 38 | 18 11 39 | 14 18 40 | 11 4 41 | 15 2 42 | 17 1 43 | 3 2 44 | 19 14 45 | 1 0 46 | 3 8 47 | 9 7 48 | 2 0 49 | 14 1 50 | 6 5 51 | 4 16 52 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v30e30.tglf: -------------------------------------------------------------------------------- 1 | 0 37.000 133.000 30.000 30.000 2 | 1 251.000 313.000 30.000 30.000 3 | 2 378.000 319.000 30.000 30.000 4 | 3 222.000 487.000 30.000 30.000 5 | 4 81.000 60.000 30.000 30.000 6 | 5 486.000 231.000 30.000 30.000 7 | 6 393.000 482.000 30.000 30.000 8 | 7 407.000 250.000 30.000 30.000 9 | 8 462.000 468.000 30.000 30.000 10 | 9 456.000 431.000 30.000 30.000 11 | 10 212.000 310.000 30.000 30.000 12 | 11 114.000 422.000 30.000 30.000 13 | 12 125.000 404.000 30.000 30.000 14 | 13 337.000 246.000 30.000 30.000 15 | 14 132.000 66.000 30.000 30.000 16 | 15 40.000 433.000 30.000 30.000 17 | 16 163.000 150.000 30.000 30.000 18 | 17 282.000 9.000 30.000 30.000 19 | 18 92.000 32.000 30.000 30.000 20 | 19 262.000 90.000 30.000 30.000 21 | 20 407.000 392.000 30.000 30.000 22 | 21 448.000 381.000 30.000 30.000 23 | 22 354.000 49.000 30.000 30.000 24 | 23 240.000 22.000 30.000 30.000 25 | 24 187.000 76.000 30.000 30.000 26 | 25 147.000 338.000 30.000 30.000 27 | 26 445.000 293.000 30.000 30.000 28 | 27 240.000 90.000 30.000 30.000 29 | 28 401.000 25.000 30.000 30.000 30 | 29 200.000 258.000 30.000 30.000 31 | # 32 | 6 2 33 | 16 9 34 | 7 4 35 | 20 12 36 | 4 2 37 | 12 0 38 | 12 8 39 | 3 2 40 | 11 1 41 | 15 3 42 | 25 23 43 | 9 8 44 | 19 4 45 | 28 7 46 | 26 8 47 | 18 17 48 | 21 10 49 | 14 9 50 | 17 15 51 | 27 5 52 | 8 3 53 | 2 0 54 | 23 4 55 | 24 8 56 | 13 5 57 | 1 0 58 | 22 11 59 | 5 3 60 | 29 18 61 | 10 6 62 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v30e33.tglf: -------------------------------------------------------------------------------- 1 | 0 44.000 258.000 30.000 30.000 2 | 1 64.000 18.000 30.000 30.000 3 | 2 192.000 141.000 30.000 30.000 4 | 3 177.000 470.000 30.000 30.000 5 | 4 385.000 95.000 30.000 30.000 6 | 5 73.000 140.000 30.000 30.000 7 | 6 73.000 430.000 30.000 30.000 8 | 7 263.000 234.000 30.000 30.000 9 | 8 82.000 415.000 30.000 30.000 10 | 9 425.000 428.000 30.000 30.000 11 | 10 117.000 48.000 30.000 30.000 12 | 11 203.000 120.000 30.000 30.000 13 | 12 301.000 95.000 30.000 30.000 14 | 13 107.000 124.000 30.000 30.000 15 | 14 8.000 475.000 30.000 30.000 16 | 15 434.000 190.000 30.000 30.000 17 | 16 161.000 39.000 30.000 30.000 18 | 17 335.000 342.000 30.000 30.000 19 | 18 276.000 290.000 30.000 30.000 20 | 19 181.000 406.000 30.000 30.000 21 | 20 440.000 471.000 30.000 30.000 22 | 21 267.000 71.000 30.000 30.000 23 | 22 162.000 317.000 30.000 30.000 24 | 23 331.000 112.000 30.000 30.000 25 | 24 208.000 419.000 30.000 30.000 26 | 25 85.000 228.000 30.000 30.000 27 | 26 81.000 223.000 30.000 30.000 28 | 27 187.000 400.000 30.000 30.000 29 | 28 482.000 412.000 30.000 30.000 30 | 29 370.000 48.000 30.000 30.000 31 | # 32 | 1 0 33 | 6 3 34 | 29 18 35 | 2 0 36 | 16 9 37 | 22 14 38 | 3 0 39 | 27 0 40 | 28 13 41 | 22 3 42 | 4 1 43 | 8 3 44 | 11 5 45 | 28 15 46 | 2 21 47 | 26 13 48 | 24 7 49 | 14 5 50 | 13 1 51 | 19 5 52 | 7 1 53 | 15 5 54 | 12 1 55 | 5 4 56 | 18 13 57 | 23 7 58 | 20 13 59 | 25 14 60 | 9 8 61 | 13 9 62 | 17 14 63 | 21 19 64 | 10 1 65 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v30e36.tglf: -------------------------------------------------------------------------------- 1 | 0 153.000 114.000 30.000 30.000 2 | 1 261.000 43.000 30.000 30.000 3 | 2 54.000 472.000 30.000 30.000 4 | 3 167.000 188.000 30.000 30.000 5 | 4 176.000 385.000 30.000 30.000 6 | 5 348.000 184.000 30.000 30.000 7 | 6 379.000 253.000 30.000 30.000 8 | 7 131.000 393.000 30.000 30.000 9 | 8 419.000 167.000 30.000 30.000 10 | 9 360.000 280.000 30.000 30.000 11 | 10 80.000 181.000 30.000 30.000 12 | 11 466.000 440.000 30.000 30.000 13 | 12 393.000 218.000 30.000 30.000 14 | 13 417.000 232.000 30.000 30.000 15 | 14 173.000 491.000 30.000 30.000 16 | 15 395.000 405.000 30.000 30.000 17 | 16 129.000 68.000 30.000 30.000 18 | 17 451.000 322.000 30.000 30.000 19 | 18 130.000 94.000 30.000 30.000 20 | 19 411.000 346.000 30.000 30.000 21 | 20 66.000 307.000 30.000 30.000 22 | 21 172.000 479.000 30.000 30.000 23 | 22 239.000 31.000 30.000 30.000 24 | 23 123.000 79.000 30.000 30.000 25 | 24 451.000 112.000 30.000 30.000 26 | 25 375.000 31.000 30.000 30.000 27 | 26 138.000 217.000 30.000 30.000 28 | 27 314.000 120.000 30.000 30.000 29 | 28 10.000 165.000 30.000 30.000 30 | 29 353.000 406.000 30.000 30.000 31 | # 32 | 11 5 33 | 6 0 34 | 15 3 35 | 20 1 36 | 10 1 37 | 26 19 38 | 19 2 39 | 4 2 40 | 4 3 41 | 21 2 42 | 27 16 43 | 3 2 44 | 23 9 45 | 16 9 46 | 17 28 47 | 26 5 48 | 24 28 49 | 25 12 50 | 2 0 51 | 8 3 52 | 28 4 53 | 14 1 54 | 17 1 55 | 9 4 56 | 7 3 57 | 22 4 58 | 12 5 59 | 5 2 60 | 15 5 61 | 1 0 62 | 29 17 63 | 24 20 64 | 27 26 65 | 13 2 66 | 16 18 67 | 18 14 68 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v30e39.tglf: -------------------------------------------------------------------------------- 1 | 0 372.000 300.000 30.000 30.000 2 | 1 397.000 242.000 30.000 30.000 3 | 2 371.000 71.000 30.000 30.000 4 | 3 487.000 161.000 30.000 30.000 5 | 4 245.000 248.000 30.000 30.000 6 | 5 155.000 267.000 30.000 30.000 7 | 6 153.000 415.000 30.000 30.000 8 | 7 64.000 433.000 30.000 30.000 9 | 8 301.000 291.000 30.000 30.000 10 | 9 125.000 472.000 30.000 30.000 11 | 10 296.000 182.000 30.000 30.000 12 | 11 283.000 261.000 30.000 30.000 13 | 12 148.000 311.000 30.000 30.000 14 | 13 294.000 397.000 30.000 30.000 15 | 14 319.000 211.000 30.000 30.000 16 | 15 488.000 96.000 30.000 30.000 17 | 16 457.000 208.000 30.000 30.000 18 | 17 246.000 230.000 30.000 30.000 19 | 18 370.000 184.000 30.000 30.000 20 | 19 94.000 40.000 30.000 30.000 21 | 20 379.000 120.000 30.000 30.000 22 | 21 46.000 27.000 30.000 30.000 23 | 22 264.000 260.000 30.000 30.000 24 | 23 153.000 475.000 30.000 30.000 25 | 24 363.000 245.000 30.000 30.000 26 | 25 171.000 374.000 30.000 30.000 27 | 26 106.000 0.000 30.000 30.000 28 | 27 202.000 261.000 30.000 30.000 29 | 28 382.000 4.000 30.000 30.000 30 | 29 26.000 409.000 30.000 30.000 31 | # 32 | 22 11 33 | 14 5 34 | 16 6 35 | 1 10 36 | 7 6 37 | 1 28 38 | 17 15 39 | 18 1 40 | 10 7 41 | 5 21 42 | 22 0 43 | 5 3 44 | 26 10 45 | 1 23 46 | 25 11 47 | 1 25 48 | 24 11 49 | 8 6 50 | 19 4 51 | 13 0 52 | 26 2 53 | 2 1 54 | 11 0 55 | 27 23 56 | 23 4 57 | 9 1 58 | 20 11 59 | 15 13 60 | 9 26 61 | 4 0 62 | 15 29 63 | 6 5 64 | 29 24 65 | 20 3 66 | 1 0 67 | 3 1 68 | 12 10 69 | 21 2 70 | 28 9 71 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v30e42.tglf: -------------------------------------------------------------------------------- 1 | 0 408.000 454.000 30.000 30.000 2 | 1 311.000 438.000 30.000 30.000 3 | 2 310.000 300.000 30.000 30.000 4 | 3 113.000 110.000 30.000 30.000 5 | 4 10.000 39.000 30.000 30.000 6 | 5 33.000 117.000 30.000 30.000 7 | 6 163.000 471.000 30.000 30.000 8 | 7 53.000 174.000 30.000 30.000 9 | 8 134.000 298.000 30.000 30.000 10 | 9 360.000 261.000 30.000 30.000 11 | 10 205.000 484.000 30.000 30.000 12 | 11 385.000 52.000 30.000 30.000 13 | 12 349.000 334.000 30.000 30.000 14 | 13 259.000 236.000 30.000 30.000 15 | 14 66.000 54.000 30.000 30.000 16 | 15 115.000 477.000 30.000 30.000 17 | 16 25.000 234.000 30.000 30.000 18 | 17 154.000 16.000 30.000 30.000 19 | 18 465.000 344.000 30.000 30.000 20 | 19 284.000 171.000 30.000 30.000 21 | 20 242.000 204.000 30.000 30.000 22 | 21 132.000 284.000 30.000 30.000 23 | 22 249.000 76.000 30.000 30.000 24 | 23 487.000 63.000 30.000 30.000 25 | 24 180.000 40.000 30.000 30.000 26 | 25 421.000 2.000 30.000 30.000 27 | 26 48.000 188.000 30.000 30.000 28 | 27 45.000 394.000 30.000 30.000 29 | 28 387.000 233.000 30.000 30.000 30 | 29 429.000 384.000 30.000 30.000 31 | # 32 | 15 5 33 | 21 19 34 | 10 4 35 | 21 9 36 | 5 0 37 | 13 2 38 | 27 13 39 | 23 9 40 | 10 13 41 | 2 0 42 | 17 14 43 | 18 26 44 | 25 18 45 | 6 2 46 | 22 18 47 | 1 0 48 | 28 21 49 | 17 21 50 | 21 13 51 | 7 6 52 | 16 12 53 | 16 14 54 | 14 6 55 | 12 6 56 | 8 3 57 | 11 9 58 | 17 23 59 | 20 4 60 | 29 20 61 | 18 0 62 | 19 4 63 | 21 4 64 | 14 29 65 | 17 9 66 | 24 2 67 | 0 23 68 | 26 1 69 | 29 9 70 | 4 0 71 | 3 1 72 | 9 7 73 | 17 15 74 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/random/v30e45.tglf: -------------------------------------------------------------------------------- 1 | 0 86.000 441.000 30.000 30.000 2 | 1 158.000 303.000 30.000 30.000 3 | 2 0.000 316.000 30.000 30.000 4 | 3 382.000 252.000 30.000 30.000 5 | 4 286.000 197.000 30.000 30.000 6 | 5 167.000 228.000 30.000 30.000 7 | 6 214.000 48.000 30.000 30.000 8 | 7 148.000 129.000 30.000 30.000 9 | 8 460.000 260.000 30.000 30.000 10 | 9 10.000 478.000 30.000 30.000 11 | 10 270.000 170.000 30.000 30.000 12 | 11 20.000 170.000 30.000 30.000 13 | 12 291.000 222.000 30.000 30.000 14 | 13 111.000 225.000 30.000 30.000 15 | 14 114.000 134.000 30.000 30.000 16 | 15 296.000 421.000 30.000 30.000 17 | 16 491.000 269.000 30.000 30.000 18 | 17 491.000 325.000 30.000 30.000 19 | 18 11.000 117.000 30.000 30.000 20 | 19 270.000 111.000 30.000 30.000 21 | 20 140.000 145.000 30.000 30.000 22 | 21 132.000 386.000 30.000 30.000 23 | 22 310.000 54.000 30.000 30.000 24 | 23 201.000 362.000 30.000 30.000 25 | 24 470.000 307.000 30.000 30.000 26 | 25 120.000 144.000 30.000 30.000 27 | 26 7.000 172.000 30.000 30.000 28 | 27 372.000 474.000 30.000 30.000 29 | 28 26.000 212.000 30.000 30.000 30 | 29 239.000 449.000 30.000 30.000 31 | # 32 | 23 15 33 | 9 4 34 | 29 15 35 | 8 4 36 | 10 7 37 | 4 2 38 | 5 2 39 | 12 5 40 | 13 0 41 | 1 0 42 | 25 8 43 | 16 2 44 | 17 8 45 | 25 14 46 | 6 2 47 | 14 9 48 | 29 4 49 | 24 3 50 | 2 1 51 | 7 16 52 | 17 15 53 | 21 3 54 | 11 8 55 | 18 26 56 | 3 1 57 | 29 25 58 | 20 2 59 | 16 3 60 | 28 3 61 | 28 24 62 | 17 5 63 | 27 18 64 | 21 24 65 | 15 12 66 | 17 28 67 | 22 26 68 | 22 12 69 | 26 25 70 | 18 15 71 | 12 23 72 | 6 15 73 | 2 0 74 | 6 5 75 | 19 10 76 | 7 0 77 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/sbgn/calvin.tglf: -------------------------------------------------------------------------------- 1 | 0 0 0 30 30 2 | 1 1 1 30 30 3 | 2 2 2 30 30 4 | 3 3 3 30 30 5 | 4 4 4 30 30 6 | 5 5 5 30 30 7 | 6 6 6 30 30 8 | 7 7 7 30 30 9 | 8 8 8 30 30 10 | 9 9 9 30 30 11 | 10 10 10 30 30 12 | 11 11 11 30 30 13 | 12 12 12 10 10 14 | 13 13 13 10 10 15 | 14 14 14 10 10 16 | 15 15 15 10 10 17 | 16 16 16 10 10 18 | 17 17 17 10 10 19 | 18 18 18 10 10 20 | 19 19 19 10 10 21 | 20 20 20 10 10 22 | 21 21 21 10 10 23 | 22 22 22 10 10 24 | 23 23 23 30 30 25 | 24 24 24 30 30 26 | 25 25 25 30 30 27 | 26 26 26 10 10 28 | 27 27 27 30 30 29 | 28 28 28 10 10 30 | 29 29 29 30 30 31 | 30 30 30 30 30 32 | 31 31 31 30 30 33 | 32 32 32 30 30 34 | 33 33 33 30 30 35 | 34 34 34 30 30 36 | 35 35 35 30 30 37 | 36 36 36 30 30 38 | 37 37 37 30 30 39 | 38 38 38 30 30 40 | 39 39 39 30 30 41 | 40 40 40 54 30 42 | 41 41 41 54 30 43 | 42 42 42 54 30 44 | 43 43 43 54 30 45 | 44 44 44 54 30 46 | 45 45 45 54 30 47 | 46 46 46 54 30 48 | 47 47 47 54 30 49 | 48 48 48 54 30 50 | 49 49 49 54 30 51 | 50 50 50 54 30 52 | 51 51 51 54 30 53 | 52 52 52 54 30 54 | # 55 | 20 32 56 | 15 36 57 | 13 25 58 | 49 21 59 | 41 13 60 | 23 22 61 | 42 14 62 | 43 15 63 | 20 4 64 | 46 18 65 | 34 16 66 | 28 36 67 | 47 19 68 | 0 21 69 | 26 30 70 | 7 13 71 | 48 20 72 | 17 39 73 | 16 3 74 | 37 28 75 | 33 19 76 | 26 27 77 | 51 26 78 | 40 12 79 | 29 14 80 | 12 38 81 | 25 22 82 | 52 28 83 | 13 8 84 | 21 1 85 | 11 17 86 | 30 13 87 | 2 13 88 | 32 15 89 | 18 35 90 | 22 24 91 | 19 35 92 | 33 20 93 | 45 17 94 | 31 18 95 | 38 18 96 | 34 26 97 | 9 17 98 | 18 10 99 | 44 16 100 | 37 21 101 | 16 31 102 | 19 5 103 | 6 15 104 | 22 39 105 | 5 12 106 | 14 37 107 | 21 11 108 | 50 22 109 | 15 29 110 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/3cross4cross.tglf: -------------------------------------------------------------------------------- 1 | 0 716.000 358.000 30.000 30.000 2 | 1 716.000 455.000 30.000 30.000 3 | 2 656.000 406.000 30.000 30.000 4 | 3 776.000 406.000 30.000 30.000 5 | 4 891.000 406.000 30.000 30.000 6 | 5 891.000 282.000 30.000 30.000 7 | 6 831.000 216.000 30.000 30.000 8 | 7 951.000 216.000 30.000 30.000 9 | 8 891.000 531.000 30.000 30.000 10 | 9 951.000 599.000 30.000 30.000 11 | 10 831.000 599.000 30.000 30.000 12 | 11 522.000 406.000 30.000 30.000 13 | 12 522.000 282.000 30.000 30.000 14 | 13 462.000 216.000 30.000 30.000 15 | 14 582.000 216.000 30.000 30.000 16 | 15 522.000 531.000 30.000 30.000 17 | 16 582.000 599.000 30.000 30.000 18 | 17 462.000 599.000 30.000 30.000 19 | 18 337.000 358.000 30.000 30.000 20 | 19 337.000 455.000 30.000 30.000 21 | 20 277.000 406.000 30.000 30.000 22 | 21 397.000 406.000 30.000 30.000 23 | # 24 | 21 19 25 | 1 2 26 | 17 15 27 | 2 11 28 | 13 14 29 | 5 6 30 | 7 5 31 | 11 21 32 | 4 3 33 | 6 7 34 | 8 9 35 | 4 5 36 | 10 8 37 | 16 17 38 | 20 18 39 | 3 1 40 | 11 12 41 | 4 8 42 | 12 13 43 | 2 0 44 | 11 15 45 | 19 20 46 | 18 21 47 | 0 3 48 | 9 10 49 | 14 12 50 | 15 16 51 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/3cross4cross_wTrees.tglf: -------------------------------------------------------------------------------- 1 | 0 716.000 358.000 30.000 30.000 2 | 1 716.000 455.000 30.000 30.000 3 | 2 656.000 406.000 30.000 30.000 4 | 3 776.000 406.000 30.000 30.000 5 | 4 891.000 406.000 30.000 30.000 6 | 5 891.000 282.000 30.000 30.000 7 | 6 831.000 216.000 30.000 30.000 8 | 7 951.000 216.000 30.000 30.000 9 | 8 891.000 531.000 30.000 30.000 10 | 9 951.000 599.000 30.000 30.000 11 | 10 831.000 599.000 30.000 30.000 12 | 11 522.000 406.000 30.000 30.000 13 | 12 522.000 282.000 30.000 30.000 14 | 13 462.000 216.000 30.000 30.000 15 | 14 582.000 216.000 30.000 30.000 16 | 15 522.000 531.000 30.000 30.000 17 | 16 582.000 599.000 30.000 30.000 18 | 17 462.000 599.000 30.000 30.000 19 | 18 337.000 358.000 30.000 30.000 20 | 19 337.000 455.000 30.000 30.000 21 | 20 277.000 406.000 30.000 30.000 22 | 21 397.000 406.000 30.000 30.000 23 | 22 440.000 489.000 30.000 30.000 24 | 23 369.000 516.000 30.000 30.000 25 | 24 396.000 559.000 30.000 30.000 26 | 25 385.000 274.000 30.000 30.000 27 | 26 313.000 232.000 30.000 30.000 28 | 27 362.000 208.000 30.000 30.000 29 | 28 642.000 246.000 30.000 30.000 30 | 29 660.000 190.000 30.000 30.000 31 | 30 685.000 213.000 30.000 30.000 32 | 31 702.000 237.000 30.000 30.000 33 | 32 981.000 356.000 30.000 30.000 34 | 33 986.000 414.000 30.000 30.000 35 | 34 1046.000 406.000 30.000 30.000 36 | # 37 | 4 33 38 | 4 32 39 | 3 1 40 | 11 22 41 | 25 27 42 | 15 16 43 | 13 14 44 | 21 25 45 | 28 29 46 | 8 9 47 | 22 23 48 | 2 11 49 | 19 20 50 | 20 18 51 | 22 24 52 | 18 21 53 | 21 19 54 | 17 15 55 | 12 28 56 | 2 0 57 | 16 17 58 | 25 26 59 | 10 8 60 | 4 3 61 | 4 5 62 | 5 6 63 | 0 3 64 | 28 31 65 | 4 8 66 | 14 12 67 | 11 15 68 | 9 10 69 | 1 2 70 | 11 12 71 | 7 5 72 | 12 13 73 | 11 21 74 | 28 30 75 | 33 34 76 | 6 7 77 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/Arpanet19728_input.tglf: -------------------------------------------------------------------------------- 1 | // Derived from http://www.topology-zoo.org/dataset.html 2 | 0 321.5 103.0 30.744216918945312 38.0 3 | 1 441.0 175.0 30.312225341796875 38.0 4 | 2 515.0 319.0 48.79234313964844 38.0 5 | 3 336.0 319.0 22.944168090820312 38.0 6 | 4 38.0 175.0 32.00422668457031 38.0 7 | 5 126.0 103.0 40.332275390625 38.0 8 | 6 69.0 319.0 21.6241455078125 38.0 9 | 7 606.0 175.0 30.060226440429688 38.0 10 | 8 153.0 175.0 31.476226806640625 38.0 11 | 9 35.0 103.0 54.43238830566406 38.0 12 | 10 474.0 247.0 33.012237548828125 38.0 13 | 11 519.0 175.0 31.812225341796875 38.0 14 | 12 281.0 247.0 157.1171417236328 38.0 15 | 13 587.0 319.0 29.508224487304688 38.0 16 | 14 209.0 411.0 48.86433410644531 38.0 17 | 15 391.0 247.0 22.932159423828125 38.0 18 | 16 167.0 483.0 24.720169067382812 38.0 19 | 17 35.0 247.0 49.86033630371094 38.0 20 | 18 581.0 247.0 35.76023864746094 38.0 21 | 19 175.5 319.0 57.98442077636719 38.0 22 | 20 162.0 247.0 28.51220703125 38.0 23 | 21 378.0 411.0 28.596206665039062 38.0 24 | 22 246.5 175.0 41.376312255859375 38.0 25 | 23 83.0 411.0 24.720169067382812 38.0 26 | 24 307.0 483.0 23.508163452148438 38.0 27 | 25 434.5 319.0 35.316253662109375 38.0 28 | 26 502.0 103.0 31.812225341796875 38.0 29 | 27 234.0 555.0 55.11639404296875 38.0 30 | 28 186.0 21.0 18.1201171875 38.0 31 | # 32 | 0 28 33 | 0 1 34 | 1 10 35 | 1 15 36 | 2 10 37 | 2 11 38 | 3 12 39 | 3 15 40 | 4 17 41 | 4 9 42 | 5 8 43 | 5 6 44 | 6 17 45 | 6 23 46 | 7 18 47 | 7 21 48 | 8 20 49 | 9 28 50 | 10 25 51 | 11 26 52 | 12 22 53 | 13 18 54 | 13 14 55 | 14 19 56 | 16 23 57 | 16 27 58 | 19 20 59 | 20 22 60 | 21 25 61 | 21 24 62 | 24 27 63 | 26 28 -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/Belnet2004.tglf: -------------------------------------------------------------------------------- 1 | // Derived from http://www.topology-zoo.org/dataset.html 2 | 0 726.0 -21.0 32.0 34.0 3 | 1 523.5 -481.0 35.0 34.0 4 | 2 665.0 -543.0 45.0 34.0 5 | 3 28.5 -83.0 35.0 34.0 6 | 4 762.0 -83.0 104.0 34.0 7 | 5 149.0 -481.0 46.0 34.0 8 | 6 89.5 -83.0 33.0 34.0 9 | 7 168.0 -83.0 68.0 34.0 10 | 8 459.5 -481.0 37.0 34.0 11 | 9 221.0 -481.0 55.0 34.0 12 | 10 552.0 -83.0 68.0 34.0 13 | 11 650.5 -83.0 63.0 34.0 14 | 12 384.0 -481.0 68.0 34.0 15 | 13 398.0 -257.0 47.0 34.0 16 | 14 465.0 -369.0 206.0 34.0 17 | 15 731.0 -543.0 37.0 34.0 18 | 16 375.0 -195.0 482.0 34.0 19 | 17 711.0 -481.0 158.0 34.0 20 | 18 599.0 -543.0 42.0 34.0 21 | 19 793.0 -369.0 30.0 34.0 22 | 20 509.0 -257.0 95.0 34.0 23 | 21 809.0 -21.0 86.0 34.0 24 | 22 300.0 -481.0 44.0 34.0 25 | # 26 | 0 4 27 | 1 14 28 | 1 16 29 | 2 17 30 | 3 14 31 | 3 16 32 | 4 14 33 | 4 16 34 | 4 17 35 | 4 21 36 | 5 14 37 | 5 16 38 | 6 14 39 | 6 16 40 | 7 14 41 | 7 16 42 | 8 14 43 | 8 16 44 | 9 14 45 | 9 16 46 | 10 14 47 | 10 16 48 | 11 14 49 | 11 16 50 | 12 14 51 | 12 16 52 | 13 14 53 | 13 16 54 | 14 16 55 | 14 17 56 | 14 20 57 | 14 22 58 | 15 17 59 | 16 17 60 | 16 20 61 | 16 22 62 | 17 18 63 | 17 19 64 | 17 21 -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/Claranet.tglf: -------------------------------------------------------------------------------- 1 | // Derived from http://www.topology-zoo.org/dataset.html 2 | 0 197.0 -83.0 46.0 34.0 3 | 1 294.0 -207.0 80.0 34.0 4 | 2 317.0 -145.0 47.0 34.0 5 | 3 231.0 -279.0 86.0 34.0 6 | 4 79.0 -413.0 30.0 34.0 7 | 5 252.0 -413.0 44.0 34.0 8 | 6 131.0 -413.0 37.0 34.0 9 | 7 138.0 -341.0 128.0 34.0 10 | 8 323.0 -279.0 59.0 34.0 11 | 9 35.0 -207.0 68.0 34.0 12 | 10 254.0 -341.0 55.0 34.0 13 | 11 156.0 -207.0 92.0 34.0 14 | 12 119.0 -145.0 63.0 34.0 15 | 13 228.0 -21.0 44.0 34.0 16 | 14 228.0 -145.0 92.0 34.0 17 | # 18 | 0 13 19 | 0 14 20 | 1 2 21 | 1 3 22 | 1 8 23 | 1 14 24 | 3 7 25 | 3 9 26 | 3 10 27 | 3 11 28 | 3 14 29 | 4 7 30 | 5 7 31 | 5 8 32 | 6 7 33 | 11 12 34 | 11 14 35 | 13 14 -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/Janetlense.tglf: -------------------------------------------------------------------------------- 1 | // Derived from http://www.topology-zoo.org/dataset.html 2 | 0 389.0 -651.0 63.0 34.0 3 | 1 576.0 -651.0 56.0 34.0 4 | 2 915.0 -215.0 146.0 34.0 5 | 3 756.0 -479.0 152.0 34.0 6 | 4 695.0 -651.0 121.0 34.0 7 | 5 963.0 -651.0 62.0 34.0 8 | 6 972.0 -83.0 80.0 34.0 9 | 7 774.0 -357.0 44.0 34.0 10 | 8 839.0 -651.0 125.0 34.0 11 | 9 77.0 -83.0 147.0 34.0 12 | 10 209.0 -83.0 80.0 34.0 13 | 11 1073.0 -83.0 65.0 34.0 14 | 12 299.0 -651.0 70.0 34.0 15 | 13 479.0 -651.0 80.0 34.0 16 | 14 819.0 -21.0 122.0 34.0 17 | 15 1231.0 -83.0 42.0 34.0 18 | 16 551.0 -83.0 147.0 34.0 19 | 17 1112.0 -21.0 131.0 34.0 20 | 18 740.0 -713.0 141.0 34.0 21 | 19 1157.0 -83.0 58.0 34.0 22 | # 23 | 0 2 24 | 0 3 25 | 1 2 26 | 1 3 27 | 2 3 28 | 2 4 29 | 2 5 30 | 2 6 31 | 2 7 32 | 2 8 33 | 2 9 34 | 2 10 35 | 2 11 36 | 2 12 37 | 2 13 38 | 2 15 39 | 2 16 40 | 2 19 41 | 3 4 42 | 3 5 43 | 3 6 44 | 3 7 45 | 3 8 46 | 3 9 47 | 3 10 48 | 3 11 49 | 3 12 50 | 3 13 51 | 3 15 52 | 3 16 53 | 3 19 54 | 4 18 55 | 14 16 56 | 17 19 -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/SepMatrixIter.tglf: -------------------------------------------------------------------------------- 1 | 0 0 0 5 5 2 | 1 10 10 5 5 3 | 2 20 20 5 5 4 | 3 30 30 5 5 5 | 4 40 40 5 5 6 | 5 50 50 5 5 7 | 6 60 60 5 5 8 | 7 70 70 5 5 9 | 8 80 80 5 5 10 | # 11 | # 12 | 2 3 C E >= 10 13 | 2 5 C E >= 10 14 | 2 7 C E >= 10 15 | 3 5 C E >= 10 16 | 3 6 C E >= 10 17 | 7 8 C E >= 10 18 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/X_4.tglf: -------------------------------------------------------------------------------- 1 | 0 278.000 630.000 30.000 30.000 2 | 1 325.000 598.000 30.000 30.000 3 | 2 403.000 551.000 30.000 30.000 4 | 3 470.000 504.000 30.000 30.000 5 | 4 518.000 465.000 30.000 30.000 6 | 5 570.000 508.000 30.000 30.000 7 | 6 624.000 556.000 30.000 30.000 8 | 7 673.000 596.000 30.000 30.000 9 | 8 724.000 636.000 30.000 30.000 10 | 9 571.000 418.000 30.000 30.000 11 | 10 623.000 372.000 30.000 30.000 12 | 11 687.000 313.000 30.000 30.000 13 | 12 756.000 246.000 30.000 30.000 14 | 13 443.000 409.000 30.000 30.000 15 | 14 374.000 358.000 30.000 30.000 16 | 15 323.000 296.000 30.000 30.000 17 | 16 268.000 245.000 30.000 30.000 18 | # 19 | 4 9 20 | 10 11 21 | 7 6 22 | 5 4 23 | 6 5 24 | 13 14 25 | 0 1 26 | 2 3 27 | 9 10 28 | 8 7 29 | 14 15 30 | 15 16 31 | 11 12 32 | 3 4 33 | 4 13 34 | 1 2 35 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/Y_4.tglf: -------------------------------------------------------------------------------- 1 | 0 386.000 156.000 30.000 30.000 2 | 1 421.000 193.000 30.000 30.000 3 | 2 460.000 244.000 30.000 30.000 4 | 3 495.000 281.000 30.000 30.000 5 | 4 538.000 334.000 30.000 30.000 6 | 5 581.000 299.000 30.000 30.000 7 | 6 631.000 258.000 30.000 30.000 8 | 7 674.000 216.000 30.000 30.000 9 | 8 717.000 178.000 30.000 30.000 10 | 9 536.000 395.000 30.000 30.000 11 | 10 529.000 456.000 30.000 30.000 12 | 11 515.000 504.000 30.000 30.000 13 | 12 506.000 564.000 30.000 30.000 14 | # 15 | 5 6 16 | 9 10 17 | 11 12 18 | 10 11 19 | 4 5 20 | 2 3 21 | 4 9 22 | 3 4 23 | 7 8 24 | 6 7 25 | 0 1 26 | 1 2 27 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/bend_costs.tglf: -------------------------------------------------------------------------------- 1 | 0 0 100 70 70 2 | 1 0 241 70 70 3 | 2 100 341 70 70 4 | 3 241 341 70 70 5 | 4 341 241 70 70 6 | 5 341 100 70 70 7 | 6 241 0 70 70 8 | 7 100 0 70 70 9 | 8 500 0 70 70 10 | 9 600 100 70 70 11 | 10 700 200 70 70 12 | 11 841 200 70 70 13 | 12 941 100 70 70 14 | 13 1041 0 70 70 15 | # 16 | 0 1 17 | 1 2 18 | 2 3 19 | 3 4 20 | 4 5 21 | 5 6 22 | 6 7 23 | 7 0 24 | 8 9 25 | 9 10 26 | 10 11 27 | 11 12 28 | 12 13 29 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/bundlecross.tglf: -------------------------------------------------------------------------------- 1 | 0 382.000 311.000 30.000 30.000 2 | 1 461.000 349.000 30.000 30.000 3 | 2 521.000 349.000 30.000 30.000 4 | 3 581.000 349.000 30.000 30.000 5 | 4 641.000 349.000 30.000 30.000 6 | 5 550.000 254.000 30.000 30.000 7 | 6 550.000 441.000 30.000 30.000 8 | 7 382.000 441.000 30.000 30.000 9 | 8 382.000 254.000 30.000 30.000 10 | # 11 | 4 6 12 | 6 7 13 | 0 8 14 | 5 4 15 | 0 1 16 | 7 0 17 | 1 2 18 | 0 3 19 | 8 5 20 | 0 2 21 | 5 6 22 | 0 4 23 | 3 4 24 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/bundlerouting.tglf: -------------------------------------------------------------------------------- 1 | 0 382.000 311.000 30.000 30.000 2 | 1 461.000 349.000 30.000 30.000 3 | 2 521.000 349.000 30.000 30.000 4 | 3 581.000 349.000 30.000 30.000 5 | 4 641.000 349.000 30.000 30.000 6 | 5 309.000 259.000 30.000 30.000 7 | 6 309.000 198.000 30.000 30.000 8 | 7 309.000 144.000 30.000 30.000 9 | 8 309.000 89.000 30.000 30.000 10 | # 11 | 6 7 12 | 0 3 13 | 0 6 14 | 1 2 15 | 2 3 16 | 0 7 17 | 7 8 18 | 5 6 19 | 0 8 20 | 0 2 21 | 0 5 22 | 0 4 23 | 0 1 24 | 3 4 25 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/bundlerouting1.tglf: -------------------------------------------------------------------------------- 1 | 0 382.000 311.000 30.000 30.000 2 | 1 461.000 349.000 30.000 30.000 3 | 2 521.000 349.000 30.000 30.000 4 | 3 581.000 349.000 30.000 30.000 5 | 4 641.000 349.000 30.000 30.000 6 | # 7 | 1 2 8 | 3 4 9 | 0 2 10 | 0 3 11 | 2 3 12 | 0 4 13 | 0 1 14 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/bundlerouting2.tglf: -------------------------------------------------------------------------------- 1 | 0 382.000 311.000 30.000 30.000 2 | 1 461.000 349.000 30.000 30.000 3 | 2 521.000 349.000 30.000 30.000 4 | 3 581.000 349.000 30.000 30.000 5 | 4 641.000 349.000 30.000 30.000 6 | 5 309.000 259.000 30.000 30.000 7 | 6 309.000 198.000 30.000 30.000 8 | 7 309.000 144.000 30.000 30.000 9 | 8 309.000 89.000 30.000 30.000 10 | # 11 | 0 4 12 | 0 5 13 | 0 2 14 | 0 1 15 | 6 7 16 | 1 2 17 | 2 3 18 | 5 6 19 | 0 7 20 | 7 8 21 | 0 6 22 | 0 8 23 | 0 3 24 | 3 4 25 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/chainconfig01.tglf: -------------------------------------------------------------------------------- 1 | 0 358.000 102.000 30.000 30.000 2 | 1 293.000 128.000 30.000 30.000 3 | 2 242.000 189.000 30.000 30.000 4 | 3 224.000 267.000 30.000 30.000 5 | 4 236.000 347.000 30.000 30.000 6 | 5 292.000 384.000 30.000 30.000 7 | 6 374.000 396.000 30.000 30.000 8 | 7 455.000 404.000 30.000 30.000 9 | 8 530.000 415.000 30.000 30.000 10 | 9 598.000 423.000 30.000 30.000 11 | 10 669.000 434.000 30.000 30.000 12 | 11 729.000 451.000 30.000 30.000 13 | 12 772.000 492.000 30.000 30.000 14 | 13 800.000 545.000 30.000 30.000 15 | 14 798.000 602.000 30.000 30.000 16 | 15 783.000 665.000 30.000 30.000 17 | 16 746.000 714.000 30.000 30.000 18 | # 19 | 2 3 20 | 0 1 21 | 13 14 22 | 11 12 23 | 5 6 24 | 3 4 25 | 7 8 26 | 14 15 27 | 15 16 28 | 4 5 29 | 6 7 30 | 9 10 31 | 1 2 32 | 12 13 33 | 10 11 34 | 8 9 35 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/cmplayout01.tglf: -------------------------------------------------------------------------------- 1 | 0 426 200 30 30 2 | 1 474 200 30 30 3 | 2 450 325 98 87 4 | # 5 | 0 1 426 200 426 172.292 474 172.292 474 200 6 | 1 2 474 200 474 248.25 450 248.25 450 325 7 | 0 2 426 200 388.292 200 388.292 325 450 325 8 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/cmplayout02.tglf: -------------------------------------------------------------------------------- 1 | 6 426 200 30 30 2 | 7 474 200 30 30 3 | 8 450 325 98 87 4 | 14 426 172.292 12.7083 12.7083 5 | 15 474 172.292 12.7083 12.7083 6 | 16 474 248.25 12.7083 12.7083 7 | 17 450 248.25 12.7083 12.7083 8 | 18 388.292 200 12.7083 12.7083 9 | 19 388.292 325 12.7083 12.7083 10 | # 11 | 6 7 426 200 426 172.292 474 172.292 474 200 12 | 7 8 474 200 474 248.25 450 248.25 450 325 13 | 6 8 426 200 388.292 200 388.292 325 450 325 14 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/cmplayout03.tglf: -------------------------------------------------------------------------------- 1 | 0 426 200 30 30 2 | 1 474 200 30 30 3 | 2 450 325 98 87 4 | # 5 | 0 1 426 200 426 152.292 474 152.292 474 200 6 | 1 2 474 200 474 248.25 450 248.25 450 325 7 | 0 2 426 200 388.292 200 388.292 325 450 325 8 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/cmplayout04.tglf: -------------------------------------------------------------------------------- 1 | 0 426 200 30 30 2 | 1 474 210 30 30 3 | 2 450 325 98 87 4 | # 5 | 0 1 426 200 426 172.292 474 172.292 474 210 6 | 1 2 474 210 474 248.25 450 248.25 450 325 7 | 0 2 426 200 388.292 200 388.292 325 450 325 8 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/coincidentnodes.tglf: -------------------------------------------------------------------------------- 1 | 0 0 0 30 30 2 | 1 0 0 30 30 3 | 2 0 0 30 30 4 | 3 0 0 30 30 5 | 4 0 0 30 30 6 | 5 0 0 30 30 7 | 6 0 0 30 30 8 | 7 0 0 30 30 9 | 8 0 0 30 30 10 | 9 0 0 30 30 11 | 10 0 0 30 30 12 | 11 0 0 30 30 13 | 12 0 0 30 30 14 | 13 0 0 30 30 15 | 14 0 0 30 30 16 | 15 0 0 30 30 17 | 16 0 0 30 30 18 | 17 0 0 30 30 19 | 18 0 0 30 30 20 | 19 0 0 30 30 21 | # 22 | 15 6 23 | 19 11 24 | 3 1 25 | 12 1 26 | 11 6 27 | 2 17 28 | 7 3 29 | 5 3 30 | 17 14 31 | 2 1 32 | 13 10 33 | 16 9 34 | 8 7 35 | 9 5 36 | 18 11 37 | 15 0 38 | 4 0 39 | 10 9 40 | 11 4 41 | 1 8 42 | 14 11 43 | 6 1 44 | 1 0 45 | 13 15 46 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/column8.tglf: -------------------------------------------------------------------------------- 1 | 0 729.000 76.000 30.000 30.000 2 | 1 729.000 167.000 30.000 30.000 3 | 2 729.000 270.000 30.000 30.000 4 | 3 729.000 361.000 30.000 30.000 5 | 4 729.000 445.000 30.000 30.000 6 | 5 729.000 530.000 30.000 30.000 7 | 6 729.000 613.000 30.000 30.000 8 | 7 729.000 696.000 30.000 30.000 9 | # 10 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/components.tglf: -------------------------------------------------------------------------------- 1 | 0 171.000 148.000 30.000 30.000 2 | 1 298.000 192.000 30.000 30.000 3 | 2 264.000 346.000 30.000 30.000 4 | 3 103.000 383.000 30.000 30.000 5 | 4 97.000 249.000 30.000 30.000 6 | 5 121.000 558.000 30.000 30.000 7 | 6 288.000 492.000 30.000 30.000 8 | 7 463.000 192.000 30.000 30.000 9 | 8 443.000 369.000 30.000 30.000 10 | 9 626.000 319.000 30.000 30.000 11 | 10 725.000 148.000 30.000 30.000 12 | 11 727.000 481.000 30.000 30.000 13 | 12 648.000 81.000 30.000 30.000 14 | 13 776.000 78.000 30.000 30.000 15 | 14 315.000 682.000 30.000 30.000 16 | 15 392.000 575.000 30.000 30.000 17 | 16 509.000 618.000 30.000 30.000 18 | 17 451.000 765.000 30.000 30.000 19 | 18 654.000 627.000 30.000 30.000 20 | 19 855.000 616.000 30.000 30.000 21 | 20 771.000 748.000 30.000 30.000 22 | 21 930.000 226.000 30.000 30.000 23 | 22 836.000 347.000 30.000 30.000 24 | 23 971.000 385.000 30.000 30.000 25 | 24 1082.000 427.000 30.000 30.000 26 | 25 1063.000 588.000 30.000 30.000 27 | # 28 | 4 0 29 | 9 8 30 | 19 18 31 | 9 10 32 | 20 19 33 | 15 16 34 | 1 2 35 | 3 2 36 | 0 1 37 | 13 10 38 | 14 16 39 | 14 17 40 | 14 15 41 | 12 10 42 | 18 20 43 | 22 23 44 | 6 5 45 | 16 17 46 | 15 17 47 | 2 6 48 | 3 4 49 | 23 24 50 | 9 7 51 | 9 11 52 | 5 3 53 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/core_with_trees.tglf: -------------------------------------------------------------------------------- 1 | 0 294.000 266.000 30.000 30.000 2 | 1 457.000 235.000 30.000 30.000 3 | 2 627.000 252.000 30.000 30.000 4 | 3 705.000 361.000 30.000 30.000 5 | 4 594.000 507.000 30.000 30.000 6 | 5 413.000 510.000 30.000 30.000 7 | 6 275.000 414.000 30.000 30.000 8 | 7 674.000 188.000 30.000 30.000 9 | 8 716.000 149.000 30.000 30.000 10 | 9 700.000 82.000 30.000 30.000 11 | 10 796.000 140.000 30.000 30.000 12 | 11 350.000 560.000 30.000 30.000 13 | 12 410.000 564.000 30.000 30.000 14 | 13 481.000 572.000 30.000 30.000 15 | 14 277.000 610.000 30.000 30.000 16 | 15 345.000 626.000 30.000 30.000 17 | 16 409.000 638.000 30.000 30.000 18 | 17 462.000 638.000 30.000 30.000 19 | 18 502.000 634.000 30.000 30.000 20 | 19 548.000 627.000 30.000 30.000 21 | 20 650.000 574.000 30.000 30.000 22 | 21 211.000 240.000 30.000 30.000 23 | 22 289.000 193.000 30.000 30.000 24 | # 25 | 0 1 26 | 5 6 27 | 8 10 28 | 0 6 29 | 12 16 30 | 4 2 31 | 1 2 32 | 2 7 33 | 5 12 34 | 7 8 35 | 5 1 36 | 13 19 37 | 2 3 38 | 13 17 39 | 8 9 40 | 13 18 41 | 0 21 42 | 4 5 43 | 5 13 44 | 0 22 45 | 11 15 46 | 4 20 47 | 11 14 48 | 5 11 49 | 3 4 50 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/expand02.tglf: -------------------------------------------------------------------------------- 1 | 0 546.000 319.000 30.000 30.000 2 | 1 742.000 319.000 30.000 30.000 3 | 2 546.000 529.000 30.000 30.000 4 | 3 742.000 529.000 30.000 30.000 5 | 4 481.000 249.000 30.000 30.000 6 | 5 397.000 218.000 30.000 30.000 7 | 6 436.000 182.000 30.000 30.000 8 | 7 397.000 319.000 30.000 30.000 9 | 8 397.000 529.000 30.000 30.000 10 | 9 905.000 319.000 30.000 30.000 11 | 10 905.000 529.000 30.000 30.000 12 | 11 957.000 238.000 30.000 30.000 13 | 12 300.000 203.000 30.000 30.000 14 | 13 330.000 155.000 30.000 30.000 15 | 14 379.000 113.000 30.000 30.000 16 | 15 553.000 228.000 30.000 30.000 17 | 16 549.000 160.000 30.000 30.000 18 | 17 506.000 99.000 30.000 30.000 19 | 18 558.000 90.000 30.000 30.000 20 | 19 617.000 90.000 30.000 30.000 21 | 20 427.000 93.000 30.000 30.000 22 | 21 486.000 149.000 30.000 30.000 23 | 22 560.000 31.000 30.000 30.000 24 | 23 884.000 239.000 30.000 30.000 25 | 24 828.000 237.000 30.000 30.000 26 | 25 1024.000 233.000 30.000 30.000 27 | 26 1091.000 229.000 30.000 30.000 28 | 27 770.000 233.000 30.000 30.000 29 | 28 705.000 235.000 30.000 30.000 30 | 29 1155.000 226.000 30.000 30.000 31 | # 32 | 0 4 33 | 9 26 34 | 8 7 35 | 10 3 36 | 16 19 37 | 6 20 38 | 9 29 39 | 0 15 40 | 15 21 41 | 9 28 42 | 9 24 43 | 3 2 44 | 5 12 45 | 2 8 46 | 4 5 47 | 16 17 48 | 9 10 49 | 15 16 50 | 9 11 51 | 7 0 52 | 18 22 53 | 1 9 54 | 9 27 55 | 0 1 56 | 9 23 57 | 4 6 58 | 6 14 59 | 5 13 60 | 16 18 61 | 9 25 62 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/expand04.tglf: -------------------------------------------------------------------------------- 1 | 0 630.000 475.000 30.000 30.000 2 | 1 651.000 587.000 30.000 30.000 3 | 2 651.000 324.000 30.000 30.000 4 | 3 746.000 324.000 30.000 30.000 5 | 4 746.000 587.000 30.000 30.000 6 | 5 630.000 390.000 30.000 30.000 7 | 6 495.000 390.000 30.000 30.000 8 | 7 495.000 475.000 30.000 30.000 9 | 8 495.000 324.000 30.000 30.000 10 | 9 566.000 537.000 30.000 30.000 11 | 10 564.000 576.000 30.000 30.000 12 | 11 562.000 617.000 30.000 30.000 13 | 12 702.000 437.000 30.000 30.000 14 | 13 701.000 474.000 30.000 30.000 15 | 14 700.000 513.000 30.000 30.000 16 | # 17 | 0 5 18 | 2 3 19 | 4 1 20 | 1 9 21 | 8 6 22 | 1 10 23 | 5 6 24 | 0 14 25 | 6 7 26 | 3 4 27 | 1 11 28 | 8 2 29 | 1 2 30 | 7 0 31 | 0 13 32 | 0 12 33 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/expand04b.tglf: -------------------------------------------------------------------------------- 1 | 0 630.000 -475.000 30.000 30.000 2 | 1 651.000 -587.000 30.000 30.000 3 | 2 651.000 -324.000 30.000 30.000 4 | 3 746.000 -324.000 30.000 30.000 5 | 4 746.000 -587.000 30.000 30.000 6 | 5 630.000 -390.000 30.000 30.000 7 | 6 495.000 -390.000 30.000 30.000 8 | 7 495.000 -475.000 30.000 30.000 9 | 8 495.000 -324.000 30.000 30.000 10 | 9 566.000 -537.000 30.000 30.000 11 | 10 564.000 -576.000 30.000 30.000 12 | 11 562.000 -617.000 30.000 30.000 13 | 12 702.000 -437.000 30.000 30.000 14 | 13 701.000 -474.000 30.000 30.000 15 | 14 700.000 -513.000 30.000 30.000 16 | # 17 | 0 12 18 | 7 0 19 | 0 13 20 | 2 3 21 | 0 5 22 | 1 2 23 | 1 10 24 | 8 6 25 | 1 11 26 | 6 7 27 | 0 14 28 | 3 4 29 | 1 9 30 | 4 1 31 | 5 6 32 | 8 2 33 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/expand05.tglf: -------------------------------------------------------------------------------- 1 | 0 464.000 229.000 225.000 55.000 2 | 1 464.000 367.000 30.000 30.000 3 | 2 533.000 367.000 30.000 30.000 4 | 3 533.000 443.000 30.000 30.000 5 | 4 700.000 443.000 30.000 30.000 6 | 5 700.000 229.000 30.000 30.000 7 | 6 584.000 304.000 30.000 30.000 8 | 7 650.000 273.000 30.000 30.000 9 | 8 630.000 324.000 30.000 30.000 10 | 9 605.000 372.000 30.000 30.000 11 | 10 573.000 417.000 30.000 30.000 12 | # 13 | 0 1 14 | 6 10 15 | 6 7 16 | 6 9 17 | 1 2 18 | 5 0 19 | 4 5 20 | 2 3 21 | 3 4 22 | 0 6 23 | 6 8 24 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/expand07.tglf: -------------------------------------------------------------------------------- 1 | 1 322.018 -127.884 90 90 2 | 5 322.018 208.39 90 90 3 | 6 172.018 -127.884 90 90 4 | 8 172.018 358.39 90 90 5 | 10 22.0175 358.39 90 90 6 | 12 172.018 508.39 90 90 7 | 14 322.018 508.39 90 90 8 | 17 472.018 508.39 90 90 9 | 19 172.018 32.896 90 90 10 | 24 22.0175 208.39 90 90 11 | 27 22.0175 58.3897 90 90 12 | 29 472.018 208.39 90 90 13 | 94 322.018 32.896 22.5 22.5 14 | 95 322.018 358.39 22.5 22.5 15 | 96 22.0175 -177.884 22.5 22.5 16 | 97 472.018 -177.884 22.5 22.5 17 | # 18 | 96 97 19 | 6 1 20 | 19 94 21 | 24 5 22 | 5 29 23 | 10 8 24 | 8 95 25 | 12 14 26 | 14 17 27 | 96 27 28 | 27 24 29 | 24 10 30 | 6 19 31 | 8 12 32 | 1 94 33 | 94 5 34 | 5 95 35 | 95 14 36 | 97 29 37 | 29 17 38 | # 39 | 1 6 C W >= 150.000 40 | 1 94 C S >= 160.780 41 | 5 24 C W >= 300.000 42 | 5 29 C E >= 150.000 43 | 5 94 C N >= 157.994 44 | 5 95 C S >= 150.000 45 | 6 19 C S >= 160.780 46 | 8 10 C W >= 150.000 47 | 8 12 C S >= 150.000 48 | 8 95 C E >= 150.000 49 | 10 24 C N >= 150.000 50 | 12 14 C E >= 150.000 51 | 14 17 C E >= 150.000 52 | 14 95 C N >= 150.000 53 | 17 29 C N >= 300.000 54 | 19 94 C E >= 150.000 55 | 24 27 C N >= 150.000 56 | 27 96 C N >= 236.274 57 | 29 97 C N >= 386.274 58 | 96 97 C E >= 450.000 59 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/expand08.tglf: -------------------------------------------------------------------------------- 1 | 0 534.000 445.000 30.000 30.000 2 | 1 534.000 555.000 30.000 30.000 3 | 2 416.000 555.000 30.000 30.000 4 | 3 416.000 445.000 30.000 30.000 5 | 4 586.000 380.000 30.000 30.000 6 | 5 463.000 259.000 30.000 30.000 7 | 6 524.000 261.000 30.000 30.000 8 | 7 585.000 261.000 30.000 30.000 9 | 8 640.000 261.000 30.000 30.000 10 | 9 705.000 261.000 30.000 30.000 11 | 10 495.000 380.000 30.000 30.000 12 | 11 193.000 502.000 30.000 30.000 13 | 12 -127.000 383.000 30.000 30.000 14 | 13 -74.000 386.000 30.000 30.000 15 | 14 -31.000 383.000 30.000 30.000 16 | 15 23.000 383.000 30.000 30.000 17 | 16 70.000 381.000 30.000 30.000 18 | 17 131.000 383.000 30.000 30.000 19 | 18 192.000 383.000 30.000 30.000 20 | 19 247.000 383.000 30.000 30.000 21 | 20 312.000 383.000 30.000 30.000 22 | 21 362.000 380.000 30.000 30.000 23 | 22 -44.000 465.000 30.000 30.000 24 | 23 -43.000 503.000 30.000 30.000 25 | 24 -46.000 548.000 30.000 30.000 26 | 25 -47.000 598.000 30.000 30.000 27 | 26 -49.000 641.000 30.000 30.000 28 | 27 -50.000 685.000 30.000 30.000 29 | 28 -50.000 737.000 30.000 30.000 30 | 29 777.000 264.000 30.000 30.000 31 | 30 416.000 260.000 30.000 30.000 32 | # 33 | 4 7 34 | 11 21 35 | 4 30 36 | 11 19 37 | 11 22 38 | 4 29 39 | 11 25 40 | 3 0 41 | 11 26 42 | 11 20 43 | 2 11 44 | 11 15 45 | 4 9 46 | 11 13 47 | 11 28 48 | 0 4 49 | 11 18 50 | 4 5 51 | 4 8 52 | 11 24 53 | 4 6 54 | 0 1 55 | 11 17 56 | 11 12 57 | 11 16 58 | 2 3 59 | 0 10 60 | 11 27 61 | 11 23 62 | 11 14 63 | 1 2 64 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/expand09.tglf: -------------------------------------------------------------------------------- 1 | 0 534.000 445.000 30.000 30.000 2 | 1 534.000 555.000 30.000 30.000 3 | 2 416.000 555.000 30.000 30.000 4 | 3 586.000 380.000 30.000 30.000 5 | 4 463.000 259.000 30.000 30.000 6 | 5 524.000 261.000 30.000 30.000 7 | 6 585.000 261.000 30.000 30.000 8 | 7 640.000 261.000 30.000 30.000 9 | 8 705.000 261.000 30.000 30.000 10 | 9 495.000 380.000 30.000 30.000 11 | 10 193.000 502.000 30.000 30.000 12 | 11 -127.000 383.000 30.000 30.000 13 | 12 -74.000 386.000 30.000 30.000 14 | 13 -31.000 383.000 30.000 30.000 15 | 14 23.000 383.000 30.000 30.000 16 | 15 70.000 381.000 30.000 30.000 17 | 16 131.000 383.000 30.000 30.000 18 | 17 192.000 383.000 30.000 30.000 19 | 18 247.000 383.000 30.000 30.000 20 | 19 312.000 383.000 30.000 30.000 21 | 20 362.000 380.000 30.000 30.000 22 | 21 -44.000 465.000 30.000 30.000 23 | 22 -43.000 503.000 30.000 30.000 24 | 23 -46.000 548.000 30.000 30.000 25 | 24 -47.000 598.000 30.000 30.000 26 | 25 -49.000 641.000 30.000 30.000 27 | 26 -50.000 685.000 30.000 30.000 28 | 27 -50.000 737.000 30.000 30.000 29 | 28 777.000 264.000 30.000 30.000 30 | 29 416.000 260.000 30.000 30.000 31 | 30 534.000 180.000 30.000 30.000 32 | 31 283.000 555.000 30.000 30.000 33 | 32 283.000 733.000 30.000 30.000 34 | 33 859.000 180.000 30.000 30.000 35 | 34 859.000 733.000 30.000 30.000 36 | # 37 | 10 14 38 | 10 11 39 | 3 29 40 | 33 34 41 | 10 24 42 | 10 27 43 | 3 5 44 | 10 25 45 | 0 9 46 | 10 19 47 | 10 26 48 | 1 2 49 | 10 13 50 | 3 4 51 | 10 23 52 | 10 20 53 | 10 21 54 | 2 31 55 | 0 30 56 | 10 12 57 | 0 1 58 | 3 7 59 | 0 3 60 | 10 17 61 | 10 22 62 | 3 28 63 | 2 10 64 | 10 18 65 | 3 8 66 | 10 15 67 | 10 16 68 | 32 31 69 | 3 6 70 | 30 33 71 | 34 32 72 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/lone_node.gml: -------------------------------------------------------------------------------- 1 | Creator "yFiles" 2 | Version "2.12" 3 | graph 4 | [ 5 | hierarchic 1 6 | label "" 7 | directed 1 8 | node 9 | [ 10 | id 0 11 | label "1" 12 | graphics 13 | [ 14 | x 493.0 15 | y 374.0 16 | w 30.0 17 | h 30.0 18 | type "rectangle" 19 | fill "#FFCC00" 20 | outline "#000000" 21 | ] 22 | LabelGraphics 23 | [ 24 | text "1" 25 | fontSize 12 26 | fontName "Dialog" 27 | model "null" 28 | ] 29 | ] 30 | ] 31 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/lone_node.tglf: -------------------------------------------------------------------------------- 1 | 0 493.000 374.000 30.000 30.000 2 | # 3 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/nearalign01.tglf: -------------------------------------------------------------------------------- 1 | 0 576.000 481.000 30.000 30.000 2 | 1 584.000 418.000 30.000 30.000 3 | 2 592.000 360.000 30.000 30.000 4 | 3 597.000 316.000 30.000 30.000 5 | 4 601.000 267.000 30.000 30.000 6 | # 7 | 1 2 8 | 3 4 9 | 0 1 10 | 2 3 11 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/octogon.tglf: -------------------------------------------------------------------------------- 1 | 0 718.000 196.000 30.000 30.000 2 | 1 860.000 254.000 30.000 30.000 3 | 2 923.000 388.000 30.000 30.000 4 | 3 870.000 524.000 30.000 30.000 5 | 4 714.000 592.000 30.000 30.000 6 | 5 575.000 534.000 30.000 30.000 7 | 6 484.000 388.000 30.000 30.000 8 | 7 582.000 261.000 30.000 30.000 9 | # 10 | 7 0 11 | 1 2 12 | 6 7 13 | 5 6 14 | 2 3 15 | 4 5 16 | 0 1 17 | 3 4 18 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/readconstraints.tglf: -------------------------------------------------------------------------------- 1 | 0 0 0 30 30 2 | 1 100 100 30 30 3 | 2 200 200 30 30 4 | 3 300 300 30 30 5 | # 6 | # 7 | 0 1 B E >= 30 8 | 1 2 C U == 60 9 | 3 2 B R >= 0 10 | 11 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/rotate01.gml: -------------------------------------------------------------------------------- 1 | Creator "yFiles" 2 | Version "2.12" 3 | graph 4 | [ 5 | hierarchic 1 6 | label "" 7 | directed 1 8 | node 9 | [ 10 | id 0 11 | label "1" 12 | graphics 13 | [ 14 | x 426.0 15 | y 171.5 16 | w 30.0 17 | h 87.0 18 | type "rectangle" 19 | fill "#FFCC00" 20 | outline "#000000" 21 | ] 22 | LabelGraphics 23 | [ 24 | text "1" 25 | fontSize 12 26 | fontName "Dialog" 27 | anchor "c" 28 | ] 29 | ] 30 | node 31 | [ 32 | id 1 33 | label "2" 34 | graphics 35 | [ 36 | x 522.5 37 | y 200.0 38 | w 127.0 39 | h 30.0 40 | type "rectangle" 41 | fill "#FFCC00" 42 | outline "#000000" 43 | ] 44 | LabelGraphics 45 | [ 46 | text "2" 47 | fontSize 12 48 | fontName "Dialog" 49 | anchor "c" 50 | ] 51 | ] 52 | node 53 | [ 54 | id 2 55 | label "3" 56 | graphics 57 | [ 58 | x 450.0 59 | y 325.5 60 | w 98.0 61 | h 87.0 62 | type "rectangle" 63 | fill "#FFCC00" 64 | outline "#000000" 65 | ] 66 | LabelGraphics 67 | [ 68 | text "3" 69 | fontSize 12 70 | fontName "Dialog" 71 | anchor "c" 72 | ] 73 | ] 74 | edge 75 | [ 76 | source 0 77 | target 2 78 | graphics 79 | [ 80 | fill "#000000" 81 | targetArrow "standard" 82 | ] 83 | ] 84 | edge 85 | [ 86 | source 1 87 | target 2 88 | graphics 89 | [ 90 | fill "#000000" 91 | targetArrow "standard" 92 | ] 93 | ] 94 | edge 95 | [ 96 | source 0 97 | target 1 98 | graphics 99 | [ 100 | fill "#000000" 101 | targetArrow "standard" 102 | ] 103 | ] 104 | ] 105 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/rotate01.tglf: -------------------------------------------------------------------------------- 1 | 0 426.000 171.000 30.000 87.000 2 | 1 522.000 200.000 127.000 30.000 3 | 2 450.000 325.000 98.000 87.000 4 | # 5 | 0 2 6 | 0 1 7 | 1 2 8 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/rotate02.gml: -------------------------------------------------------------------------------- 1 | Creator "yFiles" 2 | Version "2.12" 3 | graph 4 | [ 5 | hierarchic 1 6 | label "" 7 | directed 1 8 | node 9 | [ 10 | id 0 11 | label "1" 12 | graphics 13 | [ 14 | x 377.5 15 | y 200.0 16 | w 127.0 17 | h 30.0 18 | type "rectangle" 19 | fill "#FFCC00" 20 | outline "#000000" 21 | ] 22 | LabelGraphics 23 | [ 24 | text "1" 25 | fontSize 12 26 | fontName "Dialog" 27 | anchor "c" 28 | ] 29 | ] 30 | node 31 | [ 32 | id 1 33 | label "2" 34 | graphics 35 | [ 36 | x 522.5 37 | y 200.0 38 | w 127.0 39 | h 30.0 40 | type "rectangle" 41 | fill "#FFCC00" 42 | outline "#000000" 43 | ] 44 | LabelGraphics 45 | [ 46 | text "2" 47 | fontSize 12 48 | fontName "Dialog" 49 | anchor "c" 50 | ] 51 | ] 52 | node 53 | [ 54 | id 2 55 | label "3" 56 | graphics 57 | [ 58 | x 450.0 59 | y 325.5 60 | w 98.0 61 | h 87.0 62 | type "rectangle" 63 | fill "#FFCC00" 64 | outline "#000000" 65 | ] 66 | LabelGraphics 67 | [ 68 | text "3" 69 | fontSize 12 70 | fontName "Dialog" 71 | anchor "c" 72 | ] 73 | ] 74 | edge 75 | [ 76 | source 0 77 | target 2 78 | graphics 79 | [ 80 | fill "#000000" 81 | targetArrow "standard" 82 | ] 83 | ] 84 | edge 85 | [ 86 | source 1 87 | target 2 88 | graphics 89 | [ 90 | fill "#000000" 91 | targetArrow "standard" 92 | ] 93 | ] 94 | edge 95 | [ 96 | source 0 97 | target 1 98 | graphics 99 | [ 100 | fill "#000000" 101 | targetArrow "standard" 102 | ] 103 | ] 104 | ] 105 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/rotate02.tglf: -------------------------------------------------------------------------------- 1 | 0 377.000 200.000 127.000 30.000 2 | 1 522.000 200.000 127.000 30.000 3 | 2 450.000 325.000 98.000 87.000 4 | # 5 | 1 2 6 | 0 2 7 | 0 1 8 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/routing01.tglf: -------------------------------------------------------------------------------- 1 | 0 452.000 259.000 30.000 30.000 2 | 1 482.000 259.000 30.000 30.000 3 | 2 467.000 310.000 30.000 30.000 4 | 3 467.000 208.000 30.000 30.000 5 | 4 661.000 259.000 79.000 30.000 6 | 5 739.000 259.000 90.000 30.000 7 | 6 701.000 310.000 30.000 30.000 8 | 7 701.000 208.000 30.000 30.000 9 | # 10 | 2 3 11 | 6 4 12 | 2 0 13 | 6 7 14 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/samesiderouting.gml: -------------------------------------------------------------------------------- 1 | Creator "yFiles" 2 | Version "2.12" 3 | graph 4 | [ 5 | hierarchic 1 6 | label "" 7 | directed 1 8 | node 9 | [ 10 | id 0 11 | label "1" 12 | graphics 13 | [ 14 | x 426.0 15 | y 200.0 16 | w 30.0 17 | h 30.0 18 | type "rectangle" 19 | fill "#FFCC00" 20 | outline "#000000" 21 | ] 22 | LabelGraphics 23 | [ 24 | text "1" 25 | fontSize 12 26 | fontName "Dialog" 27 | model "null" 28 | ] 29 | ] 30 | node 31 | [ 32 | id 1 33 | label "2" 34 | graphics 35 | [ 36 | x 474.0 37 | y 200.0 38 | w 30.0 39 | h 30.0 40 | type "rectangle" 41 | fill "#FFCC00" 42 | outline "#000000" 43 | ] 44 | LabelGraphics 45 | [ 46 | text "2" 47 | fontSize 12 48 | fontName "Dialog" 49 | model "null" 50 | ] 51 | ] 52 | node 53 | [ 54 | id 2 55 | label "3" 56 | graphics 57 | [ 58 | x 450.0 59 | y 325.5 60 | w 98.0 61 | h 87.0 62 | type "rectangle" 63 | fill "#FFCC00" 64 | outline "#000000" 65 | ] 66 | LabelGraphics 67 | [ 68 | text "3" 69 | fontSize 12 70 | fontName "Dialog" 71 | model "null" 72 | ] 73 | ] 74 | edge 75 | [ 76 | source 0 77 | target 2 78 | graphics 79 | [ 80 | fill "#000000" 81 | targetArrow "standard" 82 | ] 83 | ] 84 | edge 85 | [ 86 | source 1 87 | target 2 88 | graphics 89 | [ 90 | fill "#000000" 91 | targetArrow "standard" 92 | ] 93 | ] 94 | edge 95 | [ 96 | source 0 97 | target 1 98 | graphics 99 | [ 100 | fill "#000000" 101 | targetArrow "standard" 102 | ] 103 | ] 104 | ] 105 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/samesiderouting.tglf: -------------------------------------------------------------------------------- 1 | 0 426.000 200.000 30.000 30.000 2 | 1 474.000 200.000 30.000 30.000 3 | 2 450.000 325.000 98.000 87.000 4 | # 5 | 0 1 6 | 1 2 7 | 0 2 8 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/straight_6.tglf: -------------------------------------------------------------------------------- 1 | 0 405.000 469.000 30.000 30.000 2 | 1 522.000 420.000 30.000 30.000 3 | 2 647.000 366.000 30.000 30.000 4 | 3 761.000 324.000 30.000 30.000 5 | 4 876.000 254.000 30.000 30.000 6 | 5 1013.000 197.000 30.000 30.000 7 | # 8 | 4 5 9 | 0 1 10 | 3 4 11 | 2 3 12 | 1 2 13 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/treeplacement2.tglf: -------------------------------------------------------------------------------- 1 | 0 546.000 319.000 30.000 30.000 2 | 1 742.000 319.000 30.000 30.000 3 | 2 546.000 529.000 30.000 30.000 4 | 3 742.000 529.000 30.000 30.000 5 | 4 481.000 249.000 30.000 30.000 6 | 5 397.000 218.000 30.000 30.000 7 | 6 436.000 182.000 30.000 30.000 8 | 7 795.000 245.000 30.000 30.000 9 | 8 777.000 173.000 30.000 30.000 10 | 9 842.000 199.000 30.000 30.000 11 | 10 883.000 249.000 30.000 30.000 12 | 11 855.000 324.000 30.000 30.000 13 | 12 922.000 324.000 30.000 30.000 14 | # 15 | 11 12 16 | 7 9 17 | 0 1 18 | 7 8 19 | 4 6 20 | 1 11 21 | 4 5 22 | 1 3 23 | 0 4 24 | 1 7 25 | 3 2 26 | 2 0 27 | 7 10 28 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/treeplacement3.tglf: -------------------------------------------------------------------------------- 1 | 0 546.000 319.000 30.000 30.000 2 | 1 742.000 319.000 30.000 30.000 3 | 2 546.000 529.000 30.000 30.000 4 | 3 742.000 529.000 30.000 30.000 5 | 4 481.000 249.000 30.000 30.000 6 | 5 397.000 218.000 30.000 30.000 7 | 6 436.000 182.000 30.000 30.000 8 | 7 397.000 319.000 30.000 30.000 9 | 8 397.000 529.000 30.000 30.000 10 | 9 905.000 319.000 30.000 30.000 11 | 10 905.000 529.000 30.000 30.000 12 | 11 957.000 238.000 30.000 30.000 13 | # 14 | 2 8 15 | 4 6 16 | 0 1 17 | 0 4 18 | 1 3 19 | 4 5 20 | 7 0 21 | 10 3 22 | 1 9 23 | 3 2 24 | 8 7 25 | 9 11 26 | 9 10 27 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/treeplacement4.tglf: -------------------------------------------------------------------------------- 1 | 0 546.000 319.000 30.000 30.000 2 | 1 742.000 319.000 30.000 30.000 3 | 2 546.000 529.000 30.000 30.000 4 | 3 742.000 529.000 30.000 30.000 5 | 4 481.000 249.000 30.000 30.000 6 | 5 397.000 218.000 30.000 30.000 7 | 6 436.000 182.000 30.000 30.000 8 | 7 397.000 319.000 30.000 30.000 9 | 8 397.000 529.000 30.000 30.000 10 | 9 905.000 319.000 30.000 30.000 11 | 10 905.000 529.000 30.000 30.000 12 | 11 957.000 238.000 30.000 30.000 13 | 12 300.000 203.000 30.000 30.000 14 | 13 330.000 155.000 30.000 30.000 15 | 14 379.000 113.000 30.000 30.000 16 | 15 553.000 228.000 30.000 30.000 17 | 16 549.000 160.000 30.000 30.000 18 | 17 506.000 99.000 30.000 30.000 19 | 18 558.000 90.000 30.000 30.000 20 | 19 617.000 90.000 30.000 30.000 21 | 20 427.000 93.000 30.000 30.000 22 | 21 486.000 149.000 30.000 30.000 23 | 22 560.000 31.000 30.000 30.000 24 | # 25 | 15 16 26 | 3 2 27 | 0 1 28 | 4 5 29 | 5 13 30 | 6 14 31 | 2 8 32 | 7 0 33 | 16 19 34 | 18 22 35 | 0 15 36 | 16 18 37 | 1 9 38 | 1 3 39 | 5 12 40 | 15 21 41 | 9 10 42 | 0 4 43 | 6 20 44 | 9 11 45 | 16 17 46 | 4 6 47 | 8 7 48 | 10 3 49 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/special/treeplacement5.tglf: -------------------------------------------------------------------------------- 1 | 0 546.000 319.000 30.000 30.000 2 | 1 742.000 319.000 30.000 30.000 3 | 2 546.000 529.000 30.000 30.000 4 | 3 742.000 529.000 30.000 30.000 5 | 4 481.000 249.000 30.000 30.000 6 | 5 397.000 218.000 30.000 30.000 7 | 6 436.000 182.000 30.000 30.000 8 | 7 397.000 319.000 30.000 30.000 9 | 8 397.000 529.000 30.000 30.000 10 | 9 905.000 319.000 30.000 30.000 11 | 10 905.000 529.000 30.000 30.000 12 | 11 957.000 238.000 30.000 30.000 13 | 12 300.000 203.000 30.000 30.000 14 | 13 330.000 155.000 30.000 30.000 15 | 14 379.000 113.000 30.000 30.000 16 | 15 553.000 228.000 30.000 30.000 17 | 16 549.000 160.000 30.000 30.000 18 | 17 506.000 99.000 30.000 30.000 19 | 18 558.000 90.000 30.000 30.000 20 | 19 617.000 90.000 30.000 30.000 21 | 20 427.000 93.000 30.000 30.000 22 | 21 486.000 149.000 30.000 30.000 23 | 22 560.000 31.000 30.000 30.000 24 | 23 884.000 239.000 30.000 30.000 25 | 24 828.000 237.000 30.000 30.000 26 | 25 1024.000 233.000 30.000 30.000 27 | 26 1091.000 229.000 30.000 30.000 28 | 27 770.000 233.000 30.000 30.000 29 | 28 705.000 235.000 30.000 30.000 30 | 29 1155.000 226.000 30.000 30.000 31 | # 32 | 9 23 33 | 9 29 34 | 9 26 35 | 1 3 36 | 9 25 37 | 16 17 38 | 15 16 39 | 0 1 40 | 8 7 41 | 0 4 42 | 15 21 43 | 9 27 44 | 0 15 45 | 4 5 46 | 1 9 47 | 9 10 48 | 7 0 49 | 4 6 50 | 6 20 51 | 2 8 52 | 5 12 53 | 9 28 54 | 9 24 55 | 9 11 56 | 16 18 57 | 5 13 58 | 18 22 59 | 6 14 60 | 3 2 61 | 16 19 62 | 10 3 63 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/trees/tree01.tglf: -------------------------------------------------------------------------------- 1 | 0 501.000 232.000 30.000 30.000 2 | 1 455.000 306.000 30.000 30.000 3 | 2 588.000 303.000 30.000 30.000 4 | 3 518.000 386.000 30.000 30.000 5 | 4 658.000 385.000 30.000 30.000 6 | 5 593.000 386.000 30.000 30.000 7 | 6 593.000 471.000 30.000 30.000 8 | 7 597.000 543.000 30.000 30.000 9 | 8 517.000 463.000 30.000 30.000 10 | 9 501.000 603.000 30.000 30.000 11 | 10 558.000 602.000 30.000 30.000 12 | 11 623.000 602.000 30.000 30.000 13 | 12 687.000 606.000 30.000 30.000 14 | # 15 | 2 4 16 | 7 9 17 | 7 12 18 | 0 1 19 | 3 8 20 | 2 5 21 | 2 3 22 | 7 10 23 | 0 2 24 | 7 11 25 | 6 7 26 | 5 6 27 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/trees/tree01m.tglf: -------------------------------------------------------------------------------- 1 | 0 501.000 232.000 30.000 30.000 2 | 1 176.000 181.000 30.000 30.000 3 | 2 735.000 119.000 30.000 30.000 4 | 3 359.000 370.000 30.000 30.000 5 | 4 696.000 46.000 30.000 30.000 6 | 5 593.000 386.000 30.000 30.000 7 | 6 747.000 471.000 30.000 30.000 8 | 7 597.000 543.000 30.000 30.000 9 | 8 285.000 313.000 30.000 30.000 10 | 9 533.000 437.000 30.000 30.000 11 | 10 366.000 543.000 30.000 30.000 12 | 11 801.000 594.000 30.000 30.000 13 | 12 715.000 362.000 30.000 30.000 14 | # 15 | 0 2 16 | 7 9 17 | 3 8 18 | 2 4 19 | 7 12 20 | 5 6 21 | 7 10 22 | 6 7 23 | 0 1 24 | 2 3 25 | 2 5 26 | 7 11 27 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/trees/tree02.tglf: -------------------------------------------------------------------------------- 1 | 0 489.000 147.000 30.000 30.000 2 | 1 441.000 210.000 30.000 30.000 3 | 2 527.000 209.000 30.000 30.000 4 | 3 354.000 213.000 30.000 30.000 5 | 4 352.000 287.000 30.000 30.000 6 | 5 258.000 207.000 30.000 30.000 7 | 6 260.000 297.000 30.000 30.000 8 | 7 260.000 388.000 30.000 30.000 9 | 8 613.000 199.000 30.000 30.000 10 | 9 614.000 267.000 30.000 30.000 11 | 10 715.000 199.000 30.000 30.000 12 | 11 717.000 267.000 30.000 30.000 13 | 12 721.000 403.000 30.000 30.000 14 | # 15 | 0 10 16 | 0 5 17 | 0 3 18 | 0 2 19 | 8 9 20 | 0 1 21 | 5 6 22 | 11 12 23 | 0 8 24 | 3 4 25 | 10 11 26 | 6 7 27 | -------------------------------------------------------------------------------- /cola/libdialect/tests/graphs/trees/tree03.tglf: -------------------------------------------------------------------------------- 1 | 0 530.000 83.000 30.000 30.000 2 | 1 311.000 156.000 30.000 30.000 3 | 2 403.000 156.000 30.000 30.000 4 | 3 529.000 158.000 30.000 30.000 5 | 4 683.000 162.000 30.000 30.000 6 | 5 847.000 165.000 30.000 30.000 7 | 6 304.000 222.000 30.000 30.000 8 | 7 858.000 228.000 30.000 30.000 9 | 8 499.000 251.000 30.000 30.000 10 | 9 580.000 250.000 30.000 30.000 11 | 10 493.000 321.000 30.000 30.000 12 | 11 567.000 328.000 30.000 30.000 13 | 12 638.000 328.000 30.000 30.000 14 | 13 714.000 332.000 30.000 30.000 15 | # 16 | 0 5 17 | 0 2 18 | 3 9 19 | 0 4 20 | 0 3 21 | 9 12 22 | 9 13 23 | 5 7 24 | 1 6 25 | 0 1 26 | 3 8 27 | 8 10 28 | 9 11 29 | -------------------------------------------------------------------------------- /cola/libdialect/tests/hola_arpa.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libdialect/commontypes.h" 26 | #include "libdialect/io.h" 27 | #include "libdialect/util.h" 28 | #include "libdialect/graphs.h" 29 | #include "libdialect/opts.h" 30 | #include "libdialect/logging.h" 31 | #include "libdialect/hola.h" 32 | 33 | using namespace dialect; 34 | 35 | int main(void) { 36 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "special/Arpanet19728_input.tglf"); 37 | HolaOpts opts; 38 | bool debug = false; 39 | if (debug) doHOLA(*graph, opts, new Logger("output/", "hola_arpa_", true, true)); 40 | else doHOLA(*graph, opts); 41 | writeStringToFile(graph->writeTglf(), "output/" "hola_arpa_" "layout.tglf"); 42 | writeStringToFile(graph->writeSvg(), "output/" "svg/" "hola_arpa_" "layout.svg"); 43 | } 44 | -------------------------------------------------------------------------------- /cola/libdialect/tests/hola_belnet.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libdialect/commontypes.h" 26 | #include "libdialect/io.h" 27 | #include "libdialect/util.h" 28 | #include "libdialect/graphs.h" 29 | #include "libdialect/opts.h" 30 | #include "libdialect/logging.h" 31 | #include "libdialect/hola.h" 32 | 33 | using namespace dialect; 34 | 35 | int main(void) { 36 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "special/Belnet2004.tglf"); 37 | HolaOpts opts; 38 | std::string prefix = "hola_belnet_"; 39 | bool debug = false; 40 | if (debug) doHOLA(*graph, opts, new Logger("output/", prefix, true, true)); 41 | else doHOLA(*graph, opts); 42 | writeStringToFile(graph->writeTglf(), "output/" + prefix + "layout.tglf"); 43 | writeStringToFile(graph->writeSvg(), "output/" "svg/" + prefix + "layout.svg"); 44 | } 45 | -------------------------------------------------------------------------------- /cola/libdialect/tests/hola_cernet.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libdialect/commontypes.h" 26 | #include "libdialect/io.h" 27 | #include "libdialect/util.h" 28 | #include "libdialect/graphs.h" 29 | #include "libdialect/opts.h" 30 | #include "libdialect/logging.h" 31 | #include "libdialect/hola.h" 32 | 33 | using namespace dialect; 34 | 35 | int main(void) { 36 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "special/Cernet.tglf"); 37 | HolaOpts opts; 38 | std::string prefix = "hola_cernet_"; 39 | bool debug = false; 40 | if (debug) doHOLA(*graph, opts, new Logger("output/", prefix, true, true)); 41 | else doHOLA(*graph, opts); 42 | writeStringToFile(graph->writeTglf(), "output/" + prefix + "layout.tglf"); 43 | writeStringToFile(graph->writeSvg(), "output/" "svg/" + prefix + "layout.svg"); 44 | } 45 | -------------------------------------------------------------------------------- /cola/libdialect/tests/hola_claranet.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libdialect/commontypes.h" 26 | #include "libdialect/io.h" 27 | #include "libdialect/util.h" 28 | #include "libdialect/graphs.h" 29 | #include "libdialect/opts.h" 30 | #include "libdialect/logging.h" 31 | #include "libdialect/hola.h" 32 | 33 | using namespace dialect; 34 | 35 | int main(void) { 36 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "special/Claranet.tglf"); 37 | HolaOpts opts; 38 | std::string prefix = "hola_claranet_"; 39 | bool debug = false; 40 | if (debug) doHOLA(*graph, opts, new Logger("output/", prefix, true, true)); 41 | else doHOLA(*graph, opts); 42 | writeStringToFile(graph->writeTglf(), "output/" + prefix + "layout.tglf"); 43 | writeStringToFile(graph->writeSvg(), "output/" "svg/" + prefix + "layout.svg"); 44 | } 45 | -------------------------------------------------------------------------------- /cola/libdialect/tests/hola_garr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libdialect/commontypes.h" 26 | #include "libdialect/io.h" 27 | #include "libdialect/util.h" 28 | #include "libdialect/graphs.h" 29 | #include "libdialect/opts.h" 30 | #include "libdialect/logging.h" 31 | #include "libdialect/hola.h" 32 | 33 | using namespace dialect; 34 | 35 | int main(void) { 36 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "special/Garr201001.tglf"); 37 | HolaOpts opts; 38 | std::string prefix = "hola_garr_"; 39 | bool debug = false; 40 | if (debug) doHOLA(*graph, opts, new Logger("output/", prefix, true, true)); 41 | else doHOLA(*graph, opts); 42 | writeStringToFile(graph->writeTglf(), "output/" + prefix + "layout.tglf"); 43 | writeStringToFile(graph->writeSvg(), "output/" "svg/" + prefix + "layout.svg"); 44 | } 45 | -------------------------------------------------------------------------------- /cola/libdialect/tests/hola_janetlense.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libdialect/commontypes.h" 26 | #include "libdialect/io.h" 27 | #include "libdialect/util.h" 28 | #include "libdialect/graphs.h" 29 | #include "libdialect/opts.h" 30 | #include "libdialect/logging.h" 31 | #include "libdialect/hola.h" 32 | 33 | using namespace dialect; 34 | 35 | int main(void) { 36 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "special/Janetlense.tglf"); 37 | HolaOpts opts; 38 | std::string prefix = "hola_janetlense_"; 39 | bool debug = false; 40 | if (debug) doHOLA(*graph, opts, new Logger("output/", prefix, true, true)); 41 | else doHOLA(*graph, opts); 42 | writeStringToFile(graph->writeTglf(), "output/" + prefix + "layout.tglf"); 43 | writeStringToFile(graph->writeSvg(), "output/" "svg/" + prefix + "layout.svg"); 44 | } 45 | -------------------------------------------------------------------------------- /cola/libdialect/tests/hola_slovakia.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libdialect/commontypes.h" 26 | #include "libdialect/io.h" 27 | #include "libdialect/util.h" 28 | #include "libdialect/graphs.h" 29 | #include "libdialect/opts.h" 30 | #include "libdialect/logging.h" 31 | #include "libdialect/hola.h" 32 | 33 | using namespace dialect; 34 | 35 | int main(void) { 36 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "special/GtsSlovakia_input.tglf"); 37 | HolaOpts opts; 38 | std::string prefix = "hola_slovakia_"; 39 | bool debug = false; 40 | if (debug) doHOLA(*graph, opts, new Logger("output/", prefix, true, true)); 41 | else doHOLA(*graph, opts); 42 | writeStringToFile(graph->writeTglf(), "output/" + prefix + "layout.tglf"); 43 | writeStringToFile(graph->writeSvg(), "output/" "svg/" + prefix + "layout.svg"); 44 | } 45 | -------------------------------------------------------------------------------- /cola/libdialect/tests/hola_tree.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libdialect/commontypes.h" 26 | #include "libdialect/io.h" 27 | #include "libdialect/util.h" 28 | #include "libdialect/graphs.h" 29 | #include "libdialect/opts.h" 30 | #include "libdialect/logging.h" 31 | #include "libdialect/hola.h" 32 | 33 | using namespace dialect; 34 | 35 | int main(void) { 36 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "trees/tree02.tglf"); 37 | HolaOpts opts; 38 | //opts.routingAbs_nudgingDistance = 10; 39 | std::string prefix = "hola_tree02_"; 40 | bool debug = false; 41 | if (debug) doHOLA(*graph, opts, new Logger("output/", prefix, true, true)); 42 | else doHOLA(*graph, opts); 43 | writeStringToFile(graph->writeTglf(), "output/" + prefix + "layout.tglf"); 44 | writeStringToFile(graph->writeSvg(), "output/" "svg/" + prefix + "layout.svg"); 45 | } 46 | -------------------------------------------------------------------------------- /cola/libdialect/tests/holalonenode.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include 26 | #include 27 | 28 | #include "libdialect/commontypes.h" 29 | #include "libdialect/io.h" 30 | #include "libdialect/util.h" 31 | #include "libdialect/graphs.h" 32 | #include "libdialect/opts.h" 33 | #include "libdialect/logging.h" 34 | #include "libdialect/hola.h" 35 | 36 | using namespace dialect; 37 | 38 | using std::vector; 39 | using std::string; 40 | 41 | int main(void) { 42 | 43 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "special/lone_node.tglf"); 44 | HolaOpts opts; 45 | bool debug = false; 46 | if (debug) doHOLA(*graph, opts, new Logger("output/", "holalonenode_", true, true)); 47 | else doHOLA(*graph, opts); 48 | writeStringToFile(graph->writeTglf(), "output/" "holalonenode_" "layout.tglf"); 49 | 50 | } 51 | -------------------------------------------------------------------------------- /cola/libdialect/tests/holametro01.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libdialect/commontypes.h" 26 | #include "libdialect/io.h" 27 | #include "libdialect/util.h" 28 | #include "libdialect/graphs.h" 29 | #include "libdialect/opts.h" 30 | #include "libdialect/logging.h" 31 | #include "libdialect/hola.h" 32 | 33 | using namespace dialect; 34 | 35 | int main(void) { 36 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "metro/sydney.tglf"); 37 | HolaOpts opts; 38 | bool debug = false; 39 | if (debug) doHOLA(*graph, opts, new Logger("output/", "holametro01_", true, true)); 40 | else doHOLA(*graph, opts); 41 | writeStringToFile(graph->writeTglf(), "output/" "holametro01_" "layout.tglf"); 42 | writeStringToFile(graph->writeSvg(), "output/" "svg/" "holametro01_" "layout.svg"); 43 | } 44 | -------------------------------------------------------------------------------- /cola/libdialect/tests/holasbgn01.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libdialect/commontypes.h" 26 | #include "libdialect/io.h" 27 | #include "libdialect/util.h" 28 | #include "libdialect/graphs.h" 29 | #include "libdialect/opts.h" 30 | #include "libdialect/logging.h" 31 | #include "libdialect/hola.h" 32 | 33 | using namespace dialect; 34 | 35 | int main(void) { 36 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "sbgn/glyco.tglf"); 37 | HolaOpts opts; 38 | bool debug = false; 39 | if (debug) doHOLA(*graph, opts, new Logger("output/", "holasbgn01_", true, true)); 40 | else doHOLA(*graph, opts); 41 | writeStringToFile(graph->writeTglf(), "output/" "holasbgn01_" "layout.tglf"); 42 | writeStringToFile(graph->writeSvg(), "output/" "svg/" "holasbgn01_" "layout.svg"); 43 | } 44 | -------------------------------------------------------------------------------- /cola/libdialect/tests/holasbgn02.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libdialect/commontypes.h" 26 | #include "libdialect/io.h" 27 | #include "libdialect/util.h" 28 | #include "libdialect/graphs.h" 29 | #include "libdialect/opts.h" 30 | #include "libdialect/logging.h" 31 | #include "libdialect/hola.h" 32 | 33 | using namespace dialect; 34 | 35 | int main(void) { 36 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "sbgn/calvin.tglf"); 37 | HolaOpts opts; 38 | bool debug = false; 39 | if (debug) doHOLA(*graph, opts, new Logger("output/", "holasbgn02_", true, true)); 40 | else doHOLA(*graph, opts); 41 | writeStringToFile(graph->writeTglf(), "output/" "holasbgn02_" "layout.tglf"); 42 | writeStringToFile(graph->writeSvg(), "output/" "svg/" "holasbgn02_" "layout.svg"); 43 | } 44 | -------------------------------------------------------------------------------- /cola/libdialect/tests/holasbgn03.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libdialect/commontypes.h" 26 | #include "libdialect/io.h" 27 | #include "libdialect/util.h" 28 | #include "libdialect/graphs.h" 29 | #include "libdialect/opts.h" 30 | #include "libdialect/logging.h" 31 | #include "libdialect/hola.h" 32 | 33 | using namespace dialect; 34 | 35 | int main(void) { 36 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "sbgn/urea1.tglf"); 37 | HolaOpts opts; 38 | bool debug = false; 39 | if (debug) doHOLA(*graph, opts, new Logger("output/", "holasbgn03_", true, true)); 40 | else doHOLA(*graph, opts); 41 | writeStringToFile(graph->writeTglf(), "output/" "holasbgn03_" "layout.tglf"); 42 | writeStringToFile(graph->writeSvg(), "output/" "svg/" "holasbgn03_" "layout.svg"); 43 | } 44 | -------------------------------------------------------------------------------- /cola/libdialect/tests/holasbgn04.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libdialect/commontypes.h" 26 | #include "libdialect/io.h" 27 | #include "libdialect/util.h" 28 | #include "libdialect/graphs.h" 29 | #include "libdialect/opts.h" 30 | #include "libdialect/logging.h" 31 | #include "libdialect/hola.h" 32 | 33 | using namespace dialect; 34 | 35 | int main(void) { 36 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "sbgn/keratan.tglf"); 37 | HolaOpts opts; 38 | bool debug = false; 39 | if (debug) doHOLA(*graph, opts, new Logger("output/", "holasbgn04_", true, true)); 40 | else doHOLA(*graph, opts); 41 | writeStringToFile(graph->writeTglf(), "output/" "holasbgn04_" "layout.tglf"); 42 | writeStringToFile(graph->writeSvg(), "output/" "svg/" "holasbgn04_" "layout.svg"); 43 | } 44 | -------------------------------------------------------------------------------- /cola/libdialect/tests/lookupqas.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | #include "libdialect/quadaction.h" 30 | 31 | using std::vector; 32 | using std::string; 33 | using std::cout; 34 | using std::endl; 35 | using dialect::lookupQuadActions; 36 | 37 | int main(void) { 38 | 39 | vector qas = lookupQuadActions(2, 2, 2, 2, 15); 40 | cout << "Number of QAs: " << qas.size() << endl; 41 | for (auto s : qas) { 42 | cout << s << endl; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /cola/libdialect/tests/nodeconfig01.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include 26 | 27 | #include "libvpsc/assertions.h" 28 | 29 | #include "libdialect/commontypes.h" 30 | #include "libdialect/io.h" 31 | #include "libdialect/graphs.h" 32 | #include "libdialect/peeling.h" 33 | #include "libdialect/util.h" 34 | #include "libdialect/nodeconfig.h" 35 | 36 | using namespace dialect; 37 | 38 | using std::vector; 39 | 40 | int main(void) { 41 | 42 | // Obtain the core of a graph. 43 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "special/core_with_trees.tglf"); 44 | peel(*graph); 45 | // Do an OrthoHub layout on the core. 46 | OrthoHubLayoutOptions ohl_opts; 47 | OrthoHubLayout ohl(graph, ohl_opts); 48 | ohl.layout(); 49 | // Write out. 50 | writeStringToFile(graph->writeTglf(), "output/" "nodeconfig01_" "core.tglf"); 51 | return 0; 52 | } 53 | -------------------------------------------------------------------------------- /cola/libdialect/tests/output/README.txt: -------------------------------------------------------------------------------- 1 | This directory is used for output from the test cases. 2 | -------------------------------------------------------------------------------- /cola/libdialect/tests/output/svg/README.txt: -------------------------------------------------------------------------------- 1 | This directory is used for output from the test cases. 2 | -------------------------------------------------------------------------------- /cola/libdialect/tests/readconstraints.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libvpsc/assertions.h" 26 | #include "libvpsc/rectangle.h" 27 | 28 | #include "libdialect/io.h" 29 | #include "libdialect/graphs.h" 30 | 31 | using namespace dialect; 32 | 33 | int main(void) { 34 | 35 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "special/readconstraints.tglf"); 36 | writeStringToFile(graph->writeTglf(), "output/" "readconstraints_" "00_initial.tglf"); 37 | ColaOptions opts; 38 | graph->project(opts, vpsc::XDIM); 39 | graph->project(opts, vpsc::YDIM); 40 | writeStringToFile(graph->writeTglf(), "output/" "readconstraints_" "01_projection.tglf"); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /cola/libdialect/tests/routing01.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libavoid/libavoid.h" 26 | 27 | #include "libdialect/commontypes.h" 28 | #include "libdialect/io.h" 29 | #include "libdialect/graphs.h" 30 | #include "libdialect/util.h" 31 | #include "libdialect/routing.h" 32 | 33 | using namespace dialect; 34 | 35 | int main(void) { 36 | 37 | // Test that libavoid will route in between nodes that are touching, but 38 | // not if they are overlapping. 39 | 40 | Graph_SP graph = buildGraphFromTglfFile("graphs/" "special/routing01.tglf"); 41 | 42 | RoutingAdapter ra(Avoid::OrthogonalRouting); 43 | ra.addNodes(graph->getNodeLookup()); 44 | ra.addEdges(graph->getEdgeLookup()); 45 | ra.route(); 46 | 47 | writeStringToFile(graph->writeTglf(), "output/" "routing01_" "routed.tglf"); 48 | 49 | return 0; 50 | } 51 | -------------------------------------------------------------------------------- /cola/libdialect/tests/swig_tests/aca.py: -------------------------------------------------------------------------------- 1 | from pkg.adaptagrams import * 2 | 3 | # Build a graph. 4 | g = buildGraphFromTglfFile("../graphs/random/v30e33.tglf") 5 | # Do ACA layout. 6 | aca = ACALayout(g) 7 | aca.layout() 8 | aca.updateGraph() 9 | # Record the layout. 10 | with open('./output/aca.tglf', 'w') as f: f.write(g.writeTglf()) 11 | with open('./output/svg/aca.svg', 'w') as f: f.write(g.writeSvg()) 12 | 13 | -------------------------------------------------------------------------------- /cola/libdialect/tests/swig_tests/chainconfig.py: -------------------------------------------------------------------------------- 1 | from pkg.adaptagrams import * 2 | 3 | g = buildGraphFromTglfFile("../graphs/special/chainconfig01.tglf") 4 | g.getSepMatrix().setCardinalOP(0, 1, CardinalDir_SOUTH) 5 | g.getSepMatrix().setCardinalOP(16, 15, CardinalDir_NORTH) 6 | chains = buildAllChainsInGraph(g) 7 | chain = chains[0] 8 | chain.takeShapeBasedConfiguration() 9 | opts = ColaOptions() 10 | g.project(opts, XDIM) 11 | g.project(opts, YDIM) 12 | g.destress() 13 | with open('./output/chainconfig.tglf', 'w') as f: f.write(g.writeTglf()) 14 | 15 | -------------------------------------------------------------------------------- /cola/libdialect/tests/swig_tests/destress_aca.py: -------------------------------------------------------------------------------- 1 | from pkg.adaptagrams import * 2 | 3 | g = buildGraphFromTglfFile("../graphs/special/X_4.tglf") 4 | #print g.getMaxDegree() 5 | #print g.getNumNodes() 6 | aca = ACALayout(g) 7 | aca.layout() 8 | g.updateNodesFromRects() 9 | aca.updateSepMatrix() 10 | t1 = g.writeTglf() 11 | with open('./output/X_4_aca.tglf', 'w') as f: 12 | f.write(t1) 13 | 14 | opts = ColaOptions() 15 | g.destress(opts) 16 | t2 = g.writeTglf() 17 | with open('./output/X_4_aca_destress.tglf', 'w') as f: 18 | f.write(t2) 19 | 20 | -------------------------------------------------------------------------------- /cola/libdialect/tests/swig_tests/expand.py: -------------------------------------------------------------------------------- 1 | from pkg.adaptagrams import * 2 | 3 | opts = HolaOpts() 4 | # Build a graph 5 | g = buildGraphFromTglfFile("../graphs/special/expand03.tglf") 6 | # Peel. 7 | trees = peel(g) 8 | # Do an ortho hub layout on the core. 9 | core = g 10 | ohl_opts = OrthoHubLayoutOptions() 11 | ohl = OrthoHubLayout(core, ohl_opts) 12 | ohl.layout() 13 | # Give the trees their symmetric layout. 14 | iel = g.getIEL() 15 | for tree in trees: 16 | tree.symmetricLayout(CardinalDir_EAST, iel/4.0, iel, opts.preferConvexTrees) 17 | # Do an ortho routing and planarise the core. 18 | opts.routingScalar_shapeBufferDistance = 1/8.0 19 | lor = LeaflessOrthoRouter(core, opts) 20 | lor.route() 21 | op = OrthoPlanariser(core) 22 | P = op.planarise() 23 | # Reattach trees. 24 | reattachTrees(P, trees, opts) 25 | # Write output. 26 | t = P.writeTglf() 27 | with open('./output/expand.tglf', 'w') as f: 28 | f.write(t) 29 | 30 | -------------------------------------------------------------------------------- /cola/libdialect/tests/swig_tests/faceset.py: -------------------------------------------------------------------------------- 1 | from pkg.adaptagrams import * 2 | 3 | g = buildGraphFromTglfFile("../graphs/special/bundlecross.tglf") 4 | hola_opts = HolaOpts() 5 | hola_opts.routingScalar_shapeBufferDistance = 1/8.0 6 | lor = LeaflessOrthoRouter(g, hola_opts) 7 | lor.route() 8 | op = OrthoPlanariser(g); 9 | P = op.planarise(); 10 | faceSet = FaceSet(P) 11 | assert faceSet.getNumFaces() == 7 12 | 13 | -------------------------------------------------------------------------------- /cola/libdialect/tests/swig_tests/hola.py: -------------------------------------------------------------------------------- 1 | from pkg.adaptagrams import * 2 | 3 | # Build a graph. 4 | g = buildGraphFromTglfFile("../graphs/random/v30e33.tglf") 5 | # Do HOLA layout. 6 | opts = HolaOpts() 7 | doHOLA(g, opts) 8 | # Record the layout. 9 | with open('./output/hola.tglf', 'w') as f: f.write(g.writeTglf()) 10 | with open('./output/svg/hola.svg', 'w') as f: f.write(g.writeSvg()) 11 | 12 | -------------------------------------------------------------------------------- /cola/libdialect/tests/swig_tests/leafless.py: -------------------------------------------------------------------------------- 1 | from pkg.adaptagrams import * 2 | 3 | g = buildGraphFromTglfFile("../graphs/random/v40e42.tglf") 4 | peel(g) 5 | g.destress() 6 | opts = OrthoHubLayoutOptions() 7 | ohl = OrthoHubLayout(g, opts) 8 | ohl.layout() 9 | hola_opts = HolaOpts() 10 | lor = LeaflessOrthoRouter(g, hola_opts) 11 | lor.route() 12 | t = g.writeTglf() 13 | with open('./output/leaflessroute.tglf', 'w') as f: 14 | f.write(t) 15 | 16 | 17 | -------------------------------------------------------------------------------- /cola/libdialect/tests/swig_tests/nearalign.py: -------------------------------------------------------------------------------- 1 | from pkg.adaptagrams import * 2 | 3 | g = buildGraphFromTglfFile("../graphs/special/nearalign01.tglf") 4 | opts = HolaOpts() 5 | ignore = DialectNodeLookup() 6 | atab = AlignmentTable(g, ignore) 7 | n = doNearAlignments(g, atab, ignore, opts) 8 | assert n == 2 9 | t = g.writeTglf() 10 | with open('./output/nearalign.tglf', 'w') as f: 11 | f.write(t) 12 | 13 | -------------------------------------------------------------------------------- /cola/libdialect/tests/swig_tests/orthohub.py: -------------------------------------------------------------------------------- 1 | from pkg.adaptagrams import * 2 | 3 | g = buildGraphFromTglfFile("../graphs/special/core_with_trees.tglf") 4 | opts = OrthoHubLayoutOptions() 5 | ohl = OrthoHubLayout(g, opts) 6 | ohl.layout() 7 | t = g.writeTglf() 8 | with open('./output/core_with_trees_ohl.tglf', 'w') as f: 9 | f.write(t) 10 | 11 | -------------------------------------------------------------------------------- /cola/libdialect/tests/swig_tests/output/README.txt: -------------------------------------------------------------------------------- 1 | This directory is used for output from the test cases. 2 | -------------------------------------------------------------------------------- /cola/libdialect/tests/swig_tests/output/svg/README.txt: -------------------------------------------------------------------------------- 1 | This directory is used for output from the test cases. 2 | -------------------------------------------------------------------------------- /cola/libdialect/tests/swig_tests/planarise.py: -------------------------------------------------------------------------------- 1 | from pkg.adaptagrams import * 2 | 3 | g = buildGraphFromTglfFile("../graphs/special/bundlecross.tglf") 4 | hola_opts = HolaOpts() 5 | hola_opts.routingScalar_shapeBufferDistance = 1/8.0 6 | lor = LeaflessOrthoRouter(g, hola_opts) 7 | lor.route() 8 | op = OrthoPlanariser(g); 9 | P = op.planarise(); 10 | t = P.writeTglf() 11 | with open('./output/planarise.tglf', 'w') as f: 12 | f.write(t) 13 | 14 | 15 | -------------------------------------------------------------------------------- /cola/libdialect/tests/swig_tests/run_tests: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | 5 | os.system("ln -s ../../.. pkg") 6 | 7 | names = """ 8 | destress_aca 9 | orthohub 10 | planarise 11 | leafless 12 | faceset 13 | treeplacement 14 | expand 15 | chainconfig 16 | hola 17 | aca 18 | """.split() 19 | 20 | print '...' 21 | for name in names: 22 | cmd = 'python %s.py' % name 23 | print '%s complete' % name 24 | os.system(cmd) 25 | 26 | -------------------------------------------------------------------------------- /cola/libdialect/tests/swig_tests/treeplacement.py: -------------------------------------------------------------------------------- 1 | from pkg.adaptagrams import * 2 | 3 | opts = HolaOpts() 4 | # Build a graph 5 | g = buildGraphFromTglfFile("../graphs/special/treeplacement3.tglf") 6 | # Peel. 7 | trees = peel(g) 8 | # Give the trees their symmetric layout. 9 | iel = g.getIEL() 10 | for tree in trees: 11 | tree.symmetricLayout(CardinalDir_EAST, iel/4.0, iel, opts.preferConvexTrees) 12 | # Do an ortho routing and planarise the core. 13 | opts.routingScalar_shapeBufferDistance = 1/8.0 14 | lor = LeaflessOrthoRouter(g, opts) 15 | lor.route() 16 | op = OrthoPlanariser(g); 17 | P = op.planarise(); 18 | # Compute the face set. 19 | faceSet = FaceSet(P) 20 | # Get the tree rooted at node 0. 21 | for tree in trees: 22 | if tree.getRootNodeID() == 0: 23 | t0 = tree 24 | break 25 | # Get all possible tree placements. 26 | tps = faceSet.listAllPossibleTreePlacements(t0) 27 | # Choose best placement; should be NORTH. 28 | best1 = chooseBestPlacement(tps, opts) 29 | assert best1.getPlacementDir() == CompassDir_NORTH 30 | # But if we do not favour external placement, then best should be 31 | # SOUTH, dur to isolation from the tree rooted at node 1. 32 | opts.treePlacement_favourExternal = False 33 | best2 = chooseBestPlacement(tps, opts) 34 | assert best2.getPlacementDir() == CompassDir_SOUTH 35 | 36 | -------------------------------------------------------------------------------- /cola/libdialect/tests/tglf01.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libdialect - A library for computing DiAlEcT layouts: 5 | * D = Decompose/Distribute 6 | * A = Arrange 7 | * E = Expand/Emend 8 | * T = Transform 9 | * 10 | * Copyright (C) 2018 Monash University 11 | * 12 | * This library is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * See the file LICENSE.LGPL distributed with the library. 17 | * 18 | * This library is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | * Author(s): Steve Kieffer 23 | */ 24 | 25 | #include "libdialect/io.h" 26 | #include "libdialect/graphs.h" 27 | 28 | using namespace dialect; 29 | 30 | int main(void) { 31 | Graph graph = *buildGraphFromTglfFile("graphs/" "special/core_with_trees.tglf"); 32 | writeStringToFile( 33 | graph.writeTglf(), 34 | "output/" "tglf01_" "generated.tglf" 35 | ); 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /cola/libproject/Makefile.am: -------------------------------------------------------------------------------- 1 | #mosek_home=/home/dwyer/devel/mosek/5/tools/platform/linux32x86 2 | #INCLUDES = -I$(top_srcdir) -I$(mosek_home)/h 3 | 4 | lib_LTLIBRARIES = libproject.la 5 | libproject_la_CPPFLAGS = -I$(top_srcdir) -I$(includedir)libproject -fPIC 6 | libproject_la_LDFLAGS = -no-undefined 7 | 8 | libproject_la_SOURCES = project.cpp \ 9 | util.h \ 10 | util.cpp 11 | 12 | libprojectincludedir = $(includedir)/libproject 13 | 14 | libprojectinclude_HEADERS = project.h \ 15 | util.h 16 | 17 | SUBDIRS = . tests 18 | -------------------------------------------------------------------------------- /cola/libproject/tests/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir) -Iquadprogpp 2 | LIBPROJECT = $(top_builddir)/libproject/libproject.la 3 | check_PROGRAMS = treeqptest quadprogpptest simple static random 4 | testutil_SOURCES = testutil.cpp quadprogpp/QuadProg++.cc 5 | simple_SOURCES = simple.cpp 6 | simple_LDADD = $(LIBPROJECT) 7 | static_SOURCES = static.cpp $(testutil_SOURCES) 8 | static_LDADD = $(LIBPROJECT) 9 | random_SOURCES = random.cpp $(testutil_SOURCES) 10 | random_LDADD = $(LIBPROJECT) 11 | treeqptest_SOURCES = treeqptest.cpp treeqp.cpp $(testutil_SOURCES) 12 | treeqptest_LDADD = $(LIBPROJECT) 13 | quadprogpptest_SOURCES = quadprogpp/main.cc\ 14 | quadprogpp/QuadProg++.h\ 15 | quadprogpp/QuadProg++.cc 16 | 17 | TESTS = $(check_PROGRAMS) 18 | 19 | -------------------------------------------------------------------------------- /cola/libproject/util.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libproject - Solves an instance of the Variable Placement with Separation 5 | * Constraints problem, that is a projection onto separation 6 | * constraints, whilst always maintaining feasibility. 7 | * 8 | * Copyright (C) 2005-2008 Monash University 9 | * 10 | * This library is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU Lesser General Public 12 | * License as published by the Free Software Foundation; either 13 | * version 2.1 of the License, or (at your option) any later version. 14 | * See the file LICENSE.LGPL distributed with the library. 15 | * 16 | * This library is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * 20 | */ 21 | 22 | #include "libproject/util.h" 23 | 24 | #include 25 | namespace project { 26 | const double epsilon=1e-8; 27 | bool approx_equals(double a, double b) { 28 | return fabs(a-b)Adaptagrams project. 14 | There are no official releases yet, though the code is stable and 15 | available from the Adaptagrams 16 | GitHub 17 | repository. 18 | 19 | The API is documented using Doxygen. The documentation you are currently 20 | reading can be obtained by running doxygen in the cola directory. 21 | 22 | libcola is written and maintained by 23 | Michael Wybrow and 24 | Tim Dwyer, 25 | members of Immersive Analytics Lab at Monash University, Australia. 26 | 27 | The algorithms used for Topology Preservation are described in the following papers. If you use libtopology, please cite the relevant paper. 28 | - Tim Dwyer, Kim Marriott, and Michael Wybrow. Topology preserving 29 | constrained graph layout. In Proc. 16th Intl. Symp. Graph Drawing 30 | (GD'08), volume 5417 of Lecture Notes in Computer Science, pages 31 | 230-241. Springer, 2009. 32 | 33 | */ 34 | 35 | 36 | -------------------------------------------------------------------------------- /cola/libtopology/libtopology.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libtopology 7 | Description: A library containing extensions to libcola to support topology preserving constraint-based layout. 8 | URL: http://www.adaptagrams.org/ 9 | Version: @VERSION@ 10 | Requires: 11 | Libs: -L${libdir} -ltopology 12 | Cflags: -I${includedir}/libtopology -------------------------------------------------------------------------------- /cola/libtopology/tests/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir) $(CAIROMM_CFLAGS) 2 | LDADD = $(top_builddir)/libtopology/libtopology.la $(top_builddir)/libcola/libcola.la $(top_builddir)/libvpsc/libvpsc.la $(top_builddir)/libavoid/libavoid.la $(CAIROMM_LIBS) 3 | check_PROGRAMS = simple_bend nooverlap nodedragging beautify orthogonalOpt 4 | # triangle split kamada nooverlap 5 | 6 | simple_bend_SOURCES = simple_bend.cpp 7 | nooverlap_SOURCES = nooverlap.cpp 8 | nodedragging_SOURCES = nodedragging.cpp 9 | #problem_SOURCES = problem.cpp 10 | beautify_SOURCES = beautify.cpp 11 | orthogonalOpt_SOURCES = orthogonalOpt.cpp 12 | 13 | #shortest_paths_LDADD = $(top_builddir)/libcola/libcola.la 14 | 15 | #triangle_LDADD = $(ldcommon) 16 | #triangle_SOURCES = triangle.cpp 17 | #split_LDADD = $(ldcommon) 18 | #split_SOURCES = split.cpp 19 | #kamada_LDADD = $(ldcommon) 20 | #kamada_SOURCES = kamada.cpp 21 | TESTS = $(check_PROGRAMS) 22 | -------------------------------------------------------------------------------- /cola/libtopology/tests/output/README.txt: -------------------------------------------------------------------------------- 1 | This directory is used to for output debug svg files from the test cases. 2 | -------------------------------------------------------------------------------- /cola/libtopology/util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libtopology - Classes used in generating and managing topology constraints. 5 | * 6 | * Copyright (C) 2007-2008 Monash University 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * See the file LICENSE.LGPL distributed with the library. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * 18 | */ 19 | 20 | #ifndef TOPOLOGY_UTIL_H 21 | #define TOPOLOGY_UTIL_H 22 | namespace topology { 23 | /* 24 | * templated delete functor for use in for_each loop over vector 25 | */ 26 | struct delete_object 27 | { 28 | template 29 | void operator()(T *ptr){ delete ptr;} 30 | }; 31 | /* 32 | * Sum over the results of calling operation for each member in the 33 | * iterator. Handier than std::accumulate because we can use with 34 | * mem_fun to pass in a getter method. 35 | */ 36 | template 37 | T sum_over(InputIterator beg, InputIterator end, T init, Operation op) 38 | { 39 | for ( ; beg != end; ++beg) 40 | init = init + op(*beg); 41 | return init; 42 | } 43 | } // namespace topology 44 | #endif // TOPOLOGY_UTIL_H 45 | -------------------------------------------------------------------------------- /cola/libvpsc/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST=libvpsc.pc.in 2 | lib_LTLIBRARIES = libvpsc.la 3 | libvpsc_la_CPPFLAGS = -I$(top_srcdir) -I$(includedir)/libvpsc -fPIC 4 | libvpsc_la_LDFLAGS = -no-undefined 5 | 6 | #DEFS=-DLIBVPSC_LOGGING 7 | 8 | 9 | libvpsc_la_SOURCES = block.cpp\ 10 | blocks.cpp\ 11 | constraint.cpp\ 12 | rectangle.cpp\ 13 | solve_VPSC.cpp\ 14 | variable.cpp\ 15 | cbuffer.cpp\ 16 | isnan.h\ 17 | block.h\ 18 | blocks.h\ 19 | constraint.h\ 20 | rectangle.h\ 21 | pairingheap.h\ 22 | solve_VPSC.h\ 23 | variable.h\ 24 | cbuffer.h\ 25 | linesegment.h\ 26 | assertions.h 27 | 28 | libvpscincludedir = $(includedir)/libvpsc 29 | 30 | libvpscinclude_HEADERS = solve_VPSC.h \ 31 | block.h\ 32 | constraint.h\ 33 | exceptions.h\ 34 | rectangle.h\ 35 | variable.h \ 36 | assertions.h 37 | 38 | pkgconfigdir = $(libdir)/pkgconfig 39 | pkgconfig_DATA = libvpsc.pc 40 | 41 | SUBDIRS = . tests 42 | 43 | -------------------------------------------------------------------------------- /cola/libvpsc/cbuffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libvpsc - A solver for the problem of Variable Placement with 5 | * Separation Constraints. 6 | * 7 | * Copyright (C) 2005-2008 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): Tim Dwyer 20 | * 21 | */ 22 | #ifndef VPSC_CBUFFER_H 23 | #define VPSC_CBUFFER_H 24 | 25 | #include 26 | 27 | namespace vpsc { 28 | class Constraint; 29 | class CBuffer { 30 | public: 31 | CBuffer(std::vector& l, 32 | const unsigned maxsize=5) 33 | : master_list(l), maxsize(maxsize), size(0) { 34 | buffer.resize(maxsize); 35 | load(); 36 | } 37 | void reset() { size=0; } 38 | void load(); 39 | Constraint* mostViolated(); 40 | private: 41 | std::vector& master_list; 42 | std::vector buffer; 43 | const unsigned maxsize; 44 | unsigned size; 45 | }; 46 | } 47 | 48 | #endif // VPSC_CBUFFER_H 49 | 50 | -------------------------------------------------------------------------------- /cola/libvpsc/doc/description.doc: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | \if LIBVPSC_DOC 4 | @mainpage libvpsc: Variable Placement with Separation Constraints solver 5 | \endif 6 | \if ADAPTAGRAMS_DOC 7 | @page libvpsc libvpsc — Overview 8 | \endif 9 | 10 | 11 | libvpsc is a cross-platform C++ library for solving for the Variable Placement with Separation Constraints problem. This is a quadratic programming problem in which the squared differences between a placement vector and some ideal placement are minimised subject to a set of separation constraints. This is very useful in a number of layout problems. 12 | 13 | libvpsc is part of the 14 | Adaptagrams project. 15 | There are no official releases yet, though the code is stable and 16 | available from the Adaptagrams 17 | GitHub 18 | repository. 19 | 20 | The API is documented using Doxygen. The documentation you are currently 21 | reading can be obtained by running doxygen in the cola directory. 22 | 23 | libcola is written and maintained by 24 | Michael Wybrow and 25 | Tim Dwyer, 26 | members of Immersive Analytics Lab at Monash University, Australia. 27 | 28 | The algorithms used for VPSC are described in the following papers. If you use libcola, please cite the relevant paper. 29 | - Tim Dwyer, Kim Marriott, and Peter J. Stuckey. Fast node overlap removal.\n 30 | In Proceedings 13th International Symposium on Graph Drawing (GD '05),\n 31 | volume 3843 of LNCS, pages 153-164. Springer, 2006. 32 | 33 | 34 | */ 35 | 36 | 37 | -------------------------------------------------------------------------------- /cola/libvpsc/exceptions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libvpsc - A solver for the problem of Variable Placement with 5 | * Separation Constraints. 6 | * 7 | * Copyright (C) 2005-2008 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 | */ 20 | 21 | #ifndef VPSC_EXCEPTIONS_H 22 | #define VPSC_EXCEPTIONS_H 23 | 24 | #include 25 | namespace vpsc { 26 | class Constraint; 27 | struct UnsatisfiableException { 28 | std::vector path; 29 | }; 30 | struct UnsatisfiedConstraint { 31 | UnsatisfiedConstraint(Constraint& c):c(c) {} 32 | Constraint& c; 33 | }; 34 | } // namespace vpsc 35 | 36 | #endif // VPSC_EXCEPTIONS_H 37 | -------------------------------------------------------------------------------- /cola/libvpsc/libvpsc.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libvpsc 7 | Description: A solver for the Variable Placement with Separation Constraints problem. 8 | URL: http://www.adaptagrams.org/ 9 | Version: @VERSION@ 10 | Requires: 11 | Libs: -L${libdir} -lvpsc 12 | Cflags: -I${includedir}/libvpsc -------------------------------------------------------------------------------- /cola/libvpsc/tests/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir) 2 | 3 | check_PROGRAMS = rectangleoverlap block satisfy_inc # cycle 4 | satisfy_inc_SOURCES = satisfy_inc.cpp 5 | satisfy_inc_LDADD = $(top_builddir)/libvpsc/libvpsc.la # -L$(mosek_home)/bin -lmosek -lguide -limf -lirc 6 | block_SOURCES = block.cpp 7 | block_LDADD = $(top_builddir)/libvpsc/libvpsc.la 8 | rectangleoverlap_SOURCES = rectangleoverlap.cpp 9 | rectangleoverlap_LDADD = $(top_builddir)/libvpsc/libvpsc.la 10 | 11 | #cycle_SOURCES = cycle.cpp 12 | #cycle_LDADD = $(top_builddir)/libvpsc/libvpsc.la 13 | 14 | TESTS = $(check_PROGRAMS) 15 | 16 | -------------------------------------------------------------------------------- /cola/libvpsc/variable.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ts=4 sw=4 et tw=0 wm=0 3 | * 4 | * libvpsc - A solver for the problem of Variable Placement with 5 | * Separation Constraints. 6 | * 7 | * Copyright (C) 2005-2008 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): Tim Dwyer 20 | */ 21 | 22 | #include "libvpsc/variable.h" 23 | namespace vpsc { 24 | std::ostream& operator <<(std::ostream &os, const Variable &v) { 25 | if(v.block) 26 | os << "(" << v.id << "=" << v.position() << ")"; 27 | else 28 | os << "(" << v.id << "=" << v.desiredPosition << ")"; 29 | return os; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /cola/swig-python-setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """ 4 | setup.py file for SWIG example 5 | """ 6 | 7 | from distutils.core import setup, Extension 8 | from distutils import util 9 | from distutils import sysconfig 10 | import os 11 | 12 | platform = util.get_platform() 13 | 14 | # special settings for Linux 15 | if platform.startswith("linux"): 16 | # option '-Wstrict-prototypes' is enabled by default and gives a warning on Linux 17 | if sysconfig.get_config_vars().has_key("OPT"): 18 | opt = sysconfig.get_config_vars().get("OPT") 19 | if type(opt) == str: 20 | opt = opt.replace("-Wstrict-prototypes", "") 21 | (sysconfig.get_config_vars())["OPT"] = opt 22 | 23 | os.environ['CC'] = 'gcc' 24 | os.environ['CXX'] = 'g++' 25 | 26 | adaptagrams_module = Extension('_adaptagrams', 27 | sources=['adaptagrams_wrap.cxx'], 28 | extra_compile_args=['-DUSE_ASSERT_EXCEPTIONS','-DSWIG_PYTHON_SILENT_MEMLEAK','-std=gnu++11','-stdlib=libc++'], 29 | # use this line for SWIG 2.0.12 to silence some harmless warnings 30 | #extra_compile_args=['-DUSE_ASSERT_EXCEPTIONS','-DSWIG_PYTHON_SILENT_MEMLEAK','-Wno-uninitialized'], 31 | include_dirs=['.'], 32 | extra_link_args=['libcola/.libs/libcola.a','libtopology/.libs/libtopology.a', 'libavoid/.libs/libavoid.a','libvpsc/.libs/libvpsc.a','libdialect/.libs/libdialect.a'], 33 | ) 34 | 35 | setup (name = 'adaptagrams', 36 | version = '0.1', 37 | author = "MArVL", 38 | description = """Adaptagrams libraries""", 39 | ext_modules = [adaptagrams_module], 40 | py_modules = ["adaptagrams"], 41 | ) 42 | -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/.cRectangleOverlap.log.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mjwybrow/adaptagrams/01b92d4fe69ca1de59e0c45021267c63ca580461/experimental/RectangleOverlapSolver/.cRectangleOverlap.log.swp -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | RectangleOverlapSolver 4 | 5 | 6 | 7 | 8 | 9 | org.python.pydev.PyDevBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.python.pydev.pythonNature 22 | 23 | 24 | -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Sun Dec 04 15:14:26 EST 2005 2 | eclipse.preferences.version=1 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 4 | org.eclipse.jdt.core.compiler.compliance=1.5 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.5 8 | -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/logging.properties: -------------------------------------------------------------------------------- 1 | # invoke java with -Djava.util.logging.config.file=logging.properties 2 | # Specify the handlers to create in the root logger 3 | # (all loggers are children of the root logger) 4 | # The following creates two handlers 5 | handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler 6 | 7 | # Set the default logging level for the root logger 8 | #.level = ALL 9 | 10 | # Set the default logging level for new ConsoleHandler instances 11 | java.util.logging.ConsoleHandler.level = ALL 12 | 13 | # Set the default logging level for new FileHandler instances 14 | java.util.logging.FileHandler.level = ALL 15 | 16 | # Set the default formatter for new ConsoleHandler instances 17 | java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter 18 | 19 | # Set the default logging level for the logger named com.mycompany 20 | placement.level = ALL 21 | 22 | java.util.logging.FileHandler.pattern = placement.log 23 | java.util.logging.FileHandler.limit = 50000 24 | java.util.logging.FileHandler.count = 1 25 | java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter 26 | -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/manifest.mf: -------------------------------------------------------------------------------- 1 | Main-Class: placement.RectangleDrawerFrame 2 | -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/placement/DebugFrame.java: -------------------------------------------------------------------------------- 1 | package placement; 2 | 3 | import javax.swing.JFrame; 4 | 5 | public class DebugFrame extends JFrame { 6 | private Constraints constraints; 7 | 8 | private Blocks blocks; 9 | 10 | private DebugPanel panel; 11 | 12 | DebugFrame(Blocks blocks, Constraints constraints) { 13 | super(); 14 | this.blocks = blocks; 15 | this.constraints = constraints; 16 | if (blocks.isEmpty()) { 17 | this.dispose(); 18 | return; 19 | } 20 | panel = new DebugPanel(blocks, constraints); 21 | panel.setSize(324, 700); 22 | setSize(324, 700); 23 | setLocation(700, 0); 24 | add(panel); 25 | setVisible(true); 26 | } 27 | 28 | void animate() { 29 | if (panel != null) { 30 | panel.updateDrawing(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/placement/DrawingDimensions.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package placement; 5 | 6 | import java.awt.Point; 7 | import java.awt.geom.Point2D; 8 | 9 | class DrawingDimensions { 10 | 11 | public double scale; 12 | 13 | public double ymin; 14 | 15 | public double xmin; 16 | 17 | public DrawingDimensions(double scale, double xmin, double ymin) { 18 | this.scale = scale; 19 | this.xmin = xmin; 20 | this.ymin = ymin; 21 | } 22 | 23 | Point toScreen(double x, double y) { 24 | x -= xmin < 0 ? xmin : 0; 25 | y -= ymin < 0 ? ymin : 0; 26 | x *= scale; 27 | y *= scale; 28 | return new Point((int) x, (int) y); 29 | } 30 | 31 | public Point toScreen(Point2D p) { 32 | return toScreen(p.getX(), p.getY()); 33 | } 34 | } -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/placement/GraphParserTest.java: -------------------------------------------------------------------------------- 1 | package placement; 2 | 3 | import junit.framework.TestCase; 4 | 5 | public class GraphParserTest extends TestCase { 6 | public void testGraph1(){ 7 | new GraphParser("testdata/biograph010.dot"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/placement/MaxPriorityQueue.java: -------------------------------------------------------------------------------- 1 | package placement; 2 | 3 | import java.util.ArrayList; 4 | 5 | public interface MaxPriorityQueue { 6 | public void add(T e); 7 | public T findMax(); 8 | public T deleteMax(); 9 | public void merge(MaxPriorityQueue other); 10 | public ArrayList getAll(); 11 | public int size(); 12 | } 13 | -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/placement/NativeFSA.java: -------------------------------------------------------------------------------- 1 | package placement; 2 | 3 | import java.awt.geom.Rectangle2D; 4 | import java.util.ArrayList; 5 | 6 | public class NativeFSA implements RectanglePlacement { 7 | double xgap, ygap; 8 | 9 | NativeFSA(double xgap, double ygap) { 10 | this.xgap = xgap; 11 | this.ygap = ygap; 12 | } 13 | public native double place(double x[], 14 | double y[], double w[], double h[]); 15 | 16 | static { 17 | System.loadLibrary("placement_NativeFSA"); 18 | } 19 | 20 | public void place(ArrayList rs) { 21 | ArrayList rectangles = new ArrayList(); 22 | int n=rectangles.size(); 23 | double[] x=new double[n]; 24 | double[] y=new double[n]; 25 | double[] w=new double[n]; 26 | double[] h=new double[n]; 27 | for(int i=0;i { 4 | /** 5 | * Construct the PNode. 6 | * 7 | * @param theElement 8 | * the value stored in the PNode. 9 | */ 10 | PNode(S theElement) { 11 | element = theElement; 12 | leftChild = null; 13 | nextSibling = null; 14 | prev = null; 15 | } 16 | 17 | // Friendly data; accessible by other package routines 18 | S element; 19 | 20 | PNode leftChild; 21 | 22 | PNode nextSibling; 23 | 24 | PNode prev; 25 | } -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/placement/Placement.java: -------------------------------------------------------------------------------- 1 | package placement; 2 | 3 | public interface Placement { 4 | 5 | public abstract Constraint addConstraint(String u, String v, double sep); 6 | 7 | public abstract double solve() throws Exception; 8 | 9 | public abstract Constraints getConstraints(); 10 | public abstract Variables getVariables(); 11 | 12 | } -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/placement/RectanglePlacement.java: -------------------------------------------------------------------------------- 1 | package placement; 2 | 3 | import java.util.ArrayList; 4 | 5 | public interface RectanglePlacement { 6 | void place(ArrayList rectangles); 7 | } 8 | -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/placement/ScanListPriorityQueue.java: -------------------------------------------------------------------------------- 1 | package placement; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Collections; 5 | 6 | public class ScanListPriorityQueue implements 7 | MaxPriorityQueue { 8 | ArrayList q = new ArrayList(); 9 | 10 | MaxPairingHeap ph = new MaxPairingHeap(); 11 | 12 | public void add(T e) { 13 | q.add(e); 14 | ph.add(e); 15 | } 16 | 17 | public T findMax() { 18 | T mc = null; 19 | if (q.size() > 0) { 20 | Collections.sort((ArrayList) q); 21 | mc = q.get(q.size() - 1); 22 | if (ph.findMax() != mc) { 23 | Constraint c = (Constraint) ph.findMax(); 24 | if (c.left.container != c.right.container) { 25 | System.out.println("Vrap"); 26 | } 27 | } 28 | // assert (ph.findMax() == mc); 29 | } 30 | return mc; 31 | } 32 | 33 | public T deleteMax() { 34 | T m = findMax(); 35 | q.remove(q.size() - 1); 36 | ph.deleteMax(); 37 | return m; 38 | } 39 | 40 | public void merge(MaxPriorityQueue other) { 41 | q.addAll(((ScanListPriorityQueue) other).q); 42 | ph.merge(((ScanListPriorityQueue) other).ph); 43 | assert (q.size() == ph.size()); 44 | } 45 | 46 | public String toString() { 47 | String s = ""; 48 | for (T e : q) { 49 | s = s + e.toString() + ";"; 50 | } 51 | return s; 52 | } 53 | 54 | public ArrayList getAll() { 55 | return q; 56 | } 57 | 58 | public int size() { 59 | return q.size(); 60 | } 61 | } -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/placement/SimpleTest.java: -------------------------------------------------------------------------------- 1 | package placement; 2 | 3 | import java.io.File; 4 | import java.util.Calendar; 5 | import java.util.Random; 6 | 7 | public class SimpleTest { 8 | 9 | /** 10 | * @param args 11 | */ 12 | public static void main(String[] args) { 13 | Calendar c=Calendar.getInstance(); 14 | String dir = "Test"+String.format("_%1$tF_%1$tH-%1$tM-%1$tS", c); 15 | if(!(new File(dir)).mkdirs()) throw new Error("Couldn't make directory!"); 16 | RectangleDrawerPanel d = new RectangleDrawerPanel(); 17 | Random rand = new Random(); 18 | for (int i = 0; i < 100000; i++) { 19 | if(i%1000==0) System.out.println("Test no: "+i); 20 | d.generateRandom(100,rand,200,200); 21 | try { 22 | QPRectanglePlacement r = new QPRectanglePlacement(false, false, 23 | false, QPRectanglePlacement.Algorithm.CACTIVESET, 0, 0, 24 | false); 25 | r.place(d.rectangles); 26 | } catch (AssertionError e) { 27 | d.save(dir+"/t"+i); 28 | e.printStackTrace(); 29 | } 30 | d.clear(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/placement/SlowPriorityQueue.java: -------------------------------------------------------------------------------- 1 | package placement; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Comparator; 5 | import java.util.PriorityQueue; 6 | 7 | public class SlowPriorityQueue implements MaxPriorityQueue { 8 | PriorityQueue q = new PriorityQueue(10, new Comparator() { 9 | 10 | public int compare(T a, T b) { 11 | return -a.compareTo(b); 12 | } 13 | 14 | }); 15 | 16 | public void add(T e) { 17 | q.add(e); 18 | } 19 | 20 | public T findMax() { 21 | return q.peek(); 22 | } 23 | 24 | public T deleteMax() { 25 | return q.poll(); 26 | } 27 | 28 | public void merge(MaxPriorityQueue other) { 29 | q.addAll(((SlowPriorityQueue)other).q); 30 | } 31 | 32 | public String toString() { 33 | String s = ""; 34 | for(T e:q) { 35 | s=s+e.toString()+";"; 36 | } 37 | return s; 38 | } 39 | 40 | public ArrayList getAll() { 41 | ArrayList l = new ArrayList(); 42 | for(T e:q) { 43 | l.add(e); 44 | } 45 | return l; 46 | } 47 | 48 | public int size() { 49 | return q.size(); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/placement/prolog/Part 1.2: -------------------------------------------------------------------------------- 1 |
2 | 3 | no documentation I am afraid 4 | 5 | 6 | On 07/02/2005, at 1:22 PM, Tim Dwyer wrote: 7 | 8 | > Hi Peter, 9 | > 10 | > Can you please send me your prolog for the overlap removal algorithm? 11 | > I'm keen to start hacking. 12 | > 13 | > Thanks 14 | > 15 | > Tim 16 | > 17 | > 18 |
-------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/placement/prolog/Part 1.4: -------------------------------------------------------------------------------- 1 |
2 |
-------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/problem.blocks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mjwybrow/adaptagrams/01b92d4fe69ca1de59e0c45021267c63ca580461/experimental/RectangleOverlapSolver/problem.blocks -------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/prolog/Part 1.2: -------------------------------------------------------------------------------- 1 |
2 | 3 | no documentation I am afraid 4 | 5 | 6 | On 07/02/2005, at 1:22 PM, Tim Dwyer wrote: 7 | 8 | > Hi Peter, 9 | > 10 | > Can you please send me your prolog for the overlap removal algorithm? 11 | > I'm keen to start hacking. 12 | > 13 | > Thanks 14 | > 15 | > Tim 16 | > 17 | > 18 |
-------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/prolog/Part 1.4: -------------------------------------------------------------------------------- 1 |
2 |
-------------------------------------------------------------------------------- /experimental/RectangleOverlapSolver/testdata/Test1.dot: -------------------------------------------------------------------------------- 1 | graph G { 2 | node [label="\N", shape=box, fontsize=10]; 3 | graph [overlap=true,splines=true,bb="0,0,478,731"]; 4 | A [label="A", height="4", width="1", pos="100,100"]; 5 | B [label="B", height="0.8", width="2", pos="220,-150"]; 6 | C [label="C", height="0.8", width="0.9", pos="100,200"]; 7 | D [label="D", height="2", width="2", pos="230,150"]; 8 | E [label="E", height="2.5", width="1", pos="300,50"]; 9 | F [label="F", height="1", width="2", pos="300,-180"]; 10 | G [label="G", height="1", width="2", pos="350,100"]; 11 | } 12 | -------------------------------------------------------------------------------- /experimental/draw-bn/TODO: -------------------------------------------------------------------------------- 1 | * parse .dne directly 2 | * draw complete nodes 3 | * changable nodes 4 | * fix up page boundaries 5 | -------------------------------------------------------------------------------- /experimental/draw-bn/graphlayouttest.h: -------------------------------------------------------------------------------- 1 | #include 2 | void output_svg(std::vector &rs, std::vector& es, char* fname,bool rects=false); 3 | void output_svg(std::vector &rs, std::vector& es, char* fname,bool rects=false); 4 | void output_svg(std::vector &rs, std::vector& es, char* fname,bool rects, bool directedEdges, std::vector * cyclicEdges); 5 | void output_svg(std::vector &rs, std::vector& es, char* fname,bool rects, bool directedEdges, std::vector* Ea); 6 | 7 | inline double getRand(double range) { 8 | return range*rand()/RAND_MAX; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /experimental/draw-bn/libcola: -------------------------------------------------------------------------------- 1 | ../cola/libcola/ -------------------------------------------------------------------------------- /experimental/draw-bn/libvpsc: -------------------------------------------------------------------------------- 1 | ../cola/libvpsc/ -------------------------------------------------------------------------------- /experimental/neatogen/.constrained_majorization_diredges.c.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mjwybrow/adaptagrams/01b92d4fe69ca1de59e0c45021267c63ca580461/experimental/neatogen/.constrained_majorization_diredges.c.swp -------------------------------------------------------------------------------- /experimental/neatogen/.quad_prog_vpsc.h.swo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mjwybrow/adaptagrams/01b92d4fe69ca1de59e0c45021267c63ca580461/experimental/neatogen/.quad_prog_vpsc.h.swo -------------------------------------------------------------------------------- /experimental/neatogen/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | -I$(top_srcdir)/lib/common \ 6 | -I$(top_srcdir)/lib/gvc \ 7 | -I$(top_srcdir)/lib/pack \ 8 | -I$(top_srcdir)/lib/pathplan \ 9 | -I$(top_srcdir)/lib/graph \ 10 | -I$(top_srcdir)/lib/cdt \ 11 | -I$(top_srcdir)/lib/libvpsc 12 | 13 | noinst_HEADERS = adjust.h edges.h geometry.h heap.h hedges.h info.h mem.h \ 14 | neato.h poly.h neatoprocs.h simple.h site.h voronoi.h \ 15 | bfs.h closest.h conjgrad.h defs.h dijkstra.h embed_graph.h kkutils.h \ 16 | matrix_ops.h pca.h stress.h quad_prog_solver.h digcola.h \ 17 | quad_prog_vpsc.h mosek_quad_solve.h 18 | noinst_LTLIBRARIES = libneatogen.la 19 | 20 | libneatogen_la_SOURCES = adjust.c circuit.c edges.c find_ints.c geometry.c \ 21 | heap.c hedges.c info.c neatoinit.c intersect.c legal.c lu.c matinv.c \ 22 | memory.c poly.c printvis.c site.c solve.c neatosplines.c stuff.c \ 23 | voronoi.c stress.c kkutils.c matrix_ops.c embed_graph.c dijkstra.c \ 24 | conjgrad.c pca.c closest.c bfs.c constraint.c quad_prog_solve.c \ 25 | smart_ini_x.c constrained_majorization.c opt_arrangement.c \ 26 | compute_hierarchy.c \ 27 | quad_prog_vpsc.c constrained_majorization_vsep.c \ 28 | mosek_quad_solve.c 29 | 30 | EXTRA_DIST = Makefile.old 31 | -------------------------------------------------------------------------------- /experimental/neatogen/adjust.h: -------------------------------------------------------------------------------- 1 | /* $Id: adjust.h,v 1.6 2006/01/17 22:56:22 erg Exp $ $Revision: 1.6 $ */ 2 | /* vim:set shiftwidth=4 ts=8: */ 3 | 4 | /********************************************************** 5 | * This software is part of the graphviz package * 6 | * http://www.graphviz.org/ * 7 | * * 8 | * Copyright (c) 1994-2004 AT&T Corp. * 9 | * and is licensed under the * 10 | * Common Public License, Version 1.0 * 11 | * by AT&T Corp. * 12 | * * 13 | * Information and Software Systems Research * 14 | * AT&T Research, Florham Park NJ * 15 | **********************************************************/ 16 | 17 | 18 | 19 | #ifndef ADJUST_H 20 | #define ADJUST_H 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | typedef enum { 27 | AM_NONE, AM_VOR, AM_COMPRESS, 28 | AM_SCALE, AM_NSCALE, AM_SCALEXY, AM_PUSH, AM_PUSHPULL, 29 | AM_ORTHO, AM_ORTHO_YX, AM_ORTHOXY, AM_ORTHOYX, 30 | AM_PORTHO, AM_PORTHO_YX, AM_PORTHOXY, AM_PORTHOYX 31 | } adjust_mode; 32 | 33 | extern double expFactor(graph_t * G); 34 | extern int adjustNodes(graph_t * G); 35 | extern void normalize(graph_t * g); 36 | extern int removeOverlap(graph_t * G); 37 | extern int removeOverlapAs(graph_t*, char*); 38 | extern int cAdjust(graph_t *, int); 39 | extern int scAdjust(graph_t *, int); 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | #endif 45 | -------------------------------------------------------------------------------- /experimental/neatogen/closest.h: -------------------------------------------------------------------------------- 1 | /* $Id: closest.h,v 1.1.1.1 2004/12/23 04:05:10 ellson Exp $ $Revision: 1.1.1.1 $ */ 2 | /* vim:set shiftwidth=4 ts=8: */ 3 | 4 | /********************************************************** 5 | * This software is part of the graphviz package * 6 | * http://www.graphviz.org/ * 7 | * * 8 | * Copyright (c) 1994-2004 AT&T Corp. * 9 | * and is licensed under the * 10 | * Common Public License, Version 1.0 * 11 | * by AT&T Corp. * 12 | * * 13 | * Information and Software Systems Research * 14 | * AT&T Research, Florham Park NJ * 15 | **********************************************************/ 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | 22 | 23 | #ifndef CLOSEST_H 24 | #define CLOSEST_H 25 | 26 | #include "defs.h" 27 | 28 | extern void closest_pairs2graph(double *, int, int, vtx_data **); 29 | 30 | #endif 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | -------------------------------------------------------------------------------- /experimental/neatogen/conjgrad.h: -------------------------------------------------------------------------------- 1 | /* $Id: conjgrad.h,v 1.1.1.1 2004/12/23 04:05:10 ellson Exp $ $Revision: 1.1.1.1 $ */ 2 | /* vim:set shiftwidth=4 ts=8: */ 3 | 4 | /********************************************************** 5 | * This software is part of the graphviz package * 6 | * http://www.graphviz.org/ * 7 | * * 8 | * Copyright (c) 1994-2004 AT&T Corp. * 9 | * and is licensed under the * 10 | * Common Public License, Version 1.0 * 11 | * by AT&T Corp. * 12 | * * 13 | * Information and Software Systems Research * 14 | * AT&T Research, Florham Park NJ * 15 | **********************************************************/ 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | 22 | 23 | #ifndef _CG_H_ 24 | #define _CG_H_ 25 | 26 | #include "defs.h" 27 | 28 | /************************* 29 | * C.G. method - SPARSE * 30 | ************************/ 31 | 32 | extern void conjugate_gradient(vtx_data *, double *, double *, int, 33 | double, int); 34 | 35 | /************************* 36 | * C.G. method - DENSE * 37 | ************************/ 38 | 39 | extern void conjugate_gradient_f(float **, double *, double *, int, 40 | double, int, bool); 41 | 42 | extern void conjugate_gradient_mkernel(float *, float *, float *, int, 43 | double, int); 44 | 45 | #endif 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | -------------------------------------------------------------------------------- /experimental/neatogen/dijkstra.h: -------------------------------------------------------------------------------- 1 | /* $Id: dijkstra.h,v 1.1.1.1 2004/12/23 04:05:11 ellson Exp $ $Revision: 1.1.1.1 $ */ 2 | /* vim:set shiftwidth=4 ts=8: */ 3 | 4 | /********************************************************** 5 | * This software is part of the graphviz package * 6 | * http://www.graphviz.org/ * 7 | * * 8 | * Copyright (c) 1994-2004 AT&T Corp. * 9 | * and is licensed under the * 10 | * Common Public License, Version 1.0 * 11 | * by AT&T Corp. * 12 | * * 13 | * Information and Software Systems Research * 14 | * AT&T Research, Florham Park NJ * 15 | **********************************************************/ 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | 22 | 23 | #ifndef _DIJKSTRA_H_ 24 | #define _DIJKSTRA_H_ 25 | 26 | #include "defs.h" 27 | 28 | #ifdef __cplusplus 29 | void dijkstra(int vertex, vtx_data * graph, int n, DistType * dist); 30 | 31 | /* Dijkstra bounded to nodes in *unweighted* radius */ 32 | void dijkstra_bounded(int vertex, vtx_data * graph, int n, 33 | DistType * dist, int bound, int *visited_nodes, 34 | int &num_visited_nodes); 35 | 36 | #else 37 | extern void dijkstra(int, vtx_data *, int, DistType *); 38 | extern void dijkstra_f(int, vtx_data *, int, float *); 39 | 40 | /* Dijkstra bounded to nodes in *unweighted* radius */ 41 | extern int dijkstra_bounded(int, vtx_data *, int, DistType *, int, 42 | int *); 43 | #endif 44 | 45 | #endif 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | -------------------------------------------------------------------------------- /experimental/neatogen/edges.h: -------------------------------------------------------------------------------- 1 | /* $Id: edges.h,v 1.1.1.1 2004/12/23 04:05:11 ellson Exp $ $Revision: 1.1.1.1 $ */ 2 | /* vim:set shiftwidth=4 ts=8: */ 3 | 4 | /********************************************************** 5 | * This software is part of the graphviz package * 6 | * http://www.graphviz.org/ * 7 | * * 8 | * Copyright (c) 1994-2004 AT&T Corp. * 9 | * and is licensed under the * 10 | * Common Public License, Version 1.0 * 11 | * by AT&T Corp. * 12 | * * 13 | * Information and Software Systems Research * 14 | * AT&T Research, Florham Park NJ * 15 | **********************************************************/ 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | 22 | 23 | #ifndef EDGES_H 24 | #define EDGES_H 25 | 26 | #include "site.h" 27 | 28 | typedef struct Edge { 29 | double a, b, c; /* edge on line ax + by = c */ 30 | Site *ep[2]; /* endpoints (vertices) of edge; initially NULL */ 31 | Site *reg[2]; /* sites forming edge */ 32 | int edgenbr; 33 | } Edge; 34 | 35 | #define le 0 36 | #define re 1 37 | 38 | extern double pxmin, pxmax, pymin, pymax; /* clipping window */ 39 | extern void edgeinit(void); 40 | extern void endpoint(Edge *, int, Site *); 41 | extern void clip_line(Edge * e); 42 | extern Edge *bisect(Site *, Site *); 43 | 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | -------------------------------------------------------------------------------- /experimental/neatogen/heap.h: -------------------------------------------------------------------------------- 1 | /* $Id: heap.h,v 1.2 2005/02/24 00:57:33 ellson Exp $ $Revision: 1.2 $ */ 2 | /* vim:set shiftwidth=4 ts=8: */ 3 | 4 | /********************************************************** 5 | * This software is part of the graphviz package * 6 | * http://www.graphviz.org/ * 7 | * * 8 | * Copyright (c) 1994-2004 AT&T Corp. * 9 | * and is licensed under the * 10 | * Common Public License, Version 1.0 * 11 | * by AT&T Corp. * 12 | * * 13 | * Information and Software Systems Research * 14 | * AT&T Research, Florham Park NJ * 15 | **********************************************************/ 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | 22 | 23 | #ifndef HEAP_H 24 | #define HEAP_H 25 | 26 | #include "hedges.h" 27 | 28 | extern void PQinitialize(void); 29 | extern void PQcleanup(void); 30 | extern Halfedge *PQextractmin(void); 31 | extern Point PQ_min(void); 32 | extern int PQempty(void); 33 | extern void PQdelete(Halfedge *); 34 | extern void PQinsert(Halfedge *, Site *, double); 35 | 36 | #endif 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | -------------------------------------------------------------------------------- /experimental/neatogen/mem.h: -------------------------------------------------------------------------------- 1 | /* $Id: mem.h,v 1.1.1.1 2004/12/23 04:05:14 ellson Exp $ $Revision: 1.1.1.1 $ */ 2 | /* vim:set shiftwidth=4 ts=8: */ 3 | 4 | /********************************************************** 5 | * This software is part of the graphviz package * 6 | * http://www.graphviz.org/ * 7 | * * 8 | * Copyright (c) 1994-2004 AT&T Corp. * 9 | * and is licensed under the * 10 | * Common Public License, Version 1.0 * 11 | * by AT&T Corp. * 12 | * * 13 | * Information and Software Systems Research * 14 | * AT&T Research, Florham Park NJ * 15 | **********************************************************/ 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | 22 | 23 | #ifndef MEMORY_H 24 | #define MEMORY_H 25 | 26 | #ifndef NULL 27 | #define NULL 0 28 | #endif 29 | 30 | /* Support for freelists */ 31 | 32 | typedef struct freelist { 33 | struct freenode *head; /* List of free nodes */ 34 | struct freeblock *blocklist; /* List of malloced blocks */ 35 | int nodesize; /* Size of node */ 36 | } Freelist; 37 | 38 | extern void *getfree(Freelist *); 39 | extern void freeinit(Freelist *, int); 40 | extern void makefree(void *, Freelist *); 41 | 42 | #endif 43 | 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | -------------------------------------------------------------------------------- /experimental/neatogen/mosek_quad_solve.h: -------------------------------------------------------------------------------- 1 | #ifdef MOSEK 2 | #ifndef _QSOLVE_H_ 3 | #define _QSOLVE_H_ 4 | 5 | #include /* Include the MOSEK definition file. */ 6 | #include "types.h" 7 | #include 8 | 9 | typedef struct { 10 | int r; 11 | MSKenv_t env; 12 | MSKtask_t task; 13 | double *qval; 14 | int *qsubi,*qsubj; 15 | double *xx; 16 | int num_variables; 17 | } MosekEnv; 18 | 19 | MosekEnv* mosek_init_hier(float* lap, int n,int *ordering,int *level_indexes,int num_divisions, float separation); 20 | void mosek_quad_solve_hier(MosekEnv*,float *b,int n,float* coords, float *hierarchy_boundaries); 21 | MosekEnv* mosek_init_sep(float* lap, int nv, int ndv, Constraint** cs, int m); 22 | void mosek_quad_solve_sep(MosekEnv*,int n,float *b,float* coords); 23 | void mosek_delete(MosekEnv*); 24 | 25 | 26 | #endif // _QSOLVE_H_ 27 | #endif // MOSEK 28 | -------------------------------------------------------------------------------- /experimental/neatogen/neato.h: -------------------------------------------------------------------------------- 1 | /* $Id: neato.h,v 1.2 2005/07/13 20:29:40 erg Exp $ $Revision: 1.2 $ */ 2 | /* vim:set shiftwidth=4 ts=8: */ 3 | 4 | /********************************************************** 5 | * This software is part of the graphviz package * 6 | * http://www.graphviz.org/ * 7 | * * 8 | * Copyright (c) 1994-2004 AT&T Corp. * 9 | * and is licensed under the * 10 | * Common Public License, Version 1.0 * 11 | * by AT&T Corp. * 12 | * * 13 | * Information and Software Systems Research * 14 | * AT&T Research, Florham Park NJ * 15 | **********************************************************/ 16 | 17 | 18 | #ifndef NEATO_H 19 | #define NEATO_H 20 | 21 | #ifdef HAVE_CONFIG_H 22 | #include "config.h" 23 | #endif 24 | 25 | #define MODEL_SHORTPATH 0 26 | #define MODEL_CIRCUIT 1 27 | #define MODEL_SUBSET 2 28 | 29 | #define MODE_KK 0 30 | #define MODE_MAJOR 1 31 | #define MODE_HIER 2 32 | #define MODE_VSEP 3 33 | 34 | #define INIT_SELF 0 35 | #define INIT_REGULAR 1 36 | #define INIT_RANDOM 2 37 | 38 | #include "render.h" 39 | #include "pathplan.h" 40 | #include "neatoprocs.h" 41 | #include "adjust.h" 42 | 43 | #endif /* NEATO_H */ 44 | -------------------------------------------------------------------------------- /experimental/neatogen/pca.h: -------------------------------------------------------------------------------- 1 | /* $Id: pca.h,v 1.1.1.1 2004/12/23 04:05:15 ellson Exp $ $Revision: 1.1.1.1 $ */ 2 | /* vim:set shiftwidth=4 ts=8: */ 3 | 4 | /********************************************************** 5 | * This software is part of the graphviz package * 6 | * http://www.graphviz.org/ * 7 | * * 8 | * Copyright (c) 1994-2004 AT&T Corp. * 9 | * and is licensed under the * 10 | * Common Public License, Version 1.0 * 11 | * by AT&T Corp. * 12 | * * 13 | * Information and Software Systems Research * 14 | * AT&T Research, Florham Park NJ * 15 | **********************************************************/ 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | 22 | 23 | #ifndef PCA_H 24 | #define PCA_H 25 | 26 | #include "defs.h" 27 | 28 | extern void PCA_alloc(DistType **, int, int, double **, int); 29 | extern bool iterativePCA_1D(double **, int, int, double *); 30 | 31 | #endif 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | -------------------------------------------------------------------------------- /experimental/neatogen/poly.h: -------------------------------------------------------------------------------- 1 | /* $Id: poly.h,v 1.2 2005/02/24 00:57:33 ellson Exp $ $Revision: 1.2 $ */ 2 | /* vim:set shiftwidth=4 ts=8: */ 3 | 4 | /********************************************************** 5 | * This software is part of the graphviz package * 6 | * http://www.graphviz.org/ * 7 | * * 8 | * Copyright (c) 1994-2004 AT&T Corp. * 9 | * and is licensed under the * 10 | * Common Public License, Version 1.0 * 11 | * by AT&T Corp. * 12 | * * 13 | * Information and Software Systems Research * 14 | * AT&T Research, Florham Park NJ * 15 | **********************************************************/ 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | 22 | 23 | #ifndef POLY_H 24 | #define POLY_H 25 | 26 | #include "geometry.h" 27 | 28 | typedef struct { 29 | Point origin; 30 | Point corner; 31 | int nverts; 32 | Point *verts; 33 | int kind; 34 | } Poly; 35 | 36 | extern void polyFree(void); 37 | extern int polyOverlap(Point, Poly *, Point, Poly *); 38 | extern void makePoly(Poly *, Agnode_t *, double); 39 | extern void breakPoly(Poly *); 40 | 41 | #endif 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | -------------------------------------------------------------------------------- /experimental/neatogen/printvis.c: -------------------------------------------------------------------------------- 1 | /* $Id: printvis.c,v 1.1.1.1 2004/12/23 04:05:16 ellson Exp $ $Revision: 1.1.1.1 $ */ 2 | /* vim:set shiftwidth=4 ts=8: */ 3 | 4 | /********************************************************** 5 | * This software is part of the graphviz package * 6 | * http://www.graphviz.org/ * 7 | * * 8 | * Copyright (c) 1994-2004 AT&T Corp. * 9 | * and is licensed under the * 10 | * Common Public License, Version 1.0 * 11 | * by AT&T Corp. * 12 | * * 13 | * Information and Software Systems Research * 14 | * AT&T Research, Florham Park NJ * 15 | **********************************************************/ 16 | 17 | #include 18 | #include 19 | typedef Ppoint_t point; 20 | 21 | 22 | void printvis(vconfig_t * cp) 23 | { 24 | int i, j; 25 | int *next, *prev; 26 | point *pts; 27 | array2 arr; 28 | 29 | next = cp->next; 30 | prev = cp->prev; 31 | pts = cp->P; 32 | arr = cp->vis; 33 | 34 | printf("this next prev point\n"); 35 | for (i = 0; i < cp->N; i++) 36 | printf("%3d %3d %3d (%f,%f)\n", i, next[i], prev[i], 37 | (double) pts[i].x, (double) pts[i].y); 38 | 39 | printf("\n\n"); 40 | 41 | for (i = 0; i < cp->N; i++) { 42 | for (j = 0; j < cp->N; j++) 43 | printf("%4.1f ", arr[i][j]); 44 | printf("\n"); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /experimental/neatogen/site.h: -------------------------------------------------------------------------------- 1 | /* $Id: site.h,v 1.2 2005/02/24 00:57:33 ellson Exp $ $Revision: 1.2 $ */ 2 | /* vim:set shiftwidth=4 ts=8: */ 3 | 4 | /********************************************************** 5 | * This software is part of the graphviz package * 6 | * http://www.graphviz.org/ * 7 | * * 8 | * Copyright (c) 1994-2004 AT&T Corp. * 9 | * and is licensed under the * 10 | * Common Public License, Version 1.0 * 11 | * by AT&T Corp. * 12 | * * 13 | * Information and Software Systems Research * 14 | * AT&T Research, Florham Park NJ * 15 | **********************************************************/ 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | 22 | 23 | #ifndef SITE_H 24 | #define SITE_H 25 | 26 | #include "geometry.h" 27 | 28 | /* Sites are also used as vertices on line segments */ 29 | typedef struct Site { 30 | Point coord; 31 | int sitenbr; 32 | int refcnt; 33 | } Site; 34 | 35 | extern int siteidx; 36 | extern Site *bottomsite; 37 | 38 | extern void siteinit(void); 39 | extern Site *getsite(void); 40 | extern double dist(Site *, Site *); /* Distance between two sites */ 41 | extern void deref(Site *); /* Increment refcnt of site */ 42 | extern void ref(Site *); /* Decrement refcnt of site */ 43 | extern void makevertex(Site *); /* Transform a site into a vertex */ 44 | #endif 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | -------------------------------------------------------------------------------- /experimental/neatogen/voronoi.h: -------------------------------------------------------------------------------- 1 | /* $Id: voronoi.h,v 1.2 2005/02/24 00:57:33 ellson Exp $ $Revision: 1.2 $ */ 2 | /* vim:set shiftwidth=4 ts=8: */ 3 | 4 | /********************************************************** 5 | * This software is part of the graphviz package * 6 | * http://www.graphviz.org/ * 7 | * * 8 | * Copyright (c) 1994-2004 AT&T Corp. * 9 | * and is licensed under the * 10 | * Common Public License, Version 1.0 * 11 | * by AT&T Corp. * 12 | * * 13 | * Information and Software Systems Research * 14 | * AT&T Research, Florham Park NJ * 15 | **********************************************************/ 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | 22 | 23 | #ifndef VORONOI_H 24 | #define VORONOI_H 25 | 26 | #include "site.h" 27 | 28 | extern void voronoi(int, Site * (*)(void)); 29 | 30 | #endif 31 | 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | -------------------------------------------------------------------------------- /experimental/solve_VPSC/.Makefile.am.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mjwybrow/adaptagrams/01b92d4fe69ca1de59e0c45021267c63ca580461/experimental/solve_VPSC/.Makefile.am.swp -------------------------------------------------------------------------------- /experimental/solve_VPSC/.test_rectangleoverlap.cpp.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mjwybrow/adaptagrams/01b92d4fe69ca1de59e0c45021267c63ca580461/experimental/solve_VPSC/.test_rectangleoverlap.cpp.swp -------------------------------------------------------------------------------- /experimental/solve_VPSC/AUTHORS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mjwybrow/adaptagrams/01b92d4fe69ca1de59e0c45021267c63ca580461/experimental/solve_VPSC/AUTHORS -------------------------------------------------------------------------------- /experimental/solve_VPSC/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mjwybrow/adaptagrams/01b92d4fe69ca1de59e0c45021267c63ca580461/experimental/solve_VPSC/ChangeLog -------------------------------------------------------------------------------- /experimental/solve_VPSC/Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = gnu 2 | SUBDIRS = libvpsc tests 3 | 4 | -------------------------------------------------------------------------------- /experimental/solve_VPSC/NEWS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mjwybrow/adaptagrams/01b92d4fe69ca1de59e0c45021267c63ca580461/experimental/solve_VPSC/NEWS -------------------------------------------------------------------------------- /experimental/solve_VPSC/README: -------------------------------------------------------------------------------- 1 | Building: 2 | libtoolize 3 | automake -a 4 | ./configure 5 | make check 6 | 7 | -------------------------------------------------------------------------------- /experimental/solve_VPSC/configure.in: -------------------------------------------------------------------------------- 1 | AC_INIT(libvpsc/solve_VPSC.cpp) 2 | AM_INIT_AUTOMAKE(libvpsc,1.0) 3 | AC_PROG_LIBTOOL 4 | AC_PROG_CXX 5 | AC_PROG_CC 6 | AC_PROG_INSTALL 7 | #AC_DEFINE(RECTANGLE_OVERLAP_LOGGING) 8 | AC_OUTPUT(Makefile libvpsc/Makefile tests/Makefile) 9 | -------------------------------------------------------------------------------- /experimental/solve_VPSC/libvpsc/Makefile.am: -------------------------------------------------------------------------------- 1 | INCLUDES = -I$(top_srcdir)/libvpsc 2 | 3 | lib_LTLIBRARIES = libvpsc.la 4 | 5 | libvpsc_la_SOURCES = block.cpp\ 6 | blocks.cpp\ 7 | constraint.cpp\ 8 | generate-constraints.cpp\ 9 | pairingheap/PairingHeap.cpp\ 10 | remove_rectangle_overlap.cpp\ 11 | solve_VPSC.cpp\ 12 | csolve_VPSC.cpp\ 13 | variable.cpp\ 14 | isnan.h\ 15 | block.h\ 16 | blocks.h\ 17 | constraint.h\ 18 | generate-constraints.h\ 19 | pairingheap/PairingHeap.h\ 20 | pairingheap/dsexceptions.h\ 21 | remove_rectangle_overlap.h\ 22 | solve_VPSC.h\ 23 | csolve_VPSC.h\ 24 | variable.h 25 | 26 | include_HEADERS = solve_VPSC.h \ 27 | variable.h 28 | constraint.h\ 29 | generate-constraints.h\ 30 | remove_rectangle_overlap.h\ 31 | csolve_VPSC.h 32 | 33 | 34 | -------------------------------------------------------------------------------- /experimental/solve_VPSC/libvpsc/blocks.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \brief A block structure defined over the variables 3 | * 4 | * A block structure defined over the variables such that each block contains 5 | * 1 or more variables, with the invariant that all constraints inside a block 6 | * are satisfied by keeping the variables fixed relative to one another 7 | * 8 | * Authors: 9 | * Tim Dwyer 10 | * 11 | * Copyright (C) 2005 Authors 12 | * 13 | * Released under GNU LGPL. Read the file 'COPYING' for more information. 14 | */ 15 | 16 | #ifndef SEEN_REMOVEOVERLAP_BLOCKS_H 17 | #define SEEN_REMOVEOVERLAP_BLOCKS_H 18 | 19 | #ifdef RECTANGLE_OVERLAP_LOGGING 20 | #define LOGFILE "cRectangleOverlap.log" 21 | #endif 22 | 23 | #include 24 | #include 25 | 26 | class Block; 27 | class Variable; 28 | class Constraint; 29 | /** 30 | * A block structure defined over the variables such that each block contains 31 | * 1 or more variables, with the invariant that all constraints inside a block 32 | * are satisfied by keeping the variables fixed relative to one another 33 | */ 34 | class Blocks : public std::set 35 | { 36 | public: 37 | Blocks(const int n, Variable* const vs[]); 38 | ~Blocks(void); 39 | void mergeLeft(Block *r); 40 | void mergeRight(Block *l); 41 | void split(Block *b, Block *&l, Block *&r, Constraint *c); 42 | std::list *totalOrder(); 43 | void cleanup(); 44 | double cost(); 45 | private: 46 | void dfsVisit(Variable *v, std::list *order); 47 | void removeBlock(Block *doomed); 48 | Variable* const *vs; 49 | int nvs; 50 | }; 51 | 52 | extern long blockTimeCtr; 53 | #endif // SEEN_REMOVEOVERLAP_BLOCKS_H 54 | -------------------------------------------------------------------------------- /experimental/solve_VPSC/libvpsc/constraint.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * \brief A constraint determines a minimum or exact spacing required between 3 | * two variables. 4 | * 5 | * Authors: 6 | * Tim Dwyer 7 | * 8 | * Copyright (C) 2005 Authors 9 | * 10 | * Released under GNU LGPL. Read the file 'COPYING' for more information. 11 | */ 12 | 13 | #include "constraint.h" 14 | #include 15 | Constraint::Constraint(Variable *left, Variable *right, double gap, bool equality) 16 | : left(left), 17 | right(right), 18 | gap(gap), 19 | timeStamp(0), 20 | active(false), 21 | visited(false), 22 | equality(equality) 23 | { 24 | left->out.push_back(this); 25 | right->in.push_back(this); 26 | } 27 | Constraint::~Constraint() { 28 | Constraints::iterator i; 29 | for(i=left->out.begin(); i!=left->out.end(); i++) { 30 | if(*i==this) break; 31 | } 32 | left->out.erase(i); 33 | for(i=right->in.begin(); i!=right->in.end(); i++) { 34 | if(*i==this) break; 35 | } 36 | right->in.erase(i); 37 | } 38 | std::ostream& operator <<(std::ostream &os, const Constraint &c) 39 | { 40 | if(&c==NULL) { 41 | os<<"NULL"; 42 | } else { 43 | const char *type=c.equality?"=":"<="; 44 | os<<*c.left<<"+"< 7 | * 8 | * Copyright (C) 2005 Authors 9 | * 10 | * Released under GNU LGPL. Read the file 'COPYING' for more information. 11 | */ 12 | 13 | #ifndef SEEN_REMOVEOVERLAP_CONSTRAINT_H 14 | #define SEEN_REMOVEOVERLAP_CONSTRAINT_H 15 | 16 | #include 17 | #include "variable.h" 18 | 19 | class Constraint 20 | { 21 | friend std::ostream& operator <<(std::ostream &os,const Constraint &c); 22 | public: 23 | Variable *left; 24 | Variable *right; 25 | double gap; 26 | double lm; 27 | Constraint(Variable *left, Variable *right, double gap, bool equality=false); 28 | ~Constraint(); 29 | inline double slack() const { return right->position() - gap - left->position(); } 30 | long timeStamp; 31 | bool active; 32 | bool visited; 33 | bool equality; 34 | }; 35 | #include 36 | #include "block.h" 37 | static inline bool compareConstraints(Constraint *const &l, Constraint *const &r) { 38 | double const sl = 39 | l->left->block->timeStamp > l->timeStamp 40 | ||l->left->block==l->right->block 41 | ?-DBL_MAX:l->slack(); 42 | double const sr = 43 | r->left->block->timeStamp > r->timeStamp 44 | ||r->left->block==r->right->block 45 | ?-DBL_MAX:r->slack(); 46 | if(sl==sr) { 47 | // arbitrary choice based on id 48 | if(l->left->id==r->left->id) { 49 | if(l->right->idright->id) return true; 50 | return false; 51 | } 52 | if(l->left->idleft->id) return true; 53 | return false; 54 | } 55 | return sl < sr; 56 | } 57 | 58 | #endif // SEEN_REMOVEOVERLAP_CONSTRAINT_H 59 | -------------------------------------------------------------------------------- /experimental/solve_VPSC/libvpsc/pairingheap/dsexceptions.h: -------------------------------------------------------------------------------- 1 | #ifndef DSEXCEPTIONS_H_ 2 | #define DSEXCEPTIONS_H_ 3 | 4 | class Underflow { }; 5 | class Overflow { }; 6 | class OutOfMemory { }; 7 | class BadIterator { }; 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /experimental/solve_VPSC/libvpsc/remove_rectangle_overlap.h: -------------------------------------------------------------------------------- 1 | #ifndef REMOVE_RECTANGLE_OVERLAP_H_SEEN 2 | #define REMOVE_RECTANGLE_OVERLAP_H_SEEN 3 | 4 | /** 5 | * \file Declaration of main internal remove-overlaps function. 6 | */ 7 | /* 8 | * Authors: 9 | * Tim Dwyer 10 | * 11 | * Copyright (C) 2005 Authors 12 | * 13 | * Released under GNU LGPL. Read the file 'COPYING' for more information. 14 | */ 15 | 16 | class Rectangle; 17 | 18 | void removeRectangleOverlap(Rectangle *rs[], int n, double xBorder, double yBorder); 19 | 20 | 21 | #endif /* !REMOVE_RECTANGLE_OVERLAP_H_SEEN */ 22 | -------------------------------------------------------------------------------- /experimental/solve_VPSC/libvpsc/removeoverlap.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \brief Remove overlaps function 3 | * 4 | * Authors: 5 | * Tim Dwyer 6 | * 7 | * Copyright (C) 2005 Authors 8 | * 9 | * Released under GNU LGPL. Read the file 'COPYING' for more information. 10 | */ 11 | 12 | #ifndef SEEN_REMOVEOVERLAP_H 13 | #define SEEN_REMOVEOVERLAP_H 14 | 15 | void removeoverlap(GSList const *items, double xGap, double yGap); 16 | 17 | #endif // SEEN_REMOVEOVERLAP_H 18 | -------------------------------------------------------------------------------- /experimental/solve_VPSC/libvpsc/variable.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Authors: 4 | * Tim Dwyer 5 | * 6 | * Copyright (C) 2005 Authors 7 | * 8 | * Released under GNU LGPL. Read the file 'COPYING' for more information. 9 | */ 10 | #include "variable.h" 11 | std::ostream& operator <<(std::ostream &os, const Variable &v) { 12 | os << "(" << v.id << "=" << v.position() << ")"; 13 | return os; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /experimental/solve_VPSC/libvpsc/variable.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Authors: 4 | * Tim Dwyer 5 | * 6 | * Copyright (C) 2005 Authors 7 | * 8 | * Released under GNU LGPL. Read the file 'COPYING' for more information. 9 | */ 10 | #ifndef SEEN_REMOVEOVERLAP_VARIABLE_H 11 | #define SEEN_REMOVEOVERLAP_VARIABLE_H 12 | 13 | #include 14 | #include 15 | class Block; 16 | class Constraint; 17 | #include "block.h" 18 | 19 | typedef std::vector Constraints; 20 | class Variable 21 | { 22 | friend std::ostream& operator <<(std::ostream &os, const Variable &v); 23 | public: 24 | const int id; // useful in log files 25 | double desiredPosition; 26 | const double weight; 27 | double offset; 28 | Block *block; 29 | bool visited; 30 | Constraints in; 31 | Constraints out; 32 | char *toString(); 33 | inline Variable(const int id, const double desiredPos, const double weight) 34 | : id(id) 35 | , desiredPosition(desiredPos) 36 | , weight(weight) 37 | , offset(0) 38 | , block(NULL) 39 | , visited(false) 40 | { 41 | } 42 | inline double position() const { 43 | return block->posn+offset; 44 | } 45 | //double position() const; 46 | ~Variable(void){ 47 | in.clear(); 48 | out.clear(); 49 | } 50 | }; 51 | #endif // SEEN_REMOVEOVERLAP_VARIABLE_H 52 | -------------------------------------------------------------------------------- /experimental/solve_VPSC/tests/Makefile.am: -------------------------------------------------------------------------------- 1 | INCLUDES = -I$(top_srcdir)/libvpsc 2 | check_PROGRAMS = rectangleoverlap csolve_VPSC block satisfy_inc 3 | satisfy_inc_SOURCES = satisfy_inc.cpp 4 | satisfy_inc_LDADD = $(top_srcdir)/libvpsc/libvpsc.la 5 | block_SOURCES = block.cpp 6 | block_LDADD = $(top_srcdir)/libvpsc/libvpsc.la 7 | rectangleoverlap_SOURCES = rectangleoverlap.cpp 8 | rectangleoverlap_LDADD = $(top_srcdir)/libvpsc/libvpsc.la 9 | csolve_VPSC_SOURCES = csolve_VPSC.c 10 | csolve_VPSC_LDADD = $(top_srcdir)/libvpsc/libvpsc.la 11 | 12 | TESTS = csolve_VPSC $(check_PROGRAMS) 13 | 14 | -------------------------------------------------------------------------------- /experimental/solve_VPSC/tests/csolve_VPSC.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "csolve_VPSC.h" 4 | 5 | int main(int argc, char **argv) { 6 | Variable* v1 = newVariable(1, 1.0, 1.0); 7 | Variable* v2 = newVariable(1, 2.0, 1.0); 8 | Constraint* c = newConstraint(v1,v2,2.0); 9 | int n=2, m=1, i; 10 | Variable** vs = (Variable**)malloc(n*sizeof(Variable*)); 11 | Constraint** cs = (Constraint**)malloc(m*sizeof(Constraint*)); 12 | vs[0]=v1; 13 | vs[1]=v2; 14 | cs[0]=c; 15 | VPSC* vpsc = newIncVPSC(n,vs,m,cs); 16 | satisfyVPSC(vpsc); 17 | splitIncVPSC(vpsc); 18 | printf("v=%f,%f\n",getVariablePos(v1),getVariablePos(v2)); 19 | for(i=0;i