Tulip  5.3.0
Large graphs analysis and drawing
tlp Namespace Reference

Classes

class  AboutTulipPage
 
class  AbstractProperty
 
class  AcyclicTest
 
class  AdditionalGlSceneAnimation
 
class  Algorithm
 
class  AlgorithmContext
 
class  AroundTexturedSphere
 
class  BiconnectedTest
 
class  BooleanAlgorithm
 
class  BooleanProperty
 
class  BooleanVectorProperty
 
struct  BoundingBox
 
class  Camera
 
struct  CheckAllFunctor
 
class  ColorAlgorithm
 
class  ColorProperty
 
class  ColorScale
 
class  ColorScalesManager
 
class  ColorVectorProperty
 
struct  ConcatIterator
 
class  ConnectedTest
 
class  ConversionIterator
 
class  CoordVectorProperty
 
class  DataSet
 
struct  DataType
 
struct  Dependency
 
class  DoubleAlgorithm
 
class  DoubleProperty
 
class  DoubleVectorProperty
 
struct  edge
 
class  Event
 
class  FileDownloader
 
class  FilterIterator
 
class  FloatValidator
 
class  Gl2DRect
 
class  GlAbstractPolygon
 
class  GlAxis
 
class  GlBezierCurve
 
class  GlBox
 
class  GlCatmullRomCurve
 
class  GlCircle
 
class  GlComplexPolygon
 
class  GlComposite
 
class  GlDefaultSelectionColorManager
 
class  GlGraphComposite
 
class  GlGraphRenderer
 
class  GlGraphRenderingParameters
 
class  GlGrid
 
class  GlHexagon
 
class  GLInteractorComponent
 
class  GLInteractorComposite
 
class  GlLabel
 
class  GlLayer
 
class  GlMainView
 
class  GlMainWidget
 
class  GlOpenUniformCubicBSpline
 
class  GlPentagon
 
class  GlPolygon
 
class  GlRect
 
class  GlRegularPolygon
 
class  GlScene
 
class  GlSceneZoomAndPan
 
class  GlSimpleEntity
 
class  GlSphere
 
class  GlStar
 
class  GlTriangle
 
class  Graph
 
class  GraphEvent
 
class  GraphNeedsSavingObserver
 
class  GraphProperty
 
class  IntegerAlgorithm
 
class  IntegerProperty
 
class  IntegerVectorProperty
 
class  Interactor
 
class  InteractorComposite
 
class  InteractorLister
 
struct  Iterator
 
class  LayoutAlgorithm
 
class  LayoutProperty
 
class  MinMaxProperty
 
class  MPConversionIterator
 
struct  node
 
class  NodeLinkDiagramComponentInteractor
 
class  NumericProperty
 
class  Observable
 
class  ObservableException
 
class  ObserverHolder
 
class  OuterPlanarTest
 
class  ParameterDescription
 
struct  ParameterDescriptionList
 
class  Perspective
 
class  PerspectiveContext
 
class  PlanarityTest
 
class  Plugin
 
class  PluginContext
 
class  PluginLister
 
struct  PluginLoader
 
struct  PluginLoaderTxt
 
class  PluginProgress
 
class  ProgressPreviewHandler
 
class  PropertyAlgorithm
 
class  PropertyEvent
 
class  PropertyInterface
 
class  QtGlSceneZoomAndPanAnimator
 
class  ScientificDoubleSpinBox
 
struct  SelectedEntity
 
struct  SelfLoops
 
class  SimpleTest
 
class  SizeAlgorithm
 
class  SizeProperty
 
class  SizeVectorProperty
 
struct  SortEdgeIterator
 
struct  SortExtremitiesEdgeIterator
 
class  SortIterator
 
struct  SortNodeIterator
 
struct  SortSourceEdgeIterator
 
struct  SortTargetEdgeIterator
 
class  StableIterator
 
class  StlIterator
 
class  StringAlgorithm
 
class  StringProperty
 
class  StringVectorProperty
 
class  TemplateAlgorithm
 
class  ThreadManager
 
class  TreeTest
 
class  TriconnectedTest
 
class  TulipFontAwesome
 
class  TulipIconicFont
 
class  TulipMaterialDesignIcons
 
class  TulipProject
 
class  UniqueIterator
 
class  VectorPropertyInterface
 
class  View
 
class  ViewWidget
 
class  WithDependency
 
struct  WithParameter
 

Typedefs

typedef AbstractProperty< tlp::ColorType, tlp::ColorType > AbstractColorProperty
 
typedef AbstractProperty< tlp::GraphType, tlp::EdgeSetType > AbstractGraphProperty
 
typedef AbstractProperty< tlp::PointType, tlp::LineType > AbstractLayoutProperty
 
typedef AbstractProperty< tlp::SizeType, tlp::SizeType > AbstractSizeProperty
 
typedef AbstractProperty< tlp::StringType, tlp::StringType > AbstractStringProperty
 
template<typename T , size_t N>
using Array = std::array< T, N >
 
typedef MinMaxProperty< tlp::DoubleType, tlp::DoubleType, tlp::NumericPropertyDoubleMinMaxProperty
 
typedef MinMaxProperty< tlp::IntegerType, tlp::IntegerType, tlp::NumericPropertyIntegerMinMaxProperty
 
typedef MinMaxProperty< tlp::PointType, tlp::LineType > LayoutMinMaxProperty
 
typedef CoordVectorProperty LayoutVectorProperty
 

Enumerations

enum  ElementType { NODE = 0, EDGE = 1 }
 
enum  ParameterDirection { IN_PARAM = 0, OUT_PARAM = 1, INOUT_PARAM = 2 }
 
enum  ProgressState { TLP_CONTINUE, TLP_CANCEL, TLP_STOP }
 

Functions

template<typename T >
auto begin (Iterator< T > *it) -> decltype(it->begin())
 
QColor colorToQColor (const Color &color)
 
template<class T >
Iterator< T > * concatIterator (Iterator< T > *itOne, Iterator< T > *itTwo)
 
template<typename TOUT , typename ConversionFunc , typename TIN >
ConversionIterator< TIN, TOUT, ConversionFunc > * conversionIterator (tlp::Iterator< TIN > *it, ConversionFunc convFunc)
 
template<typename TOUT , typename ConversionFunc , typename Container >
std::enable_if< has_const_iterator< Container >::value, ConversionIterator< typename Container::value_type, TOUT, ConversionFunc > * >::type conversionIterator (const Container &stlContainer, ConversionFunc convFunc)
 
void convexHull (const std::vector< Coord > &points, std::vector< unsigned int > &convexHull)
 
void convexHull (const std::vector< Coord > &points, std::vector< std::vector< unsigned int >> &convexHullFacets, std::vector< std::vector< unsigned int >> &facetNeighbors)
 
void copyToGraph (Graph *outG, const Graph *inG, BooleanProperty *inSelection=nullptr, BooleanProperty *outSelection=nullptr)
 
std::string demangleClassName (const char *className, bool hideTlp=false)
 
std::string demangleTlpClassName (const char *className)
 
void disableQtUserInput ()
 
void enableQtUserInput ()
 
template<typename T >
auto end (Iterator< T > *it) -> decltype(it->end())
 
bool exportGraph (Graph *graph, std::ostream &outputStream, const std::string &format, DataSet &dataSet, PluginProgress *progress=nullptr)
 
template<typename TYPE , typename FILTER >
FilterIterator< TYPE, FILTER > * filterIterator (Iterator< TYPE > *it, FILTER filter)
 
template<typename Container , typename FILTER >
std::enable_if< has_const_iterator< Container >::value, MPFilterIterator< typename Container::value_type, FILTER > * >::type filterIterator (const Container &stlContainer, FILTER filter)
 
bool getColorDialog (const QColor &color, QWidget *parent, const QString &title, QColor &result)
 
std::istream * getIgzstream (const std::string &name, int open_mode=std::ios::in)
 
std::istream * getInputFileStream (const std::string &filename, std::ios_base::openmode open_mode=std::ios::in)
 
std::string getMajor (const std::string &release)
 
std::string getMinor (const std::string &release)
 
std::ostream * getOgzstream (const std::string &name, int open_mode=std::ios::out)
 
std::ostream * getOutputFileStream (const std::string &filename, std::ios_base::openmode open_mode=std::ios::out)
 
QString getPluginLocalInstallationDir ()
 
QString getPluginPackageName (const QString &pluginName)
 
QString getPluginStagingDirectory ()
 
Iterator< Graph * > * getRootGraphs ()
 
unsigned int getSeedOfRandomSequence ()
 
GraphimportGraph (const std::string &format, DataSet &dataSet, PluginProgress *progress=nullptr, Graph *newGraph=nullptr)
 
void initRandomSequence ()
 
void initTulipLib (const char *appDirPath=nullptr)
 
void initTulipSoftware (PluginLoader *loader=nullptr, bool removeDiscardedPlugins=false)
 
template<typename T >
unsigned int iteratorCount (Iterator< T > *it)
 
template<typename T >
bool iteratorCountCheck (Iterator< T > *it, unsigned int minNbElements)
 
template<typename T >
bool iteratorEmpty (Iterator< T > *it)
 
template<typename T >
std::list< T > iteratorList (Iterator< T > *it)
 
template<typename T , class MapFunction >
void iteratorMap (Iterator< T > *it, MapFunction &&mapFunction)
 
template<typename T , typename reduceType , class ReduceFunction >
reduceType iteratorReduce (Iterator< T > *it, const reduceType &initVal, ReduceFunction reduceFunction)
 
template<typename T >
std::set< T > iteratorSet (Iterator< T > *it)
 
template<typename T >
std::vector< T > iteratorVector (Iterator< T > *it)
 
GraphloadGraph (const std::string &filename, tlp::PluginProgress *progress=nullptr)
 
QString localPluginsPath ()
 
GraphnewGraph ()
 
template<typename T , size_t N>
std::ostream & operator<< (std::ostream &os, const Array< T, N > &array)
 
template<typename T , size_t N>
std::istream & operator>> (std::istream &is, Array< T, N > &array)
 
QString propertyInterfaceToPropertyTypeLabel (const tlp::PropertyInterface *const property)
 
std::string propertyTypeLabelToPropertyType (const QString &typeNameLabel)
 
QString propertyTypeToPropertyTypeLabel (const std::string &typeName)
 
Color QColorToColor (const QColor &color)
 
bool QStringCaseCmp (const QString &s1, const QString &s2)
 
std::string QStringToTlpString (const QString &toConvert)
 
double randomDouble (double max=1.0)
 
int randomInteger (int max)
 
unsigned int randomUnsignedInteger (unsigned int max)
 
void redirectDebugOutputToQDebug ()
 
void redirectErrorOutputToQCritical ()
 
void redirectWarningOutputToQWarning ()
 
void removeFromGraph (Graph *ioG, BooleanProperty *inSelection=nullptr)
 
bool saveGraph (Graph *graph, const std::string &filename, tlp::PluginProgress *progress=nullptr, tlp::DataSet *data=nullptr)
 
void setSeedOfRandomSequence (unsigned int seed=UINT_MAX)
 
template<typename T , typename CompareFunction >
SortIterator< T, CompareFunction > * sortIterator (Iterator< T > *it, CompareFunction &&compFunc)
 
template<typename Container , typename CompareFunction >
std::enable_if< has_const_iterator< Container >::value, SortIterator< typename Container::value_type, CompareFunction > * >::type sortIterator (const Container &stlContainer, CompareFunction &&compFunc)
 
template<class T >
StableIterator< T > * stableIterator (Iterator< T > *it)
 
template<typename Container >
std::enable_if< has_const_iterator< Container >::value, StableIterator< typename Container::value_type > * >::type stableIterator (const Container &stlContainer)
 
int statPath (const std::string &pathname, tlp_stat_t *buf)
 
template<typename Container >
std::enable_if< has_const_iterator< Container >::value, StlIterator< typename Container::value_type, typename Container::const_iterator > * >::type stlIterator (const Container &stlContainer)
 
template<typename EdgeIndexFunction >
void TLP_MAP_EDGES_AND_INDICES (const tlp::Graph *graph, const EdgeIndexFunction &edgeIndexFunction)
 
template<typename NodeIndexFunction >
void TLP_MAP_NODES_AND_INDICES (const tlp::Graph *graph, const NodeIndexFunction &nodeIndexFunction)
 
template<typename EdgeFunction >
void TLP_PARALLEL_MAP_EDGES (const tlp::Graph *graph, const EdgeFunction &edgeFunction)
 
template<typename EdgeFunction >
void TLP_PARALLEL_MAP_EDGES_AND_INDICES (const tlp::Graph *graph, const EdgeFunction &edgeFunction)
 
template<typename IdxFunction >
void TLP_PARALLEL_MAP_INDICES (size_t maxIdx, const IdxFunction &idxFunction)
 
template<typename NodeFunction >
void TLP_PARALLEL_MAP_NODES (const tlp::Graph *graph, const NodeFunction &nodeFunction)
 
template<typename NodeFunction >
void TLP_PARALLEL_MAP_NODES_AND_INDICES (const tlp::Graph *graph, const NodeFunction &nodeFunction)
 
template<typename EltType , typename IdxFunction >
void TLP_PARALLEL_MAP_VECTOR (const std::vector< EltType > &vect, const IdxFunction &idxFunction)
 
template<typename EltType , typename IdxFunction >
void TLP_PARALLEL_MAP_VECTOR_AND_INDICES (const std::vector< EltType > &vect, const IdxFunction &idxFunction)
 
template<typename F1 , typename F2 >
void TLP_PARALLEL_SECTIONS (const F1 &f1, const F2 &f2)
 
template<typename F1 , typename F2 , typename F3 >
void TLP_PARALLEL_SECTIONS (const F1 &f1, const F2 &f2, const F3 &f3)
 
template<typename F1 , typename F2 , typename F3 , typename F4 >
void TLP_PARALLEL_SECTIONS (const F1 &f1, const F2 &f2, const F3 &f3, const F4 &f4)
 
QString tlpStringToQString (const std::string &toConvert)
 
template<typename T , typename CheckFunc = CheckAllFunctor<T>>
UniqueIterator< T > * uniqueIterator (Iterator< T > *it, CheckFunc checkFunctor=CheckFunc())
 
template<typename Container , typename CheckFunc = CheckAllFunctor<typename Container::value_type>>
std::enable_if< has_const_iterator< Container >::value, UniqueIterator< typename Container::value_type, CheckFunc > * >::type uniqueIterator (const Container &stlContainer, CheckFunc checkFunctor=CheckFunc())
 

Variables

static const std::string ALGORITHM_CATEGORY = "Algorithm"
 
static const std::string BOOLEAN_ALGORITHM_CATEGORY = "Selection"
 
static const std::string COLOR_ALGORITHM_CATEGORY = "Coloring"
 
static const std::string DOUBLE_ALGORITHM_CATEGORY = "Measure"
 
static const std::string INTEGER_ALGORITHM_CATEGORY = "Measure"
 
static const std::string INTERACTOR_CATEGORY = "Interactor"
 
static const std::string LAYOUT_ALGORITHM_CATEGORY = "Layout"
 
const char PATH_DELIMITER
 
static const std::string PERSPECTIVE_CATEGORY = "Perspective"
 
