Tulip
5.6.0
Large graphs analysis and drawing
|
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::NumericProperty > | DoubleMinMaxProperty |
typedef MinMaxProperty< tlp::IntegerType, tlp::IntegerType, tlp::NumericProperty > | IntegerMinMaxProperty |
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 } |
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 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 () |
Iterator< Graph * > * | getRootGraphs () |
unsigned int | getSeedOfRandomSequence () |
Graph * | importGraph (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) |
Graph * | loadGraph (const std::string &filename, tlp::PluginProgress *progress=nullptr) |
QString | localPluginsPath () |
Graph * | newGraph () |
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 | 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) |
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.
enum tlp::ElementType |
Iterator<T>* tlp::concatIterator | ( | Iterator< T > * | itOne, |
Iterator< T > * | itTwo | ||
) |
Convenient function for creating a ConcatIterator.
Creates a ConcatIterator from two other Iterators. The returned Iterator takes ownership of the one provided as parameter.
Definition at line 84 of file ConcatIterator.h.
|
inline |
Convenient function for creating a ConversionIterator from a STL container.
Creates a ConversionIterator from a STL container (std::list, std::vector, std::set, std::map, ...) and a conversion function.
stlContainer | any STL container |
convFunc | functor or lambda function converting a value from the container to type TYPEOUT |
Definition at line 118 of file ConversionIterator.h.
|
inline |
Convenient function for creating a ConversionIterator.
Creates a ConversionIterator from another Iterator and a conversion function. The returned Iterator takes ownership of the one provided as parameter.
it | a Tulip Iterator |
convFunc | functor or lambda function converting a value of type TYPEIN to type TYPEOUT |
Definition at line 94 of file ConversionIterator.h.
void tlp::convertLikeFilter | ( | QString & | filter | ) |
convert sql like filter into an acceptable regexp
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.
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.
|
inline |
Convenient function for creating a FilterIterator from a STL container.
Creates a FilterIterator from a STL container (std::list, std::vector, std::set, std::map, ...) and a filter function.
stlContainer | any STL container |
filter | the functor or lambda function that enables to test whether or not an element is filtered |
Definition at line 127 of file FilterIterator.h.
|
inline |
Convenient function for creating a FilterIterator.
Creates a FilterIterator from another iterator and a filter function. The returned iterator takes ownership of the one provided as parameter.
it | a Tulip iterator |
filter | the functor or lambda function that enables to test whether or not an element is filtered |
Definition at line 106 of file FilterIterator.h.
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.
name | The name of the file to read from. |
open_mode | The mode to open the file with. Defaults to std::ios::in. |
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.
filename | an utf-8 encoded string containing the path of the file to open for performing input operations |
open_mode | the stream opening mode flags (bitwise combination of std::ios_base::openmode constants). |
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.
name | The name of the file to write to. |
open_mode | The mode to open the file with. Defaults to std::ios::out. |
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.
filename | an utf-8 encoded string containing the path of the file to open for performing output operations |
open_mode | the stream opening mode flags (bitwise combination of std::ios_base::openmode constants). |
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.
pluginName | The name of the plugin for which we want the package name. |
unsigned int tlp::getSeedOfRandomSequence | ( | ) |
Returns the value of the seed used for further initialization of a random sequence.
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.
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.
|
inline |
Counts the number of iterated elements.
Counts the number of elements iterated by the provided iterator. That function takes ownership of the iterator and will delete it.
it | a Tulip iterator |
Definition at line 177 of file Iterator.h.
|
inline |
Checks a minimum amount of iterated elements.
Checks if the iterator returns at least n values. That function takes ownership of the iterator and will delete it.
it | a Tulip iterator |
Definition at line 201 of file Iterator.h.
|
inline |
Checks if an iterator is empty.
Checks if the iterator does not return any value. That function takes ownership of the iterator and will delete it.
it | a Tulip iterator |
Definition at line 229 of file Iterator.h.
|
inline |
Converts an iterator to a std::list.
Returns a std::list filled with the iterated elements. That function takes ownership of the iterator and will delete it.
it | a Tulip iterator |
Definition at line 309 of file Iterator.h.
|
inline |
Applies a function to each iterated element.
Applies a function to each element iterated by the provided iterator. That function takes ownership of the iterator and will delete it.
it | a Tulip iterator |
mapFunction | functor or lambda function taking one parameter of the same type of the iterated elements |
Definition at line 249 of file Iterator.h.
|
inline |
Reduces iterated elements to a single value.
Produces a single value from the iterated elements (e.g. sum). That function takes ownership of the iterator and will delete it.
it | a Tulip iterator |
initVal | initial value of the reduced result |
reduceFunction | functor 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 |
Definition at line 280 of file Iterator.h.
|
inline |
Converts an iterator to a std::set.
Returns a std::set filled with the iterated elements. That function takes ownership of the iterator and will delete it.
it | a Tulip iterator |
Definition at line 355 of file Iterator.h.
|
inline |
Converts an iterator to a std::vector.
Returns a std::vector filled with the iterated elements. That function takes ownership of the iterator and will delete it.
it | a Tulip iterator |
Definition at line 332 of file Iterator.h.
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.
os | The stream to output to. |
array | The array to output. |
std::istream& tlp::operator>> | ( | std::istream & | is, |
Array< T, N > & | array | ||
) |
operator >> stream operator to easily read an array
is | The stream to read from. |
array | A reference to an array, that will be written to. |
bool tlp::pathExist | ( | const std::string & | pathname | ) |
returns if a path exists
pathname | an utf-8 encoded string containing the path to check |
|
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.
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".
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.
|
inline |
Case insensitive comparison of two QStrings.
Definition at line 62 of file TlpQtTools.h.
|
inline |
Convert a QString to a Tulip UTF-8 encoded std::string.
Definition at line 49 of file TlpQtTools.h.
double tlp::randomDouble | ( | double | max = 1.0 | ) |
Returns a random double in the range [0, max].
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.
unsigned int tlp::randomUnsignedInteger | ( | unsigned int | max | ) |
Returns a random unsigned integer in the range [0, max].
void tlp::redirectDebugOutputToQDebug | ( | ) |
redirect tlp::debug() to qDebug()
void tlp::redirectErrorOutputToQCritical | ( | ) |
redirect tlp::error() to qCritical()
void tlp::redirectWarningOutputToQWarning | ( | ) |
redirect tlp::warning() to qWarning()
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()).
seed | the value of the seed. Set seed to UINT_MAX if you need a random choice of the seed. |
|
inline |
Convenient function for creating a SortIterator from a STL container.
Creates a SortIterator from another Iterator and a comparison function.
stlContainer | any STL container |
compFunc | functor 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 |
Definition at line 262 of file SortIterator.h.
|
inline |
Convenient function for creating a SortIterator.
Creates a SortIterator from another Iterator and a comparison function. The returned Iterator takes ownership of the one provided as parameter.
it | a Tulip Iterator |
compFunc | functor 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 |
Definition at line 239 of file SortIterator.h.
|
inline |
Convenient function for creating a StableIterator from a STL container.
Creates a StableIterator from a STL container (std::list, std::vector, std::set, std::map, ...).
stlContainer | any STL container |
Definition at line 154 of file StableIterator.h.
|
inline |
Convenient function for creating a StableIterator.
Creates a StableIterator from another Iterator. The returned Iterator takes ownership of the one provided as parameter.
it | a Tulip Iterator |
Definition at line 136 of file StableIterator.h.
|
inline |
Convenient function for creating a StlIterator from a stl container.
Creates a StlIterator from a STL container (std::list, std::vector, std::set, std::map, ...).
stlContainer | any STL container |
Definition at line 95 of file StlIterator.h.
|
inline |
Template function to ease the creation of OpenMP parallel jobs taking a graph edge as parameter.
graph | the graph on which to run job on the edges |
edgeFunction | callable object (e.g. lambda function) taking a tlp::edge as parameter |
Example of use:
Definition at line 141 of file GraphParallelTools.h.
|
inline |
Template function to ease the creation of OpenMP parallel jobs taking a graph edge and its iteration index as parameter.
graph | the graph on which to run job on the edges |
edgeIndexFunction | callable object (e.g. lambda function) taking a tlp::edge and and unsigned integer as parameter |
Example of use:
Definition at line 173 of file GraphParallelTools.h.
|
inline |
Template function to ease the creation of OpenMP parallel jobs taking a graph node as parameter.
graph | the graph on which to run job on the nodes |
nodeFunction | callable object (e.g. lambda function) taking a tlp::node as parameter |
Example of use:
Definition at line 66 of file GraphParallelTools.h.
|
inline |
Template function to ease the creation of OpenMP parallel jobs taking a graph node and its iteration index as parameter.
graph | the graph on which to run job on the nodes |
nodeIndexFunction | callable object (e.g. lambda function) taking a tlp::node and and unsigned integer as parameter |
Example of use:
Definition at line 98 of file GraphParallelTools.h.
|
inline |
Convert a Tulip UTF-8 encoded std::string to a QString.
Definition at line 55 of file TlpQtTools.h.