Tulip  5.7.4
Large graphs analysis and drawing
tlp Namespace Reference

Classes

class  AbstractProperty
 
class  AcyclicTest
 
class  Algorithm
 
class  AlgorithmContext
 
class  BiconnectedTest
 
class  BooleanAlgorithm
 
class  BooleanProperty
 
class  BooleanVectorProperty
 
struct  BoundingBox
 
class  Camera
 
class  ColorAlgorithm
 
class  ColorProperty
 
class  ColorScale
 
class  ColorVectorProperty
 
struct  ConcatIterator
 
class  ConnectedTest
 
class  ConversionIterator
 
class  CoordVectorProperty
 
class  DataSet
 
struct  DataType
 
class  DoubleAlgorithm
 
class  DoubleProperty
 
class  DoubleVectorProperty
 
struct  edge
 
class  Event
 
class  FilterIterator
 
class  Gl2DRect
 
class  GlAbstractPolygon
 
class  GlAxis
 
class  GlBezierCurve
 
class  GlBox
 
class  GlCatmullRomCurve
 
class  GlCircle
 
class  GlComplexPolygon
 
class  GlComposite
 
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  GlSimpleEntity
 
class  GlSphere
 
class  GlStar
 
class  GlTriangle
 
class  Graph
 
class  GraphEvent
 
class  GraphProperty
 
class  IntegerAlgorithm
 
class  IntegerProperty
 
class  IntegerVectorProperty
 
class  Interactor
 
class  InteractorComposite
 
struct  Iterator
 
class  LayoutAlgorithm
 
class  LayoutProperty
 
class  MinMaxProperty
 
class  MPConversionIterator
 
struct  node
 
class  NodeLinkDiagramComponentInteractor
 
class  NumericProperty
 
class  Observable
 
class  ObserverHolder
 
class  OuterPlanarTest
 
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
 
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  TreeTest
 
class  TriconnectedTest
 
class  VectorPropertyInterface
 
class  View
 
class  ViewWidget
 

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  ProgressState { TLP_CONTINUE , TLP_CANCEL , TLP_STOP }
 
enum  StandardMetaValueCalculator : unsigned int {
  NO_CALC = 0 , AVG_CALC = 1 , SUM_CALC = 2 , MAX_CALC = 3 ,
  MIN_CALC = 4
}
 

Functions

template<typename T >
auto begin (Iterator< T > *it) -> decltype(it->begin())
 
void clearRegisteredTextureFiles ()
 
QColor colorToQColor (const Color &color)
 
template<class T >
Iterator< T > * concatIterator (Iterator< T > *itOne, Iterator< T > *itTwo)
 
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)
 
template<typename TOUT , typename ConversionFunc , typename TIN >
ConversionIterator< TIN, TOUT, ConversionFunc > * conversionIterator (tlp::Iterator< TIN > *it, ConversionFunc convFunc)
 
void convertLikeFilter (QString &filter)
 
void convexHull (const std::vector< Coord > &points, std::vector< std::vector< unsigned int >> &convexHullFacets, std::vector< std::vector< unsigned int >> &facetNeighbors)
 
void convexHull (const std::vector< Coord > &points, std::vector< unsigned int > &convexHull)
 
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 Container , typename FILTER >
std::enable_if< has_const_iterator< Container >::value, MPFilterIterator< typename Container::value_type, FILTER > * >::type filterIterator (const Container &stlContainer, FILTER filter)
 
template<typename TYPE , typename FILTER >
FilterIterator< TYPE, FILTER > * filterIterator (Iterator< TYPE > *it, 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 ()
 
QString getRegisteredTextureFile (QString name)
 
Iterator< Graph * > * getRootGraphs ()
 
unsigned int getSeedOfRandomSequence ()
 
char * getStrError ()
 
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)
 
bool pathExist (const std::string &pathname)
 
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 registerTextureFile (QString name, QString textureFilePath)
 
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 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<typename T , typename CompareFunction >
SortIterator< T, CompareFunction > * sortIterator (Iterator< T > *it, CompareFunction &&compFunc)
 
template<typename Container >
std::enable_if< has_const_iterator< Container >::value, StableIterator< typename Container::value_type > * >::type stableIterator (const Container &stlContainer)
 
template<class T >
StableIterator< T > * stableIterator (Iterator< T > *it)
 
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 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)
 
QString tlpStringToQString (const std::string &toConvert)
 

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
 
bool TulipProgramExiting
 
std::string TulipShareDir
 
static const std::string VIEW_CATEGORY = "Panel"
 

Detailed Description

This file is part of Tulip (https://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 50 of file Graph.h.

Function Documentation

◆ clearRegisteredTextureFiles()

void tlp::clearRegisteredTextureFiles ( )

forget all registered texture files

◆ 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 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:

◆ conversionIterator() [2/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.

◆ convertLikeFilter()

void tlp::convertLikeFilter ( QString &  filter)

convert sql like filter into an acceptable regexp

◆ convexHull() [1/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.

◆ convexHull() [2/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.

◆ filterIterator() [1/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:

◆ filterIterator() [2/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.

◆ 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.

◆ 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).

◆ 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.

◆ 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).

◆ 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.

◆ getRegisteredTextureFile()

QString tlp::getRegisteredTextureFile ( QString  name)

return the texture file path associated to a name

◆ getSeedOfRandomSequence()

unsigned int tlp::getSeedOfRandomSequence ( )

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

◆ getStrError()

char* tlp::getStrError ( )

Returns the error message associated to errno.

◆ 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.

◆ 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: @list.

  • It initializes the tulip library
  • it checks plugins to be discarded and uninstalls them
  • It loads plugins from the application path @endlist

◆ 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 177 of file Iterator.h.

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

◆ iteratorCountCheck()

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

Checks a minimum 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 201 of file Iterator.h.

+ Here is the call graph for this function:
+ 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 229 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 309 of file Iterator.h.

+ Here is the call graph for this function:

◆ 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 249 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 280 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 355 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 332 of file Iterator.h.

+ Here is the call graph for this function:

◆ 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.

◆ 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.

◆ pathExist()

bool tlp::pathExist ( const std::string &  pathname)

returns if a path exists

Parameters
pathnamean utf-8 encoded string containing the path to check
Returns
true if a file or directory according pathname can be accessed, falseif not and errno is set

◆ 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 79 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".

◆ 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 63 of file TlpQtTools.h.

◆ QStringToTlpString()

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

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

Definition at line 50 of file TlpQtTools.h.

◆ randomDouble()

double tlp::randomDouble ( double  max = 1.0)

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

◆ 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.

◆ randomUnsignedInteger()

unsigned int tlp::randomUnsignedInteger ( unsigned int  max)

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

◆ redirectDebugOutputToQDebug()

void tlp::redirectDebugOutputToQDebug ( )

redirect tlp::debug() to qDebug()

◆ redirectErrorOutputToQCritical()

void tlp::redirectErrorOutputToQCritical ( )

redirect tlp::error() to qCritical()

◆ redirectWarningOutputToQWarning()

void tlp::redirectWarningOutputToQWarning ( )

redirect tlp::warning() to qWarning()

◆ registerTextureFile()

void tlp::registerTextureFile ( QString  name,
QString  textureFilePath 
)

associate a texture file path to a name

◆ 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.

◆ sortIterator() [1/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:

◆ sortIterator() [2/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.

◆ stableIterator() [1/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:

◆ stableIterator() [2/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.

◆ 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 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);
});
void TLP_PARALLEL_MAP_EDGES(const tlp::Graph *graph, const EdgeFunction &edgeFunction)
The edge struct represents an edge in a Graph object.
Definition: Edge.h:40

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_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);
});
void TLP_PARALLEL_MAP_NODES(const tlp::Graph *graph, const NodeFunction &nodeFunction)
The node struct represents a node in a Graph object.
Definition: Node.h:40

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 56 of file TlpQtTools.h.

+ Here is the caller graph for this function: