void beforeCall() { ogdf::PlanarizationGridLayout *pgl = static_cast<ogdf::PlanarizationGridLayout*>(ogdfLayoutAlgo); if (dataSet != NULL) { double dval = 0; StringCollection sc; if (dataSet->get("page ratio", dval)) pgl->pageRatio(dval); if (dataSet->get(ELT_PLANARSUBGRAPH, sc)) { if (sc.getCurrent() == ELT_FASTPLANAR) { pgl->setSubgraph(new ogdf::FastPlanarSubgraph()); } else { pgl->setSubgraph(new ogdf::MaximalPlanarSubgraphSimple()); } } if (dataSet->get(ELT_EDGEINSERTION, sc)) { if (sc.getCurrent() == ELT_FIXEDEMBEDDING) { pgl->setInserter(new ogdf::FixedEmbeddingInserter()); } else { pgl->setInserter(new ogdf::VariableEmbeddingInserter); } } } }
void beforeCall() { ogdf::TreeLayout *tree = static_cast<ogdf::TreeLayout*>(ogdfLayoutAlgo); if (dataSet != NULL) { double dval = 0; bool bval = false; StringCollection sc; if (dataSet->get("siblings distance", dval)) tree->siblingDistance(dval); if (dataSet->get("subtrees distance", dval)) tree->subtreeDistance(dval); if (dataSet->get("levels distance", dval)) tree->levelDistance(dval); if (dataSet->get("trees distance", dval)) tree->treeDistance(dval); if (dataSet->get("orthogonal layout", bval)) tree->orthogonalLayout(bval); if (dataSet->get(ELT_ORIENTATION, sc)) { if (sc.getCurrent() == ELT_TOPTOBOTTOM) { tree->orientation(ogdf::topToBottom); } else if (sc.getCurrent() == ELT_BOTTOMTOTOP) { tree->orientation(ogdf::bottomToTop); } else if (sc.getCurrent() == ELT_LEFTTORIGHT) { tree->orientation(ogdf::leftToRight); } else { tree->orientation(ogdf::rightToLeft); } } if (dataSet->get(ELT_ROOTSELECTION, sc)) { if (sc.getCurrent() == ELT_ROOTSOURCE) { tree->rootSelection(ogdf::TreeLayout::rootIsSource); } else if (sc.getCurrent() == ELT_ROOTSINK) { tree->rootSelection(ogdf::TreeLayout::rootIsSink); } else { tree->rootSelection(ogdf::TreeLayout::rootByCoord); } } } }
void OGDFGemFrick::beforeCall() { ogdf::GEMLayout *gem = static_cast<ogdf::GEMLayout*>(ogdfLayoutAlgo); if (dataSet != NULL) { int ival = 0; double dval = 0; StringCollection sc; if (dataSet->get("number of rounds", ival)) { gem->numberOfRounds(ival); } if (dataSet->get("minimal temperature", dval)) { gem->minimalTemperature(dval); } if (dataSet->get("initial temperature", dval)) { gem->initialTemperature(dval); } if (dataSet->get("gravitational constant", dval)) { gem->gravitationalConstant(dval); } if (dataSet->get("desired length", dval)) { gem->desiredLength(dval); } if (dataSet->get("maximal disturbance", dval)) { gem->maximalDisturbance(dval); } if (dataSet->get("rotation angle", dval)) { gem->rotationAngle(dval); } if (dataSet->get("oscillation angle", dval)) { gem->oscillationAngle(dval); } if (dataSet->get("rotation sensitivity", dval)) { gem->rotationSensitivity(dval); } if (dataSet->get("oscillation sensitivity", dval)) { gem->oscillationSensitivity(dval); } if (dataSet->get(ELT_ATTRACTIONFORMULA, sc)) { gem->attractionFormula(sc.getCurrent() + 1); } if (dataSet->get("minDistCC", dval)) gem->minDistCC(dval); if (dataSet->get("pageRatio", dval)) gem->pageRatio(dval); } }
void beforeCall() { ogdf::SugiyamaLayout *sugiyama = static_cast<ogdf::SugiyamaLayout*>(ogdfLayoutAlgo); if (dataSet != NULL) { int ival = 0; double dval = 0; bool bval = false; StringCollection sc; if (dataSet->get("fails", ival)) sugiyama->fails(ival); if (dataSet->get("runs", ival)) sugiyama->runs(ival); if (dataSet->get("arrangeCCS", bval)) sugiyama->arrangeCCs(bval); if (dataSet->get("minDistCC", dval)) sugiyama->minDistCC(dval); if (dataSet->get("pageRatio", dval)) sugiyama->pageRatio(dval); if (dataSet->get("alignBaseClasses", bval)) sugiyama->alignBaseClasses(bval); if (dataSet->get("alignSiblings", bval)) sugiyama->alignSiblings(bval); if (dataSet->get(ELT_RANKING, sc)) { if (sc.getCurrent() == ELT_LONGESTPATHRANKING) { sugiyama->setRanking(new ogdf::LongestPathRanking()); } else if(sc.getCurrent() == ELT_OPTIMALRANKING) { sugiyama->setRanking(new ogdf::OptimalRanking()); } else sugiyama->setRanking(new ogdf::CoffmanGrahamRanking()); } if (dataSet->get(ELT_TWOLAYERCROSS, sc)) { if (sc.getCurrent() == ELT_BARYCENTER) { sugiyama->setCrossMin(new ogdf::BarycenterHeuristic()); } else if (sc.getCurrent() == ELT_MEDIAN) { sugiyama->setCrossMin(new ogdf::MedianHeuristic()); } else if(sc.getCurrent()==ELT_SPLIT) { sugiyama->setCrossMin(new ogdf::SplitHeuristic()); } else if(sc.getCurrent()==ELT_SIFTING) { sugiyama->setCrossMin(new ogdf::SiftingHeuristic()); } else if(sc.getCurrent()==ELT_GREEDYINSERT) { sugiyama->setCrossMin(new ogdf::GreedyInsertHeuristic()); } else sugiyama->setCrossMin(new ogdf::GreedySwitchHeuristic()); } if(dataSet->get(ELT_HIERARCHYLAYOUT, sc)) { double nodeDistance = 3; double layerDistance = 3; bool fixedLayerDistance = true; dataSet->get("node distance", nodeDistance); dataSet->get("layer distance", layerDistance); dataSet->get("fixed layer distance", fixedLayerDistance); if(sc.getCurrent()==ELT_FASTHIERARCHY) { ogdf::FastHierarchyLayout *fhl = new FastHierarchyLayout(); fhl->nodeDistance(nodeDistance); fhl->layerDistance(layerDistance); fhl->fixedLayerDistance(fixedLayerDistance); sugiyama->setLayout(fhl); } else { sugiyama->setLayout(new ogdf::FastSimpleHierarchyLayout(static_cast<int>(nodeDistance), static_cast<int>(layerDistance))); } } } }