コード例 #1
0
 OGDFPlanarizationGrid(const tlp::PluginContext* context) :OGDFLayoutPluginBase(context, new ogdf::PlanarizationGridLayout()) {
   addInParameter<double>("page ratio",
                          HTML_HELP_OPEN()
                          HTML_HELP_DEF( "type", "double" )
                          HTML_HELP_BODY()
                          "Sets the option pageRatio."
                          HTML_HELP_CLOSE(),
                          "1.0");
   addInParameter<StringCollection>(ELT_PLANARSUBGRAPH,
                                    HTML_HELP_DEF( "type", "StringCollection")
                                    HTML_HELP_DEF("values", "- FastPlanarSubgraph <i>(Computation of a planar subgraph using PQ-trees)</i><br/>- MaximalPlanarSubgraphSimple")
                                    HTML_HELP_DEF( "default", "FastPlanarSubgraph " )
                                    HTML_HELP_BODY()
                                    "Indicates the computation type for the planar subgraph."
                                    HTML_HELP_CLOSE(),
                                    ELT_PLANARSUBGRAPHLIST);
   addInParameter<StringCollection>(ELT_EDGEINSERTION,
                                    HTML_HELP_DEF( "type", "StringCollection")
                                    HTML_HELP_DEF("values", "- FixedEmbeddingInserter <i>(Edge insertion module that inserts each edge optimally into a fixed embedding)</i><br/>- VariableEmbeddingInserter <i>(Optimal edge insertion algorithm, which inserts a single edge with a minum number of crossings into a planar graph)</i><br/>- VariableEmbeddingInserter2")
                                    HTML_HELP_DEF( "default", "FixedEmbeddingInserter " )
                                    HTML_HELP_BODY()
                                    "Indicates the type of edge insertion."
                                    HTML_HELP_CLOSE(),
                                    ELT_EDGEINSERTIONLIST);
 }
 OGDFFastMultipoleMultiLevelEmbedder(const tlp::PluginContext* context) :OGDFLayoutPluginBase(context, new ogdf::FastMultipoleMultilevelEmbedder()) {
   addInParameter<int>("number of threads",
                       HTML_HELP_OPEN()
                       HTML_HELP_DEF( "type", "int" )
                       HTML_HELP_BODY()
                       "The number of threads to use during the computation of the layout."
                       HTML_HELP_CLOSE(),
                       "2");
 }
コード例 #3
0
  OGDFFastMultipoleMultiLevelEmbedder(const tlp::PluginContext* context) :
    OGDFLayoutPluginBase(context, new ogdf::ComponentSplitterLayout()), fmme(new ogdf::FastMultipoleMultilevelEmbedder()) {
    addInParameter<int>("number of threads",
                        HTML_HELP_OPEN()
                        HTML_HELP_DEF( "type", "int" )
                        HTML_HELP_BODY()
                        "The number of threads to use during the computation of the layout."
                        HTML_HELP_CLOSE(),
                        "2");
    addInParameter<int>("multilevel nodes bound",
                        HTML_HELP_OPEN()
                        HTML_HELP_DEF( "type", "int" )
                        HTML_HELP_BODY()
                        "The bound for the number of nodes for multilevel step."
                        HTML_HELP_CLOSE(),
                        "10");

    ogdf::ComponentSplitterLayout *csl = reinterpret_cast<ogdf::ComponentSplitterLayout*>(ogdfLayoutAlgo);
    // ComponentSplitterLayout takes ownership of the FastMultipoleMultilevelEmbedder instance
    csl->setLayoutModule(fmme);

  }
コード例 #4
0
ファイル: OGDFCircular.cpp プロジェクト: mneumann/tulip
 OGDFCircular(const tlp::PluginContext* context) :OGDFLayoutPluginBase(context, new ogdf::CircularLayout()) {
   addInParameter<double> ("minDistCircle",
                           HTML_HELP_OPEN()
                           HTML_HELP_DEF( "type", "double" )
                           HTML_HELP_BODY()
                           "The minimal distance between nodes on a circle."
                           HTML_HELP_CLOSE(),
                           "20.0", false);
   addInParameter<double> ("minDistLevel",
                           HTML_HELP_OPEN()
                           HTML_HELP_DEF( "type", "double" )
                           HTML_HELP_BODY()
                           "The minimal distance between father and child circle. "
                           HTML_HELP_CLOSE(),
                           "20.0", false);
   addInParameter<double> ("minDistSibling",
                           HTML_HELP_OPEN()
                           HTML_HELP_DEF( "type", "double" )
                           HTML_HELP_BODY()
                           "The minimal distance between circles on same level. "
                           HTML_HELP_CLOSE(),
                           "10.0", false);
   addInParameter<double> ("minDistCC",
                           HTML_HELP_OPEN()
                           HTML_HELP_DEF( "type", "double" )
                           HTML_HELP_BODY()
                           "The minimal distance between connected components."
                           HTML_HELP_CLOSE(),
                           "20.0", false);
   addInParameter<double> ("pageRatio",
                           HTML_HELP_OPEN()
                           HTML_HELP_DEF( "type", "double" )
                           HTML_HELP_BODY()
                           "The page ratio used for packing connected components."
                           HTML_HELP_CLOSE(),
                           "1.0", false);
 }
コード例 #5
0
 OGDFTree(const tlp::PluginContext* context) :OGDFLayoutPluginBase(context, new ogdf::TreeLayout()) {
   addInParameter<double>("siblings distance",
                          HTML_HELP_OPEN()
                          HTML_HELP_DEF( "type", "double" )
                          HTML_HELP_BODY()
                          "The minimal required horizontal distance between siblings."
                          HTML_HELP_CLOSE(),
                          "20");
   addInParameter<double>("subtrees distance",
                          HTML_HELP_OPEN()
                          HTML_HELP_DEF( "type", "double" )
                          HTML_HELP_BODY()
                          "The minimal required horizontal distance between subtrees."
                          HTML_HELP_CLOSE(),
                          "20");
   addInParameter<double>("levels distance",
                          HTML_HELP_OPEN()
                          HTML_HELP_DEF( "type", "double" )
                          HTML_HELP_BODY()
                          "The minimal required vertical distance between levels."
                          HTML_HELP_CLOSE(),
                          "50");
   addInParameter<double>("trees distance",
                          HTML_HELP_OPEN()
                          HTML_HELP_DEF( "type", "double" )
                          HTML_HELP_BODY()
                          "The minimal required horizontal distance between trees in the forest."
                          HTML_HELP_CLOSE(),
                          "50");
   addInParameter<bool>("orthogonal layout",
                        HTML_HELP_OPEN()
                        HTML_HELP_DEF( "type", "bool" )
                        HTML_HELP_BODY()
                        "Indicates whether orthogonal edge routing style is used or not."
                        HTML_HELP_CLOSE(),
                        "false");
   addInParameter<StringCollection>(ELT_ORIENTATION,
                                    HTML_HELP_DEF( "type", "StringCollection")
                                    HTML_HELP_DEF("values", "- topToBottom <i>(Edges are oriented from top to bottom)</i><br/>- bottomToTop <i>(Edges are oriented from bottom to top)</i><br>- leftToRight <i>(Edges are oriented from left to right)</i><br/>- rightToLeft <i>(Edges are oriented from right to left)</i>")
                                    HTML_HELP_DEF( "default", "topToBottom " )
                                    HTML_HELP_BODY()
                                    "This parameter indicates the orientation of the layout."
                                    HTML_HELP_CLOSE(),
                                    ELT_ORIENTATIONLIST);
   addInParameter<StringCollection>(ELT_ROOTSELECTION,
                                    HTML_HELP_DEF( "type", "StringCollection")
                                    HTML_HELP_DEF("values", "- rootIsSource <i>(Select a source in the graph)</i><br>- rootIsSink <i>(Select a sink in the graph)</i><br/>- rootByCoord <i>(Use the coordinates, e.g., select the topmost node if orientation is topToBottom)</i>")
                                    HTML_HELP_DEF( "default", "rootIsSource " )
                                    HTML_HELP_BODY()
                                    "This parameter that indicates how the root is selected."
                                    HTML_HELP_CLOSE(),
                                    ELT_ROOTSELECTIONLIST);
 }
コード例 #6
0
ファイル: routes.cpp プロジェクト: nateucar/tulip_infiniband
 *
 */

#include<fstream>
#include "routes.h"
#include "fabric.h"
#include "ibautils/ib_fabric.h"
#include "ibautils/ib_parser.h"
#include "ibautils/regex.h"

PLUGIN(ImportInfinibandRoutes)

static const char * paramHelp[] = {
  // File to Open
  HTML_HELP_OPEN() \
  HTML_HELP_DEF( "type", "pathname" ) \
  HTML_HELP_BODY() \
  "Path to ibdiagnet2.fdbs file to import" \
  HTML_HELP_CLOSE()
};

ImportInfinibandRoutes::ImportInfinibandRoutes(tlp::PluginContext* context)
  : tlp::Algorithm(context)
{
  addInParameter<std::string>("file::filename", paramHelp[0],"");
}

namespace ib = infiniband;
namespace ibp = infiniband::parser;

bool ImportInfinibandRoutes::run()
コード例 #7
0
ファイル: ColorAlgorithm.cpp プロジェクト: kdbanman/browseRDF
 * as published by the Free Software Foundation, either version 3
 * of the License, or (at your option) any later version.
 *
 * Tulip is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 */

#include <tulip/ColorAlgorithm.h>
#include <tulip/ColorProperty.h>

static const char * paramHelp[] = {
  HTML_HELP_OPEN() \
  HTML_HELP_DEF( "type", "ColorProperty" ) \
  HTML_HELP_DEF( "default", "\"viewColor\"" ) \
  HTML_HELP_BODY() \
  "This parameter indicates the property to compute." \
  HTML_HELP_CLOSE(),
};

tlp::ColorAlgorithm::ColorAlgorithm (const tlp::AlgorithmContext &context):tlp::Algorithm(context), colorResult(NULL) {
  addOutParameter<tlp::ColorProperty>("result", paramHelp[0],
                                      "viewColor");

  if (dataSet != NULL)
    dataSet->get("result", colorResult);
}

tlp::ColorAlgorithm::~ColorAlgorithm() {