static const std::string PROPERTY_ALGORITHM_CATEGORY = "Property"
 
static const std::string SIZE_ALGORITHM_CATEGORY = "Resizing"
 
static const std::string STRING_ALGORITHM_CATEGORY = "Labeling"
 
std::string TulipBitmapDir
 
std::string TulipLibDir
 
std::string TulipPluginsPath
 
std::string TulipShareDir
 
static const std::string VIEW_CATEGORY = "Panel"
 

Detailed Description

This file is part of Tulip (http://tulip.labri.fr)

Authors: David Auber and the Tulip development Team from LaBRI, University of Bordeaux

Tulip is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License 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.

Enumeration Type Documentation

◆ ElementType

Enumerator
NODE 

This element describes a node

EDGE 

This element describes an edge

Definition at line 48 of file Graph.h.

Function Documentation

◆ concatIterator()

template<class T >
Iterator<T>* tlp::concatIterator ( Iterator< T > *  itOne,
Iterator< T > *  itTwo 
)

Convenient function for creating a ConcatIterator.

Since
Tulip 5.2

Creates a ConcatIterator from two other Iterators. The returned Iterator takes ownership of the one provided as parameter.

Parameters
itOnethe first input Iterator
itTwothe second input Iterator
Returns
a ConcatIterator

Definition at line 84 of file ConcatIterator.h.

◆ conversionIterator() [1/2]

template<typename TOUT , typename ConversionFunc , typename TIN >
ConversionIterator<TIN, TOUT, ConversionFunc>* tlp::conversionIterator ( tlp::Iterator< TIN > *  it,
ConversionFunc  convFunc 
)
inline

Convenient function for creating a ConversionIterator.

Since
Tulip 5.2

Creates a ConversionIterator from another Iterator and a conversion function. The returned Iterator takes ownership of the one provided as parameter.

Parameters
ita Tulip Iterator
convFuncfunctor or lambda function converting a value of type TYPEIN to type TYPEOUT
Returns
a ConversionIterator

Definition at line 94 of file ConversionIterator.h.

◆ conversionIterator() [2/2]

template<typename TOUT , typename ConversionFunc , typename Container >
std::enable_if<has_const_iterator<Container>::value, ConversionIterator<typename Container::value_type, TOUT, ConversionFunc> *>::type tlp::conversionIterator ( const Container &  stlContainer,
ConversionFunc  convFunc 
)
inline

Convenient function for creating a ConversionIterator from a STL container.

Since
Tulip 5.2

Creates a ConversionIterator from a STL container (std::list, std::vector, std::set, std::map, ...) and a conversion function.

Parameters
stlContainerany STL container
convFuncfunctor or lambda function converting a value from the container to type TYPEOUT
Returns
a ConversionIterator

Definition at line 118 of file ConversionIterator.h.

+ Here is the call graph for this function:

◆ convexHull() [1/2]

void tlp::convexHull ( const std::vector< Coord > &  points,
std::vector< unsigned int > &  convexHull 
)

function for computing a 2D convex hull

Computes a 2D convex hull using the Qhull library (www.qhull.org)

Computes the 2D convex hull and returns a list of indexes for the points on the convex hull in counterclockwise order.

The convexHull vector is automatically cleared.

◆ convexHull() [2/2]

void tlp::convexHull ( const std::vector< Coord > &  points,
std::vector< std::vector< unsigned int >> &  convexHullFacets,
std::vector< std::vector< unsigned int >> &  facetNeighbors 
)

function for computing a 2D/3D convex hull

Computes a 2D/3D convex hull using the Qhull library (www.qhull.org)

Computes a 2D/3D convex hull and returns a list of the hull facets (segments for 2D, triangles for 3D) and a list of neighbors facets for each facet. A facet is defined by a list of indexes in the points vector. The neighbors facets of a facet are defined by a list of indexes in the convexHullFacets vector (facetNeighbors[i] stores the neighbors of facet convexHullFacets[i]).

The convexHullFacets and facetNeighbors vectors are automatically cleared.

◆ filterIterator() [1/2]

template<typename TYPE , typename FILTER >
FilterIterator<TYPE, FILTER>* tlp::filterIterator ( Iterator< TYPE > *  it,
FILTER  filter 
)
inline

Convenient function for creating a FilterIterator.

Since
Tulip 5.2

Creates a FilterIterator from another iterator and a filter function. The returned iterator takes ownership of the one provided as parameter.

Parameters
ita Tulip iterator
filterthe functor or lambda function that enables to test whether or not an element is filtered
Returns
a FilterIterator

Definition at line 106 of file FilterIterator.h.

◆ filterIterator() [2/2]

template<typename Container , typename FILTER >
std::enable_if<has_const_iterator<Container>::value, MPFilterIterator<typename Container::value_type, FILTER> *>::type tlp::filterIterator ( const Container &  stlContainer,
FILTER  filter 
)
inline

Convenient function for creating a FilterIterator from a STL container.

Since
Tulip 5.2

Creates a FilterIterator from a STL container (std::list, std::vector, std::set, std::map, ...) and a filter function.

Parameters
stlContainerany STL container
filterthe functor or lambda function that enables to test whether or not an element is filtered
Returns
a FilterIterator

Definition at line 127 of file FilterIterator.h.

+ Here is the call graph for this function:

◆ getIgzstream()

std::istream* tlp::getIgzstream ( const std::string &  name,
int  open_mode = std::ios::in 
)

Returns an istream to read from a gzipped file (uses gzstream lib). The stream has to be deleted after use.

Parameters
nameThe name of the file to read from.
open_modeThe mode to open the file with. Defaults to std::ios::in.
Returns
istream gzipped input stream from a file.
+ Here is the caller graph for this function:

◆ getInputFileStream()

std::istream* tlp::getInputFileStream ( const std::string &  filename,
std::ios_base::openmode  open_mode = std::ios::in 
)

Cross-platform function to get an input file stream. Its purpose is to support paths on windows platform containing non-ascii characters.

Parameters
filenamean utf-8 encoded string containing the path of the file to open for performing input operations
open_modethe stream opening mode flags (bitwise combination of std::ios_base::openmode constants).
+ Here is the caller graph for this function:

◆ getOgzstream()

std::ostream* tlp::getOgzstream ( const std::string &  name,
int  open_mode = std::ios::out 
)

Returns an ostream to write to a gzipped file (uses gzstream lib). The stream has to be deleted after use.

Warning
Don't forget to check the stream with ios::bad()!
Parameters
nameThe name of the file to write to.
open_modeThe mode to open the file with. Defaults to std::ios::out.
Returns
ostream gzipped output stream to a file.
+ Here is the caller graph for this function:

◆ getOutputFileStream()

std::ostream* tlp::getOutputFileStream ( const std::string &  filename,
std::ios_base::openmode  open_mode = std::ios::out 
)

Cross-platform function to get an output file stream. Its purpose is to support paths on windows platform containing non-ascii characters.

Parameters
filenamean utf-8 encoded string containing the path of the file to open for performing output operations
open_modethe stream opening mode flags (bitwise combination of std::ios_base::openmode constants).
+ Here is the caller graph for this function:

◆ getPluginPackageName()

QString tlp::getPluginPackageName ( const QString &  pluginName)

Gets the name of the package to retrieve for this version of tulip. The package name uses the Tulip release, platform (windows, unix, ...), architecture (x86, x86_64), and compiler used (GCC, Clang, MSVC) to determine which package this version can use.

Parameters
pluginNameThe name of the plugin for which we want the package name.
+ Here is the caller graph for this function:

◆ getSeedOfRandomSequence()

unsigned int tlp::getSeedOfRandomSequence ( )

Returns the value of the seed used for further initialization of a random sequence.

+ Here is the caller graph for this function:

◆ initRandomSequence()

void tlp::initRandomSequence ( )

Initializes a random sequence with the seed previously set Further calls to rand() or random() will return the elements of that sequence.

+ Here is the caller graph for this function:

◆ initTulipSoftware()

void tlp::initTulipSoftware ( PluginLoader loader = nullptr,
bool  removeDiscardedPlugins = false 
)

Sets up environment when creating an executable using Tulip libraries This method performs basic operations when starting a software using Tulip: .

  • It initializes the tulip library
  • it checks plugins to be discarded and uninstalls them
  • It loads plugins from the application path
Examples:
graph_display/graph_display.cpp.
+ Here is the caller graph for this function:

◆ iteratorCount()

template<typename T >
unsigned int tlp::iteratorCount ( Iterator< T > *  it)
inline

Counts the number of iterated elements.

Since
Tulip 5.2

Counts the number of elements iterated by the provided iterator. That function takes ownership of the iterator and will delete it.

Parameters
ita Tulip iterator
Returns
The number of iterated elements

Definition at line 175 of file Iterator.h.

+ Here is the caller graph for this function:

◆ iteratorCountCheck()

template<typename T >
bool tlp::iteratorCountCheck ( Iterator< T > *  it,
unsigned int  minNbElements 
)
inline

Checks a mimimum amount of iterated elements.

Since
Tulip 5.2

Checks if the iterator returns at least n values. That function takes ownership of the iterator and will delete it.

Parameters
ita Tulip iterator
Returns
true if the iterator returns at least n values

Definition at line 199 of file Iterator.h.

+ Here is the caller graph for this function:

◆ iteratorEmpty()

template<typename T >
bool tlp::iteratorEmpty ( Iterator< T > *  it)
inline

Checks if an iterator is empty.

Since
Tulip 5.2

Checks if the iterator does not return any value. That function takes ownership of the iterator and will delete it.

Parameters
ita Tulip iterator
Returns
true if the iterator is empty

Definition at line 227 of file Iterator.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ iteratorList()

template<typename T >
std::list<T> tlp::iteratorList ( Iterator< T > *  it)
inline

Converts an iterator to a std::list.

Since
Tulip 5.2

Returns a std::list filled with the iterated elements. That function takes ownership of the iterator and will delete it.

Parameters
ita Tulip iterator
Returns
a std::list filled with iterated elements

Definition at line 307 of file Iterator.h.

◆ iteratorMap()

template<typename T , class MapFunction >
void tlp::iteratorMap ( Iterator< T > *  it,
MapFunction &&  mapFunction 
)
inline

Applies a function to each iterated element.

Since
Tulip 5.2

Applies a function to each element iterated by the provided iterator. That function takes ownership of the iterator and will delete it.

Parameters
ita Tulip iterator
mapFunctionfunctor or lambda function taking one parameter of the same type of the iterated elements

Definition at line 247 of file Iterator.h.

◆ iteratorReduce()

template<typename T , typename reduceType , class ReduceFunction >
reduceType tlp::iteratorReduce ( Iterator< T > *  it,
const reduceType &  initVal,
ReduceFunction  reduceFunction 
)
inline

Reduces iterated elements to a single value.

Since
Tulip 5.2

Produces a single value from the iterated elements (e.g. sum). That function takes ownership of the iterator and will delete it.

Parameters
ita Tulip iterator
initValinitial value of the reduced result
reduceFunctionfunctor or lambda function taking two parameters : first one being the current reduced value, second one being the current iterated element and returning intermediate reduced value
Returns
the reduced value from the iterated elements

Definition at line 278 of file Iterator.h.

◆ iteratorSet()

template<typename T >
std::set<T> tlp::iteratorSet ( Iterator< T > *  it)
inline

Converts an iterator to a std::set.

Since
Tulip 5.2

Returns a std::set filled with the iterated elements. That function takes ownership of the iterator and will delete it.

Parameters
ita Tulip iterator
Returns
a std::set filled with iterated elements

Definition at line 353 of file Iterator.h.

+ Here is the call graph for this function:

◆ iteratorVector()

template<typename T >
std::vector<T> tlp::iteratorVector ( Iterator< T > *  it)
inline

Converts an iterator to a std::vector.

Since
Tulip 5.2

Returns a std::vector filled with the iterated elements. That function takes ownership of the iterator and will delete it.

Parameters
ita Tulip iterator
Returns
a std::vector filled with iterated elements

Definition at line 330 of file Iterator.h.

◆ operator<<()

template<typename T , size_t N>
std::ostream& tlp::operator<< ( std::ostream &  os,
const Array< T, N > &  array 
)

operator << stream operator to easily print an array, or save it to a file.

Parameters
osThe stream to output to.
arrayThe array to output.
Returns
The stream to output to, to chain calls.
+ Here is the caller graph for this function:

◆ operator>>()

template<typename T , size_t N>
std::istream& tlp::operator>> ( std::istream &  is,
Array< T, N > &  array 
)

operator >> stream operator to easily read an array

Parameters
isThe stream to read from.
arrayA reference to an array, that will be written to.
Returns
The stream to read from, to chain calls.

◆ propertyInterfaceToPropertyTypeLabel()

QString tlp::propertyInterfaceToPropertyTypeLabel ( const tlp::PropertyInterface *const  property)
inline

Get the string to display as property type for the given property. The property type label is the string to display in the GUI instead of the property type string. By example for a property of type "double" the label displayed in the GUI will be "Metric".

Definition at line 78 of file TlpQtTools.h.

+ Here is the call graph for this function:

◆ propertyTypeLabelToPropertyType()

std::string tlp::propertyTypeLabelToPropertyType ( const QString &  typeNameLabel)

Convert the label of a property type to it's corresponding property type. The property type label is the string to display in the GUI instead of the property type string. By example for a property of type "double" the label displayed in the GUI will be "Metric".

+ Here is the caller graph for this function:

◆ propertyTypeToPropertyTypeLabel()

QString tlp::propertyTypeToPropertyTypeLabel ( const std::string &  typeName)

Convert the property type string to a label to display in the GUI. The property type label is the string to display in the GUI instead of the basic property type string.

+ Here is the caller graph for this function:

◆ QStringCaseCmp()

bool tlp::QStringCaseCmp ( const QString &  s1,
const QString &  s2 
)
inline

Case insensitive comparison of two QStrings.

Definition at line 62 of file TlpQtTools.h.

+ Here is the call graph for this function:

◆ QStringToTlpString()

std::string tlp::QStringToTlpString ( const QString &  toConvert)
inline

Convert a QString to a Tulip UTF-8 encoded std::string.

Examples:
graph_display/graph_display.cpp.

Definition at line 49 of file TlpQtTools.h.

◆ randomDouble()

double tlp::randomDouble ( double  max = 1.0)

Returns a random double in the range [0, max].

+ Here is the caller graph for this function:

◆ randomInteger()

int tlp::randomInteger ( int  max)

Returns a random integer in the range [0, max] if max is positive or in the range [max, 0] if max is negative.

+ Here is the caller graph for this function:

◆ randomUnsignedInteger()

unsigned int tlp::randomUnsignedInteger ( unsigned int  max)

Returns a random unsigned integer in the range [0, max].

+ Here is the caller graph for this function:

◆ redirectDebugOutputToQDebug()

void tlp::redirectDebugOutputToQDebug ( )

redirect tlp::debug() to qDebug()

+ Here is the caller graph for this function:

◆ redirectErrorOutputToQCritical()

void tlp::redirectErrorOutputToQCritical ( )

redirect tlp::error() to qCritical()

+ Here is the caller graph for this function:

◆ redirectWarningOutputToQWarning()

void tlp::redirectWarningOutputToQWarning ( )

redirect tlp::warning() to qWarning()

+ Here is the caller graph for this function:

◆ setSeedOfRandomSequence()

void tlp::setSeedOfRandomSequence ( unsigned int  seed = UINT_MAX)

Gives the value of the seed used for further initialization of a random sequence (with further calls to rand() or random()).

Parameters
seedthe value of the seed. Set seed to UINT_MAX if you need a random choice of the seed.
+ Here is the caller graph for this function:

◆ sortIterator() [1/2]

template<typename T , typename CompareFunction >
SortIterator<T, CompareFunction>* tlp::sortIterator ( Iterator< T > *  it,
CompareFunction &&  compFunc 
)
inline

Convenient function for creating a SortIterator.

Since
Tulip 5.2

Creates a SortIterator from another Iterator and a comparison function. The returned Iterator takes ownership of the one provided as parameter.

Parameters
ita Tulip Iterator
compFuncfunctor or lambda function taking two parameters of type const T& and returning a boolean: true if the first parameter is lesser or equal than the second one, false otherwise
Returns
a SortIterator

Definition at line 239 of file SortIterator.h.

◆ sortIterator() [2/2]

template<typename Container , typename CompareFunction >
std::enable_if<has_const_iterator<Container>::value, SortIterator<typename Container::value_type, CompareFunction> *>::type tlp::sortIterator ( const Container &  stlContainer,
CompareFunction &&  compFunc 
)
inline

Convenient function for creating a SortIterator from a STL container.

Since
Tulip 5.2

Creates a SortIterator from another Iterator and a comparison function.

Parameters
stlContainerany STL container
compFuncfunctor or lambda function taking two parameters of type const T& and returning a boolean: true if the first parameter is lesser or equal than the second one, false otherwise
Returns
a SortIterator

Definition at line 262 of file SortIterator.h.

+ Here is the call graph for this function:

◆ stableIterator() [1/2]

template<class T >
StableIterator<T>* tlp::stableIterator ( Iterator< T > *  it)
inline

Convenient function for creating a StableIterator.

Since
Tulip 5.2

Creates a StableIterator from another Iterator. The returned Iterator takes ownership of the one provided as parameter.

Parameters
ita Tulip Iterator
Returns
a StableIterator

Definition at line 136 of file StableIterator.h.

◆ stableIterator() [2/2]

template<typename Container >
std::enable_if<has_const_iterator<Container>::value, StableIterator<typename Container::value_type> *>::type tlp::stableIterator ( const Container &  stlContainer)
inline

Convenient function for creating a StableIterator from a STL container.

Since
Tulip 5.2

Creates a StableIterator from a STL container (std::list, std::vector, std::set, std::map, ...).

Parameters
stlContainerany STL container
Returns
a StableIterator

Definition at line 154 of file StableIterator.h.

+ Here is the call graph for this function:

◆ statPath()

int tlp::statPath ( const std::string &  pathname,
tlp_stat_t *  buf 
)

Cross-platform function to stat a path on a filesystem. Its purpose is to support paths on windows platform containing non-ascii characters.

Parameters
pathnamean utf-8 encoded string containing the path name to stat
bufa pointer to a tlp_stat_t structure (a typedef for struct stat)
+ Here is the caller graph for this function:

◆ stlIterator()

template<typename Container >
std::enable_if< has_const_iterator<Container>::value, StlIterator<typename Container::value_type, typename Container::const_iterator> *>::type tlp::stlIterator ( const Container &  stlContainer)
inline

Convenient function for creating a StlIterator from a stl container.

Since
Tulip 5.2

Creates a StlIterator from a STL container (std::list, std::vector, std::set, std::map, ...).

Parameters
stlContainerany STL container
Returns
a StlIterator

Definition at line 95 of file StlIterator.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TLP_PARALLEL_MAP_EDGES()

template<typename EdgeFunction >
void tlp::TLP_PARALLEL_MAP_EDGES ( const tlp::Graph graph,
const EdgeFunction &  edgeFunction 
)
inline

Template function to ease the creation of OpenMP parallel jobs taking a graph edge as parameter.

Since
Tulip 5.2
Parameters
graphthe graph on which to run job on the edges
edgeFunctioncallable object (e.g. lambda function) taking a tlp::edge as parameter

Example of use:

auto computationIntensiveTask = [&](const tlp::edge &e) {
double result = 0;
...
return result;
};
tlp::EdgeStaticProperty<double> result(graph);
TLP_PARALLEL_MAP_EDGES(graph, [&](const tlp::edge &e) {
// run task in a thread
result[e] = computationIntensiveTask(e);
});

Definition at line 141 of file GraphParallelTools.h.

+ Here is the call graph for this function:

◆ TLP_PARALLEL_MAP_EDGES_AND_INDICES()

template<typename EdgeFunction >
void tlp::TLP_PARALLEL_MAP_EDGES_AND_INDICES ( const tlp::Graph graph,
const EdgeFunction &  edgeFunction 
)
inline

Template function to ease the creation of OpenMP parallel jobs taking a graph edge and its iteration index as parameter.

Since
Tulip 5.2
Parameters
graphthe graph on which to run job on the edges
edgeIndexFunctioncallable object (e.g. lambda function) taking a tlp::edge and and unsigned integer as parameter

Example of use:

auto computationIntensiveTask = [&](const tlp::edge &e, unsigned int i) {
double result = 0;
...
return result;
};
tlp::EdgeStaticProperty<double> result(graph);
TLP_PARALLEL_MAP_EDGES(graph, [&](const tlp::edge &e, unsigned int i) {
// run task in a thread
result[e] = computationIntensiveTask(e, i);
});

Definition at line 173 of file GraphParallelTools.h.

+ Here is the call graph for this function:

◆ TLP_PARALLEL_MAP_INDICES()

template<typename IdxFunction >
void tlp::TLP_PARALLEL_MAP_INDICES ( size_t  maxIdx,
const IdxFunction &  idxFunction 
)
inline

Template function to ease the creation of parallel threads taking an index as parameter (0 <= index < maxIdx).

Since
Tulip 5.2
Parameters
maxIdxthe upper bound exclusive of the indices range
idxFunctioncallable object (e.g. lambda function) taking an unsigned integer as parameter

Example of use:

auto computationIntensiveTask = [&](unsigned int id) {
double result = 0;
...
return result;
};
const unsigned int N = ... ;
std::vector<double> result(N);
TLP_PARALLEL_MAP_INDICES(N, [&](unsigned int i) {
// run task in a thread
result[i] = computationIntensiveTask(i);
});

Definition at line 248 of file ParallelTools.h.

+ Here is the call graph for this function:

◆ TLP_PARALLEL_MAP_NODES()

template<typename NodeFunction >
void tlp::TLP_PARALLEL_MAP_NODES ( const tlp::Graph graph,
const NodeFunction &  nodeFunction 
)
inline

Template function to ease the creation of OpenMP parallel jobs taking a graph node as parameter.

Since
Tulip 5.2
Parameters
graphthe graph on which to run job on the nodes
nodeFunctioncallable object (e.g. lambda function) taking a tlp::node as parameter

Example of use:

auto computationIntensiveTask = [&](const tlp::node &n) {
double result = 0;
...
return result;
};
tlp::NodeStaticProperty<double> result(graph);
TLP_PARALLEL_MAP_NODES(graph, [&](const tlp::node &n) {
// run task in a thread
result[n] = computationIntensiveTask(n);
});

Definition at line 66 of file GraphParallelTools.h.

+ Here is the call graph for this function:

◆ TLP_PARALLEL_MAP_NODES_AND_INDICES()

template<typename NodeFunction >
void tlp::TLP_PARALLEL_MAP_NODES_AND_INDICES ( const tlp::Graph graph,
const NodeFunction &  nodeFunction 
)
inline

Template function to ease the creation of OpenMP parallel jobs taking a graph node and its iteration index as parameter.

Since
Tulip 5.2
Parameters
graphthe graph on which to run job on the nodes
nodeIndexFunctioncallable object (e.g. lambda function) taking a tlp::node and and unsigned integer as parameter

Example of use:

auto computationIntensiveTask = [&](const tlp::node &n, unsigned int i) {
double result = 0;
...
return result;
};
tlp::NodeStaticProperty<double> result(graph);
TLP_PARALLEL_MAP_EDGES(graph, [&](const tlp::node &n, unsigned int i) {
// run task in a thread
result[n] = computationIntensiveTask(n, i);
});

Definition at line 98 of file GraphParallelTools.h.

+ Here is the call graph for this function:

◆ tlpStringToQString()

QString tlp::tlpStringToQString ( const std::string &  toConvert)
inline

Convert a Tulip UTF-8 encoded std::string to a QString.

Definition at line 55 of file TlpQtTools.h.

+ Here is the caller graph for this function:

◆ uniqueIterator() [1/2]

template<typename T , typename CheckFunc = CheckAllFunctor<T>>
UniqueIterator<T>* tlp::uniqueIterator ( Iterator< T > *  it,
CheckFunc  checkFunctor = CheckFunc() 
)
inline

Convenient function for creating a UniqueIterator.

Since
Tulip 5.2

Creates a UniqueIterator from another Iterator. The returned Iterator takes ownership of the one provided as parameter.

Parameters
ita Tulip Iterator
checkFunctora functor or a lambda function that enables to indicate whether or not the element could be duplicated (default test all elements)
Returns
a UniqueIterator

Definition at line 139 of file UniqueIterator.h.

◆ uniqueIterator() [2/2]

template<typename Container , typename CheckFunc = CheckAllFunctor<typename Container::value_type>>
std::enable_if<has_const_iterator<Container>::value, UniqueIterator<typename Container::value_type, CheckFunc> *>::type tlp::uniqueIterator ( const Container &  stlContainer,
CheckFunc  checkFunctor = CheckFunc() 
)
inline

Convenient function for creating a UniqueIterator from a STL container.

Since
Tulip 5.2

Creates a UniqueIterator from a STL container (std::list, std::vector, std::set, std::map, ...).

Parameters
stlContainerany STL container
checkFunctora functor or a lambda function that enables to indicate whether or not the element could be duplicated (default test all elements)
Returns
a UniqueIterator

Definition at line 161 of file UniqueIterator.h.

+ Here is the call graph for this function: