Loads a graph in the tlp format from a file (extension can be .tlp or .tlp.gz). Returns a new graph or None if the import fails.
Parameters:  filename (string) – the path to the tlp file 

Return type:  tlp.Graph 
Saves a graph to a file in the tlp format. Extension of the destination file can be either .tlp (raw export) or .tlp.gz (compressed export). Returns True if the graph has been successfully saved.
Parameters: 


Return type:  boolean 
Imports a graph using a Tulip import plugin (must be loaded). Returns a new graph or None if the import fails.
Parameters: 


Return type:  
Throws :  an exception if the requested import plugin is not registered in the plugins database. 
Exports a graph to a file using a Tulip export plugin (must be loaded).
Parameters: 


Return type:  boolean 
Throws :  an exception if the requested export plugin is not registered in the plugins database. 
Warning
If you are using the bindings through the classical Python interpreter, Tulip plugins must be loaded in order to be able to call import modules (see Loading Tulip plugins)).
Deprecated since version 3.7: use tlp.Graph.addSubGraph() instead
Creates and returns an empty subgraph of a graph.
Parameters: 


Return type: 
Deprecated since version 3.7: use tlp.Graph.addCloneSubGraph() instead
Creates and returns a subgraph of a graph root that is equal to that graph (a clone subgraph).
Parameters: 


Return type: 
Appends the selected part of a graph (properties, nodes and edges) into another one. If no selection is done, the whole input graph graph is appended. The output selection is used to select the appended nodes & edges
Parameters: 


Warning
The input selection is extended to all selected edge ends.
Removes the selected part of a graph (properties values, nodes and edges). If no selection is done, the whole graph is reseted to default value.
Parameters: 


Warning
The selection is extended to all selected edge ends.
Returns the average path length of a graph, that is the sum of the shortest distances for all pair of distinct nodes in that graph divided by the number of those pairs. For a pair of non connected nodes, the shorted distance is set to 0.
Parameters:  graph (tlp.Graph) – the graph on which to compute the average path length 

Return type:  float 
Returns the clustering coefficient of a graph as the average of the local clustering coefficients (see tlp.clusteringCoefficient()) of all the nodes.
Parameters:  graph (tlp.Graph) – the graph on wich to compute the average clustering coefficient 

Return type:  float 
Assigns to each node its local clustering coefficient that is the proportion of edges between the nodes within its neighbourhood divided by the number of edges that could possibly exist between them. This quantifies how close its neighbors are to being a clique.
Parameters: 


Assigns to each node of a Directed Acyclic Graph a level such that if the edge e(u,v) exists level(u) < level(v). The algorithm ensures that the number of level used is minimal.
Parameters: 


Warning
The graph must be acyclic (no self loops).
Returns the minimum degree of the graph’s nodes.
Parameters:  graph (tlp.Graph) – the graph on which to compute the minimum degree 

Return type:  integer 
Returns the maximum degree of the graph’s nodes.
Parameters:  graph (tlp.Graph) – the graph on which to compute the maximum degree 

Return type:  integer 
Computes the distances from a node to all the other nodes of a graph and return the maximum one.
Parameters: 


Return type:  integer 
Throws :  an exception if the node does not belong to the graph 
Returns the nodes that can be reached from a node, according to a direction, at distance less or equal to a maximum one.
Parameters:  

Return type:  set of tlp.node 
Throws :  an exception if the node does not belong to the graph 
New in version 4.2.
Performs a breadthfirst search on a graph and returns a list containing the nodes of the graph in the order they have been visited.
Parameters:  

Return type:  list of tlp.node 
Throws :  an exception if the provided root node does not belong to the graph. 
New in version 3.8.
Computes the bounding box of a graph according to nodes positions and edges bends defined in the default layout property “viewLayout”, nodes zrotations defined in the default double property “viewRotation” and sizes of elements defined in the default size property “viewSize”.
Parameters: 


Return type:  
Throws :  an exception if the provided boolean property is not attached to the graph 
Computes the bounding box of a graph according to nodes positions, edges bends, nodes zrotations and sizes of elements.
Parameters: 


Return type:  
Throws :  an exception if the provided properties are not attached to the graph 
New in version 3.8.
Computes a bounding sphere (or a bounding circle if the graph has a 2D layout) of a graph according to nodes positions and edges bends defined in the default layout property “viewLayout”, nodes zrotations defined in the default double property “viewRotation” and sizes of elements defined in the default size property “viewSize”.
Returns a tuple of tlp.Coord whose first member is the center of the bounding sphere (circle for 2D layout) and second member is the farthest point from the center (computed from graph elements positions). To get the bounding radius, you have to compute the distance between the two members of the tuple (use the tlp.Vec3f.dist() method).
Parameters: 


Return type:  
Throws :  an exception if the provided boolean property is not attached to the graph 
Computes a bounding sphere (or a bounding circle if the graph has a 2D layout) of a graph according to node position edge bends node zrotation, and size of elements.
Returns a tuple of tlp.Coord whose first member is the center of the bounding sphere (circle for 2D layout) and second member is the farthest point from the center (computed from graph elements positions). To get the bounding radius, you have to compute the distance between the two members of the tuple (use the tlp.Vec3f.dist() method).
Parameters: 


Return type:  
Throws :  an exception if the provided properties are not attached to the graph 
New in version 3.8.
Computes a convex hull of a set of points. Only works with 2D layouts. Returns a list of tlp.Coord containing the vertices of the points convex hull correctly ordered.
Parameters:  points (:list of class:tlp.Coord) – the points on which to compute a conbex hull 

Return type:  list of tlp.Coord 
New in version 3.8.
Computes a convex hull of a graph according to nodes positions and edges bends defined in the default layout property “viewLayout”, nodes zrotations defined in the default double property “viewRotation” and sizes of elements defined in the default size property “viewSize”. Only works with 2D layouts. Returns a list of tlp.Coord containing the vertices of the graph convex hull correctly ordered.
Parameters: 


Return type:  list of tlp.Coord 
Throws :  an exception if the provided boolean property is not attached to the graph 
Computes a convex hull of a graph according to nodes positions, edges bends, nodes zrotations, and sizes of elements. Only works with 2D layouts. Returns a list of tlp.Coord containing the vertices of the graph convex hull correctly ordered.
Parameters: 


Return type:  list of tlp.Coord 
Throws :  an exception if the provided properties are not attached to the graph 
New in version 4.2.
Computes the 2D convex hull of a list of points (the zcoordinate is not taken into acccount) using the Qhull library. Returns a list of indexes in the list of points defining the hull polygon in counterclockwise order.
Parameters:  points (list of tlp.Coord) – the points on which to compute the 2D convex hull 

Return type:  list of integers 
New in version 4.2.
Computes the 2D/3D convex hull of a list of points using the Qhull library. Returns a tuple whose first member is the list of facets defining the convex hull (segments for 2D, triangles for 3D) and second member is the list of neighbors facets for each facet. A facet is defined by a list of indexes in the list of points. The ith element of the neighbors list is a list of indexes in the facets list corresponding to the neighbors facets of the ith facet.
Parameters:  points (list of tlp.Coord) – the points on which to compute the 2D/3D convex hull 

Return type:  (list of list of integers, list of list of integers) 
New in version 3.8.
Computes the intersection point (if any) of two 3d lines. Returns a tuple whose first member is a boolean indicating if the lines intersect (if False it means that lines are parallel or skew) and second member is the intersection point (if any).
Parameters:  

Return type:  (boolean, tlp.Coord) 
New in version 3.8.
Computes the centroid of a polygon.
Parameters:  points (list of tlp.Coord) – the vertices of the polygon correctly ordered 

Return type:  tlp.Coord 
New in version 3.8.
Computes the delaunay triangulation of a set of points and returns the set of delaunay edges and simplices (triangles in 2d, tetrahedra in 3d). Returns a tuple whose first member is the list of edges and second member is the list of simplices, or None if the triangulation failed. Edges and simplices are defined using indexes into the original list of points.
Parameters:  points (list of tlp.Coord) – a list of points on which to compute a delaunay triangulation 

Return type:  (list of (integer, integer), list of integer) or None 
New in version 3.8.
That class defines a voronoi diagram. Use the tlp.voronoiDiagram() function to get an instance of it.
Returns the ith voronoi cell. A cell is defined by a list of indexes in the voronoi vertices.
Parameters:  cellIdx (integer) – the index of the cell to return 

Return type:  set of integer 
Returns the degree (number of incident edges) of the ith voronoi vertex
Parameters:  vertexIdx (integer) – the index of the vertex on which to return the degree 

Return type:  integer 
Returns the ith voronoi edge. An edge is defined by two indexes in the voronoi vertices.
Parameters:  edgeIdx (integer) – the index of the edge to return 

Return type:  (integer, integer) 
Returns the number of voronoi edges.
Return type:  integer 

Returns the number of voronoi sites.
Return type:  integer 

Returns the number of voronoi vertices.
Return type:  integer 

Returns the ith voronoi site.
Parameters:  siteIdx (integer) – the index of the site to return 

Return type:  tlp.Coord 
Returns the ith voronoi vertex.
Parameters:  vertexIdx (integer) – the index of the vertex to return 

Return type:  tlp.Coord 
Returns the cell associated to the ith site.
Parameters:  siteIdx (integer) – the index of the site on which to return the cell 

Return type:  set of integer 
Returns the voronoi edges surrounding the ith site.
Parameters:  siteIdx (integer) – the index of the site on which to return edges 

Return type:  list of (integer, integer) 
New in version 3.8.
Computes the voronoi diagram of a set of sites (for 2d and 3d layouts). It automatically computes the set of all voronoi vertices, edges and cells. In order to not have to deal with infinite voronoi rays, the input layout is enclosed in its convex hull in 2d or in its bounding box in 3d. It enables to have a connected voronoi cell for each input site.
Parameters:  sites (list of tlp.Coord) – the sites from which to compute the voronoi diagram 

Return type:  tlp.VoronoiDiagram 
Returns the current version number of Tulip in the form X.Y.Z, X being the major version, Y the minor version, and Z the patch version.
Return type:  string 

Looks for the Tulip plugins directory and fills the Tulip path variables : tlp.TulipLibDir, tlp.TulipPluginsPath, tlp.TulipBitmapDir. The plugins directory can be defined in different ways, given by order of prevalence:
 the TLP_DIR environment variable, if it has a value
 a fallback value of ‘C:/Tulip/lib/’ on windows, or ‘/usr/local/lib/’ on unix
Loads C++ plugins installed in the directories listed in the tlp.TulipPluginsPath variable (in the form “<path1>;<path2>” on windows and “<path1>:<path2>” on unix). The tlp.TulipPluginsPath can be initialized with standard Tulip directories by calling the tlp.initTulipLib() function.
New in version 4.2.
Loads C++ and Python plugins installed in a specific directory.
Loads a C++ plugin or a Python plugin from a specific file (shared library or Python source file). Returns True if the plugin was correctly loaded.
Parameters:  filename (string) – the path to the shared library containing the Tulip plugin (file extension : .so on linux, .dylib on mac, .dll on windows) 

Return type:  boolean 
Checks the dependencies of all C++ plugins loaded so far. If a plugin does not have all its dependencies fulfilled, it is unloaded and removed from the current plugins database.
Returns a dataset filled with default parameters (if any) for a given plugin (algorithm, import, property algorithm, ...).
Parameters: 


Return type: 
Return a list containing the names of the import plugins (written in C++ or Python) loaded so far. Import plugins are objects implementing the tlp::ImportModule interface in C++ or the tlp.ImportModule interface in Python.
Return type:  list of string 

Return a list containing the names of the export plugins (written in C++ or Python) loaded so far. Export plugins are objects implementing the tlp::ExportModule interface in C++ or the tlp.ExportModule interface in Python.
Return type:  list of string 

Return a list containing the names of the algorithm plugins (written in C++ or Python) loaded so far. Algorithm plugins are objects implementing the tlp::Algorithm interface in C++ or the tlp.Algorithm interface in Python.
Return type:  list of string 

Return a list containing the names of the boolean algorithm plugins (written in C++ or Python) loaded so far. Boolean algorithm plugins are objects implementing the tlp::BooleanAlgorithm interface in C++ or the tlp.BooleanAlgorithm interface in Python.
Return type:  list of string 

Return a list containing the names of the color algorithm plugins (written in C++ or Python) loaded so far. Color algorithm plugins are objects implementing the tlp::ColorAlgorithm interface in C++ or the tlp.ColorAlgorithm interface in Python.
Return type:  list of string 

Return a list containing the names of the double algorithm plugins (written in C++ or Python) loaded so far. Double algorithm plugins are objects implementing the tlp::DoubleAlgorithm interface in C++ or the tlp.DoubleAlgorithm interface in Python.
Return type:  list of string 

Return a list containing the names of the integer algorithm plugins (written in C++ or Python) loaded so far. Integer algorithm plugins are objects implementing the tlp::IntegerAlgorithm interface in C++ or the tlp.IntegerAlgorithm interface in Python.
Return type:  list of string 

Return a list containing the names of the layout algorithm plugins (written in C++ or Python) loaded so far. Layout algorithm plugins are objects implementing the tlp::LayoutAlgorithm interface in C++ or the tlp.LayoutAlgorithm interface in Python.
Return type:  list of string 

Return a list containing the names of the size algorithm plugins (written in C++ or Python) loaded so far. Size algorithm plugins are objects implementing the tlp::SizeAlgorithm interface in C++ or the tlp.SizeAlgorithm interface in Python.
Return type:  list of string 

Return a list containing the names of the string algorithm plugins (written in C++ or Python) loaded so far. String algorithm plugins are objects implementing the tlp::StringAlgorithm interface in C++ or the tlp.StringAlgorithm interface in Python.
Return type:  list of string 

An instance of this class represent a node in a Tulip graph. It encapsulates an integer identifier. Use specific methods in the tlp.Graph class to get references on such objects ( for instance tlp.Graph.addNode(), tlp.Graph.getNodes(), tlp.Graph.getOutNodes(), ...). Node objects can be used as keys in a Python dictionnary.
The node identifier can be accessed through the id class member.
Returns True if the node is a valid one, meaning it is attached to a graph.
Return type:  boolean 

An instance of this class represent an edge in a Tulip graph. It encapsulates an integer identifier. Use specific methods in the tlp.Graph class to get references on such objects ( for instance tlp.Graph.addEdge(), tlp.Graph.getEdges(), tlp.Graph.getInEdges(), ...). Edge objects can be used as keys in a Python dictionnary.
The edge identifier can be accessed through the id class member.
Returns True if the edge is a valid one, meaning it is attached to a graph.
Return type:  boolean 

This is the main Tulip class. It enables to :
 create a directed graph
 create and manipulate a subgraphs hierarchy
 get semantic iterators on graph elements
 create and retrieve properties of different types to get/set data on the graph
This class can not be instanced directly. Use tlp.newGraph() to create a new empty graph.
Remove all nodes, edges and subgraphs from the graph .
Adds a new node in the graph and returns it. This node is also added in all the graph’s ancestors to maintain the subgraph relation between graphs.
Return type:  tlp.node 

New in version 3.7.
Adds new nodes in the graph and returns them in a list. The new nodes are also added in all the graph ancestors to maintain the subgraph relation between graphs.
Parameters:  nbNodes (integer) – the number of nodes to add in the graph 

Return type:  list of tlp.node 
Warning
the addedNodes vector is cleared before adding nodes.
Adds an existing node in the graph. This node is also added in all the graph ancestors to maintain the subgraph relation between graphs.
Parameters:  node (tlp.node) – an existing node to add to the graph 

Throws :  an exception if the node does not belong to the root graph 
Warning
The node must be an element of the graph hierarchy, thus it must be an element of the root graph.
Warning
One can’t add an existing node to the root graph.
New in version 3.7.
Adds existing nodes in the graph. The nodes are also added in all the graph ancestors to maintain the subgraph relation between graphs.
Parameters:  itNodes (a Tulip iterator on tlp.node objects) – an iterator on nodes to add 

Throws :  an exception if one of the node to add is not an element of the root graph. 
Warning
The added nodes must be elements of the graph hierarchy, thus they must be elements of the root graph.
Warning
One can’t add existing nodes to the root graph.
Deletes a node in the graph. This node is also removed in all the subgraphs of the graph to maintain the subgraph relation between graphs.
Parameters: 


Throws :  an exception if the node does not belong to the graph 
New in version 3.7.
Deletes nodes in the graph. These nodes are also removed in the subgraphs hierarchy of the current graph to maintain the subgraph relation between graphs.
Parameters: 


Throws :  an exception if one of the node to delete is not an element of the graph. 
Adds a new edge in the graph and returns it. This edge is also added in all the graph’s ancestors to maintain the subgraph relation between graphs.
Parameters:  

Return type:  
Throws :  an exception if the provided source or target node does not belong to the graph 
New in version 3.7.
Adds new edges in the graph and returns them in a list. The new edges are also added in all the graph ancestors to maintain the subgraph relation between graphs.
Parameters:  edges (list of tuples containing two tlp.node objects) – the list of edges to add described by a pair of nodes 

Return type:  list of tlp.edge 
Throws :  an exception if of the provided nodes to link is not an element of the graph. 
Adds an existing edge in the graph. This edge is also added in all the graph’s ancestors to maintain the subgraph relation between graphs.
Parameters:  edge (tlp.edge) – an existing edge to add to the graph 

Throws :  an exception if the edge does not belong to the root graph of if the source and target node of the edge are not elements of the graph 
Warning
The edge must be an element of the graph hierarchy, thus it must be an element of the root graph.
Warning
One can’t add an existing edge to the root graph.
New in version 3.7.
Adds existing edges in the graph. The edges are also added in all the graph ancestors to maintain the subgraph relation between graphs.
Parameters:  itEdges (a Tulip iterator on tlp.edge objects) – an iterator on the edges to add 

Throws :  an exception if one of the edge to add is not an element of the root graph or if one of the edges extremities is not an element of the graph. 
Warning
The added edges must be elements of the graph hierarchy, thus they must be elements of the root graph.
Deletes an edge in the graph. This edge is also removed in all the subgraphs of the graph to maintain the subgraph relation between graphs. The ordering of edges is preserved.
Parameters: 


Throws :  an exception if the edge does not belong to the graph 
New in version 3.7.
Deletes edges in the graph. These edges are also removed in the subgraphs hierarchy of the current graph to maintain the subgraph relation between graphs. The ordering of remaining edges is preserved.
Parameters: 


Throws :  an exception if one of the edge to delete is not an element of the graph 
Sets the order of the edges around a node. This operation ensures that adjacent edges of a node will be ordered as they are in the list of edges given in parameter.
Parameters:  

Throws :  an exception if the node does not belong to the graph 
Swaps two edges in the adjacency list of a node.
Parameters:  

Throws :  an exception if the node or one of the edges does not belong to the graph 
Sets the source of an existing edge.
Parameters:  

Throws :  an exception if the edge or the node does not belong to the graph 
Sets the target of an existing edge.
Parameters:  

Throws :  an exception if the edge or node does not belong to the graph 
Sets both the source and target of an existing edge.
Parameters:  

Throws :  an exception if the edge or one of the nodes does not belong to the graph 
Reverses the direction of an edge, the source becomes the target and the target becomes the source.
Parameters:  edge (tlp.edge) – the edge on which to revert the direction. 

Throws :  an exception if the edge does not belong to the graph 
Warning
The ordering is global to the entire graph hierarchy. Thus, by changing the ordering in a graph you change the ordering in the hierarchy.
Creates and returns a new subgraph. The elements of the new subgraph are those selected in the selection. If there is no selection an empty subgraph is returned.
Parameters: 


Return type: 
New in version 3.7.
Creates and returns a new named subgraph of this graph.
Parameters:  name (string) – The name of the newly created subgraph. 

Return type:  tlp.Graph 
New in version 3.7.
Creates and returns a subgraph of this graph that contains all its elements.
Parameters:  name (string) – The name of the newly created subgraph. Defaults to “unnamed”. 

Return type:  tlp.Graph 
Creates and returns a new subgraph of the graph induced by a set of nodes. The subgraph contains all the nodes of the set and all the existing edges between two nodes of the set including selfloops.
Parameters:  nodeSet (list or set of tlp.node) – the set of nodes from which to build the induced subgraph 

Return type:  tlp.Graph 
Delete a subgraph of this graph. The subgraph’s subgraphs become subgraphs of the graph.
Parameters:  subgraph (tlp.Graph) – the subgraph to remove 

Delete a subgraph of this graph and all its subgraphs.
Parameters:  subgraph (tlp.Graph) – the subgraph to remove 

Returns the parent of the graph, if it has no parent (is the root graph), it returns itself.
Return type:  tlp.Graph 

Sets the parent of the graph (use very carefully). Standard users should never use this method.
Parameters:  superGraph (tlp.Graph) – the new parent for the graph in the hierarchy. 

Returns an iterator on all the subgraphs of the graph.
Return type:  a Tulip iterator on tlp.Graph objects 

Returns True if the graph argument is a direct subgraph of the graph.
Parameters:  graph (tlp.Graph) – a graph 

Return type:  boolean 
Returns True if the graph argument is a descendant of this graph.
Parameters:  graph (tlp.Graph) – a graph 

Return type:  boolean 
Returns the subgraph with the corresponding id or None if there is no subgraph with that id.
Parameters:  id (integer) – a graph id 

Return type:  tlp.Graph or None 
New in version 3.7.
Returns the subgraph with the corresponding name or None if there is no subgraph with that name.
Parameters:  name (string) – the name of the subgraph to return 

Return type:  tlp.Graph or None 
Returns the descendant graph with the corresponding id or None if there is no descendant with that id.
Parameters:  id (integer) – a graph id 

Return type:  tlp.Graph or None 
New in version 3.7.
Returns the nth subgraph or None if there is no such subgraph. Since order cannot be ensured in every implementation, this method should be equivalent to:
i = 0
for sg in graph.getSubGraphs():
if i++ == n:
return sg
return None
Parameters:  n (integer) – the index of the subgraph to return 

Return type:  tlp.Graph or None 
New in version 3.7.
Returns the number of direct subgraphs.
Return type:  integer 

New in version 3.7.
Returns the number of descendant graphs.
Return type:  integer 

All the provided iterators are stable, meaning you can safely delete a node/edge/subgraph from the graph while iterating on its nodes/edges/subgraphs.
Returns an iterator on the nodes.
Return type:  a Tulip iterator on tlp.node objects 

Returns the ith predecessor of a node.
Parameters: 


Return type:  
Throws :  an exception if the node does not belong to the graph or if the requested index is lesser than the number of predecessor nodes 
Return an iterator on the predecessors of a node.
Parameters:  node (tlp.node) – an existing node of the graph 

Return type:  a Tulip iterator on tlp.node objects 
Throws :  an exception if the node does not belong to the graph 
Returns the ith successor of a node.
Parameters: 


Return type:  
Throws :  an exception if the node does not belong to the graph or if the requested index is lesser than the number of successor nodes 
Returns an iterator on the successors of a node.
Parameters:  node (tlp.node) – an existing node of the graph 

Return type:  a Tulip iterator on tlp.node objects 
Throws :  an exception if the node does not belong to the graph 
Returns an iterator on the neighbours of a node.
Parameters:  node (tlp.node) – an existing node of the graph 

Return type:  a Tulip iterator on tlp.node objects 
Throws :  an exception if the node does not belong to the graph 
New in version 4.2.
Returns an iterator performing a breadthfirst search on the graph.
Parameters:  root (tlp.node) – The node from whom to start the BFS. If not provided, the root node will be assigned to a source node in the graph (node with input degree equals to 0). If there is no source node in the graph, a random node will be picked. 

Return type:  a Tulip iterator on tlp.node objects in the BFS order. 
Throws :  an exception if the provided root node does not belong to the graph. 
New in version 4.2.
Returns an iterator performing a depthfirst search on the graph.
Parameters:  root (tlp.node) – The node from whom to start the DFS. If not provided, the root node will be assigned to a source node in the graph (node with input degree equals to 0). If there is no source node in the graph, a random node will be picked. 

Return type:  a Tulip iterator on tlp.node objects in the DFS order. 
Throws :  an exception if the provided root node does not belong to the graph. 
Returns the underlying graph of a meta node.
Parameters:  node (tlp.node) – an existing node of the graph 

Return type:  tlp.Graph 
Throws :  an exception if the node does not belong to the graph 
Returns an iterator on the edges.
Return type:  a Tulip iterator on tlp.edge objects 

Returns a Tulip iterator on the outgoing edges of a node.
Parameters:  node (tlp.node) – an existing node of the graph 

Return type:  a Tulip iterator on tlp.edge objects 
Throws :  an exception if the node does not belong to the graph 
Returns an iterator on the incoming and outgoing edges of a node.
Parameters:  node (tlp.node) – an existing node of the graph 

Return type:  a Tulip iterator on tlp.edge objects 
Throws :  an exception if the node does not belong to the graph 
Returns the graph’s id. This id is unique.
Return type:  integer 

Returns the name of the graph.
Return type:  string 

Sets the name of the graph.
Parameters:  name (string) – the new name of the graph 

Returns a reference on an attribute of the graph or None if it does not exist.
Parameters:  name (string) – the name of the attribute to return. 

Return type:  object 
Sets an attribute of the graph.
Parameters: 


Returns the number of nodes in the graph.
Return type:  integer 

Returns the number of edges in the graph.
Return type:  integer 

Returns the degree of a node.
Parameters:  node (tlp.node) – an existing node of the graph 

Return type:  integer 
Throws :  an exception if the node does not belong to the graph 
Returns the incoming degree of a node.
Parameters:  node (tlp.node) – an existing node of the graph 

Return type:  integer 
Throws :  an exception if the node does not belong to the graph 
Returns the outgoing degree of a node.
Parameters:  node (tlp.node) – an existing node of the graph 

Return type:  integer 
Throws :  an exception if the node does not belong to the graph 
Returns the source of the edge.
Parameters:  edge (tlp.edge) – an existing edge of the graph 

Return type:  tlp.node 
Throws :  an exception if the edge does not belong to the graph 
Returns the target of the edge.
Parameters:  edge (tlp.edge) – an existing edge of the graph 

Return type:  tlp.node 
Throws :  an exception if the edge does not belong to the graph 
Returns a tuple containing the two end nodes of an edge
Parameters:  edge – an existing edge of the graph 

Return type:  (tlp.node, tlp.node) 
Throws :  an exception if the edge does not belong to the graph 
Returns the opposite node of the edge for the given node.
Parameters:  edge (tlp.edge) – an existing edge of the graph 

Return type:  tlp.node 
Throws :  an exception if the edge does not belong to the graph or if the given node is not linked by the edge 
Returns True if the node is an element of the graph.
Parameters:  node (tlp.node) – a node 

Return type:  boolean 
Returns True if the node is a metanode.
Parameters:  node (tlp.edge) – an existing node of the graph 

Return type:  boolean 
Throws :  an exception if the node does not belong to the graph 
Returns True if the edge is an element of the graph.
Parameters:  edge (tlp.edge) – an edge 

Return type:  boolean 
Parameters:  node (tlp.node) – a node 

Return type:  boolean 
Returns True if the edge is a metaedge.
Parameters:  edge – an existing edge of the graph 

Return type:  boolean 
Throws :  an exception if the edge does not belong to the graph 
Returns the first edge found between two nodes. If no edge is found, returns an invalid edge.
Parameters:  

Return type:  
Throws :  an exception if one of the nodes does not belong to the graph 
Returns the boolean property associated to name in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the boolean property to return or to create 

Return type:  tlp.BooleanProperty 
Returns the boolean property associated to name in the graph properties pool. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the boolean property to return or to create 

Return type:  tlp.BooleanProperty 
Returns the boolean vector property associated to name in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the boolean vector property to return or to create 

Return type:  tlp.BooleanVectorProperty 
Returns the boolean vector property associated to name in the graph properties pool. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the boolean vector property to return or for n in graph.getNodes(): print nto create 

Return type:  tlp.BooleanVectorProperty 
Returns the color property associated to name in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the color property to return or to create 

Return type:  tlp.ColorProperty 
Returns the color property associated to name in the graph properties pool. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the color property to return or to create 

Return type:  tlp.ColorProperty 
Returns the color vector property associated to name in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the color vector property to return or to create 

Return type:  tlp.ColorVectorProperty 
Returns the color vector property associated to name in the graph properties pool. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the color vector property to return or to create 

Return type:  tlp.ColorVectorProperty 
Returns the double property associated to name in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the double property to return or to create 

Return type:  tlp.DoubleProperty 
Returns the double property associated to name in the graph properties pool. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the double property to return or to create 

Return type:  tlp.DoubleProperty 
Returns the double vector property associated to name in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the double vector property to return or to create 

Return type:  tlp.DoubleVectorProperty 
Returns the double vector property associated to name in the graph properties pool. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the double vector property to return or to create 

Return type:  tlp.DoubleVectorProperty 
Returns the integer property associated to name in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the integer property to return or to create 

Return type:  tlp.IntegerProperty 
Returns the integer property associated to name in the graph properties pool. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the integer property to return or to create 

Return type:  tlp.IntegerProperty 
Returns the integer vector property associated to name in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the integer vector property to return or to create 

Return type:  tlp.IntegerVectorProperty 
Returns the integer vector property associated to name in the graph properties pool. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the integer vector property to return or to create 

Return type:  tlp.IntegerVectorProperty 
Returns the metagraph property associated to name in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the metagraph property to return or to create 

Return type:  tlp.GraphProperty 
Returns the metagraph property associated to name in the graph properties pool. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the metagraph property to return or to create 

Return type:  tlp.GraphProperty 
Returns the layout property associated to name in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the layout property to return or to create 

Return type:  tlp.LayoutProperty 
Returns the layout property associated to name in the graph properties pool. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the layout property to return or to create 

Return type:  tlp.LayoutProperty 
Returns the coord vector property associated to name in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the coord vector property to return or to create 

Return type:  tlp.CoordVectorProperty 
Returns the coord vector property associated to name in the graph properties pool. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the coord vector property to return or to create 

Return type:  tlp.CoordVectorProperty 
Returns the size property associated to name in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the size property to return or to create 

Return type:  tlp.SizeProperty 
Returns the size property associated to name in the graph properties pool. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the size property to return or to create 

Return type:  tlp.SizeProperty 
Returns the size vector property associated to name in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the size vector property to return or to create 

Return type:  tlp.SizeVectorProperty 
Returns the size vector property associated to name in the graph properties pool. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the size vector property to return or to create 

Return type:  tlp.SizeVectorProperty 
Returns the string property associated to name in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the string property to return or to create 

Return type:  tlp.StringProperty 
Returns the string property associated to name in the graph properties pool. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the string property to return or to create 

Return type:  tlp.StringProperty 
Returns the string vector property associated to name in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the string vector property to return or to create 

Return type:  tlp.StringVectorProperty 
Returns the string vector property associated to name in the graph properties pool. If the property is not registered in the pool, it creates a new one and returns it. Using of del on that property will cause a segmentation violation (use tlp.Graph.delLocalProperty() instead).
Parameters:  name (string) – the name of the string vector property to return or to create 

Return type:  tlp.StringVectorProperty 
Returns the property associated to name in the graph properties pool. The returned property is referenced by its base class tlp.PropertyInterface meaning getting and setting values can only be done via the use of strings. To get the property correctly typed, use the methods described above. If the property does not exist it returns None.
Parameters:  name (string) – the name of the property to return 

Return type:  tlp.PropertyInterface 
Returns True if a property of that name exists in the graph properties pool or in the pool of an ancestor in the subgraphs hierarchy.
Parameters:  name (string) – the name of the property 

Return type:  boolean 
Returns True if a property of that name exists in the graph properties pool.
Parameters:  name (string) – the name of the property 

Return type:  boolean 
Removes and deletes the property associated to name in the graph properties pool.
Parameters:  name (string) – the name of the property to delete 

Returns an iterator on the names of the properties local to the graph.
Return type:  a Tulip iterator on string objects 

Returns an iterator on the names of the properties inherited from the graph’s ancestors.
Return type:  a Tulip iterator on string objects 

Returns an iterator on the names of all the properties attached to the graph.
Return type:  a Tulip iterator on string objects 

New in version 3.7.
Applies an algorithm plugin, identified by its name. Algorithm plugins are objects implementing the tlp::Algorithm interface in C++ or the tlp.Algorithm interface in Python. Parameters can be transmit to the algorithm using a tlp.DataSet. To determine a plugin’s parameters, you can either:
 refer to its documentation
 call the tlp.getDefaultPluginParameters() with the name of the plugin
Returns a tuple whose first member is a boolean indicating if the algorithm terminates successfully and second member is a string which can contain an error message.
Parameters: 


Return type:  (boolean, string) 
New in version 3.8.
Computes a boolean property on the current graph using an external named boolean algorithm (plugin). Boolean algorithm plugins are objects implementing the tlp::BooleanAlgorithm interface in C++ or the tlp.BooleanAlgorithm interface in Python. The list of currently loaded boolean algorithm plugins can be retrieved through the tlp.getBooleanAlgorithmPluginsList() function. The computed values will be stored in result. Parameters can be transmit to the algorithm using a tlp.DataSet . In some cases, algorithms can use this tlp.DataSet in order to return some external information (not stored in result). To determine a plugin’s parameters, you can either:
 refer to its documentation
 call the tlp.getDefaultPluginParameters() with the name of the plugin
Returns a tuple whose first member is a boolean indicating if the algorithm terminates successfully and second member is a string which can contain an error message.
Parameters: 


Return type:  (boolean, string) 
Throws :  an exception if the requested boolean algorithm plugin is not registered in the plugins database. 
Warning
Previous values stored in result will be deleted.
Warning
If you are using the bindings through the classical Python interpreter, Tulip plugins must be loaded in order to be able to call boolean algorithms (see Loading Tulip plugins)).
New in version 3.8.
Computes a color property on the current graph using an external named color algorithm (plugin). Color algorithm plugins are objects implementing the tlp::ColorAlgorithm interface in C++ or the tlp.ColorAlgorithm interface in Python. The list of currently loaded color algorithm plugins can be retrieved through the tlp.getColorAlgorithmPluginsList() function. The computed values will be stored in result. Parameters can be transmit to the algorithm using a tlp.DataSet . In some cases, algorithms can use this tlp.DataSet in order to return some external information (not stored in result). To determine a plugin’s parameters, you can either:
 refer to its documentation
 call the tlp.getDefaultPluginParameters() with the name of the plugin
Returns a tuple whose first member is a boolean indicating if the algorithm terminates successfully and second member is a string which can contain an error message.
Parameters: 


Return type:  (boolean, string) 
Throws :  an exception if the requested color algorithm plugin is not registered in the plugins database. 
Warning
Previous values stored in result will be deleted.
Warning
If you are using the bindings through the classical Python interpreter, Tulip plugins must be loaded in order to be able to call color algorithms (see Loading Tulip plugins)).
New in version 3.8.
Computes a double property on the current graph using an external named double algorithm (plugin). Double algorithm plugins are objects implementing the tlp::DoubleAlgorithm interface in C++ or the tlp.DoubleAlgorithm interface in Python. The list of currently loaded double algorithm plugins can be retrieved through the tlp.getDoubleAlgorithmPluginsList() function. The computed values will be stored in result. Parameters can be transmit to the algorithm using a tlp.DataSet . In some cases, algorithms can use this tlp.DataSet in order to return some external information (not stored in result). To determine a plugin’s parameters, you can either:
 refer to its documentation
 call the tlp.getDefaultPluginParameters() with the name of the plugin
Returns a tuple whose first member is a boolean indicating if the algorithm terminates successfully and second member is a string which can contain an error message.
Parameters: 


Return type:  (boolean, string) 
Throws :  an exception if the requested double algorithm plugin is not registered in the plugins database. 
Warning
Previous values stored in result will be deleted.
Warning
If you are using the bindings through the classical Python interpreter, Tulip plugins must be loaded in order to be able to call double algorithms (see Loading Tulip plugins)).
New in version 3.8.
Computes an integer property on the current graph using an external named integer algorithm (plugin). Integer algorithm plugins are objects implementing the tlp::IntegerAlgorithm interface in C++ or the tlp.IntegerAlgorithm interface in Python. The list of currently loaded integer algorithm plugins can be retrieved through the tlp.getIntegerAlgorithmPluginsList() function. The computed values will be stored in result. Parameters can be transmit to the algorithm using a tlp.DataSet . In some cases, algorithms can use this tlp.DataSet in order to return some external information (not stored in result). To determine a plugin’s parameters, you can either:
 refer to its documentation
 call the tlp.getDefaultPluginParameters() with the name of the plugin
Returns a tuple whose first member is a boolean indicating if the algorithm terminates successfully and second member is a string which can contain an error message.
Parameters: 


Return type:  (boolean, string) 
Throws :  an exception if the requested integer algorithm plugin is not registered in the plugins database. 
Warning
Previous values stored in result will be deleted.
Warning
If you are using the bindings through the classical Python interpreter, Tulip plugins must be loaded in order to be able to call integer algorithms (see Loading Tulip plugins)).
New in version 3.8.
Computes a layout property on the current graph using an external named layout algorithm (plugin). Layout algorithm plugins are objects implementing the tlp::LayoutAlgorithm interface in C++ or the tlp.LayoutAlgorithm interface in Python. The list of currently loaded layout algorithm plugins can be retrieved through the tlp.getLayoutAlgorithmPluginsList() function. The computed values will be stored in result. Parameters can be transmit to the algorithm using a tlp.DataSet . In some cases, algorithms can use this tlp.DataSet in order to return some external information (not stored in result). To determine a plugin’s parameters, you can either:
 refer to its documentation
 call the tlp.getDefaultPluginParameters() with the name of the plugin
Returns a tuple whose first member is a boolean indicating if the algorithm terminates successfully and second member is a string which can contain an error message.
Parameters: 


Return type:  (boolean, string) 
Throws :  an exception if the requested layout algorithm plugin is not registered in the plugins database. 
Warning
Previous values stored in result will be deleted.
Warning
If you are using the bindings through the classical Python interpreter, Tulip plugins must be loaded in order to be able to call layout algorithms (see Loading Tulip plugins)).
New in version 3.8.
Computes a size property on the current graph using an external named size algorithm (plugin). Size algorithm plugins are objects implementing the tlp::SizeAlgorithm interface in C++ or the tlp.SizeAlgorithm interface in Python. The list of currently loaded size algorithm plugins can be retrieved through the tlp.getSizeAlgorithmPluginsList() function. The computed values will be stored in result. Parameters can be transmit to the algorithm using a tlp.DataSet . In some cases, algorithms can use this tlp.DataSet in order to return some external information (not stored in result). To determine a plugin’s parameters, you can either:
 refer to its documentation
 call the tlp.getDefaultPluginParameters() with the name of the plugin
Returns a tuple whose first member is a boolean indicating if the algorithm terminates successfully and second member is a string which can contain an error message.
Parameters: 


Return type:  (boolean, string) 
Throws :  an exception if the requested size algorithm plugin is not registered in the plugins database. 
Warning
Previous values stored in result will be deleted.
Warning
If you are using the bindings through the classical Python interpreter, Tulip plugins must be loaded in order to be able to call size algorithms (see Loading Tulip plugins)).
New in version 3.8.
Computes a string property on the current graph using an external named string algorithm (plugin). String algorithm plugins are objects implementing the tlp::StringAlgorithm interface in C++ or the tlp.StringAlgorithm interface in Python. The list of currently loaded string algorithm plugins can be retrieved through the tlp.getStringAlgorithmPluginsList() function. The computed values will be stored in result. Parameters can be transmit to the algorithm using a tlp.DataSet . In some cases, algorithms can use this tlp.DataSet in order to return some external information (not stored in result). To determine a plugin’s parameters, you can either:
 refer to its documentation
 call the tlp.getDefaultPluginParameters() with the name of the plugin
Returns a tuple whose first member is a boolean indicating if the algorithm terminates successfully and second member is a string which can contain an error message.
Parameters: 


Return type:  (boolean, string) 
Throws :  an exception if the requested string algorithm plugin is not registered in the plugins database. 
Warning
Previous values stored in result will be deleted.
Warning
If you are using the bindings through the classical Python interpreter, Tulip plugins must be loaded in order to be able to call string algorithms (see Loading Tulip plugins)).
Deprecated since version 3.8: use tlp.Graph.applyBooleanAlgorithm() instead
Computes a boolean property on the current graph using an external named boolean algorithm (plugin). Boolean algorithm plugins are objects implementing the tlp::BooleanAlgorithm interface in C++ or the tlp.BooleanAlgorithm interface in Python. The computed values will be stored in result. Parameters can be transmit to the algorithm using a tlp.DataSet . In some cases, algorithms can use this tlp.DataSet in order to return some external information (not stored in result). To determine a plugin’s parameters, you can either:
 refer to its documentation
 call the tlp.getDefaultPluginParameters() with the name of the plugin
Returns a tuple whose first member is a boolean indicating if the algorithm terminates successfully and second member is a string which can contain an error message.
Parameters: 


Return type:  (boolean, string) 
Throws :  an exception if the requested boolean algorithm plugin is not registered in the plugins database. 
Warning
Previous values stored in result will be deleted.
Deprecated since version 3.8: use tlp.Graph.applyColorAlgorithm() instead
Computes a color property on the current graph using an external named color algorithm (plugin). Color algorithm plugins are objects implementing the tlp::ColorAlgorithm interface in C++ or the tlp.ColorAlgorithm interface in Python. The computed values will be stored in result. Parameters can be transmit to the algorithm using a tlp.DataSet . In some cases, algorithms can use this tlp.DataSet in order to return some external information (not stored in result). To determine a plugin’s parameters, you can either:
 refer to its documentation
 call the tlp.getDefaultPluginParameters() with the name of the plugin
Returns a tuple whose first member is a boolean indicating if the algorithm terminates successfully and second member is a string which can contain an error message.
Parameters: 


Return type:  (boolean, string) 
Throws :  an exception if the requested color algorithm plugin is not registered in the plugins database. 
Warning
Previous values stored in result will be deleted.
Deprecated since version 3.8: use tlp.Graph.applyDoubleAlgorithm() instead
Computes a double property on the current graph using an external named double algorithm (plugin). Double algorithm plugins are objects implementing the tlp::DoubleAlgorithm interface in C++ or the tlp.DoubleAlgorithm interface in Python. The computed values will be stored in result. Parameters can be transmit to the algorithm using a tlp.DataSet . In some cases, algorithms can use this tlp.DataSet in order to return some external information (not stored in result). To determine a plugin’s parameters, you can either:
 refer to its documentation
 call the tlp.getDefaultPluginParameters() with the name of the plugin
Returns a tuple whose first member is a boolean indicating if the algorithm terminates successfully and second member is a string which can contain an error message.
Parameters: 


Return type:  (boolean, string) 
Throws :  an exception if the requested double algorithm plugin is not registered in the plugins database. 
Warning
Previous values stored in result will be deleted.
Deprecated since version 3.8: use tlp.Graph.applyIntegerAlgorithm() instead
Computes an integer property on the current graph using an external named integer algorithm (plugin). Integer algorithm plugins are objects implementing the tlp::IntegerAlgorithm interface in C++ or the tlp.IntegerAlgorithm interface in Python. The computed values will be stored in result. Parameters can be transmit to the algorithm using a tlp.DataSet . In some cases, algorithms can use this tlp.DataSet in order to return some external information (not stored in result). To determine a plugin’s parameters, you can either:
 refer to its documentation
 call the tlp.getDefaultPluginParameters() with the name of the plugin
Returns a tuple whose first member is a boolean indicating if the algorithm terminates successfully and second member is a string which can contain an error message.
Parameters: 


Return type:  (boolean, string) 
Throws :  an exception if the requested integer algorithm plugin is not registered in the plugins database. 
Warning
Previous values stored in result will be deleted.
Deprecated since version 3.8: use tlp.Graph.applyLayoutAlgorithm() instead
Computes a layout property on the current graph using an external named layout algorithm (plugin). Layout algorithm plugins are objects implementing the tlp::LayoutAlgorithm interface in C++ or the tlp.LayoutAlgorithm interface in Python. The computed values will be stored in result. Parameters can be transmit to the algorithm using a tlp.DataSet . In some cases, algorithms can use this tlp.DataSet in order to return some external information (not stored in result). To determine a plugin’s parameters, you can either:
 refer to its documentation
 call the tlp.getDefaultPluginParameters() with the name of the plugin
Returns a tuple whose first member is a boolean indicating if the algorithm terminates successfully and second member is a string which can contain an error message.
Parameters: 


Return type:  (boolean, string) 
Throws :  an exception if the requested layout algorithm plugin is not registered in the plugins database. 
Warning
Previous values stored in result will be deleted.
Deprecated since version 3.8: use tlp.Graph.applySizeAlgorithm() instead
Computes a size property on the current graph using an external named size algorithm (plugin). Size algorithm plugins are objects implementing the tlp::SizeAlgorithm interface in C++ or the tlp.SizeAlgorithm interface in Python. The computed values will be stored in result. Parameters can be transmit to the algorithm using a tlp.DataSet . In some cases, algorithms can use this tlp.DataSet in order to return some external information (not stored in result). To determine a plugin’s parameters, you can either:
 refer to its documentation
 call the tlp.getDefaultPluginParameters() with the name of the plugin
Returns a tuple whose first member is a boolean indicating if the algorithm terminates successfully and second member is a string which can contain an error message.
Parameters: 


Return type:  (boolean, string) 
Throws :  an exception if the requested size algorithm plugin is not registered in the plugins database. 
Warning
Previous values stored in result will be deleted.
Deprecated since version 3.8: use tlp.Graph.applyStringAlgorithm() instead
Computes a string property on the current graph using an external named string algorithm (plugin). String algorithm plugins are objects implementing the tlp::StringAlgorithm interface in C++ or the tlp.StringAlgorithm interface in Python. The computed values will be stored in result. Parameters can be transmit to the algorithm using a tlp.DataSet . In some cases, algorithms can use this tlp.DataSet in order to return some external information (not stored in result). To determine a plugin’s parameters, you can either:
 refer to its documentation
 call the tlp.getDefaultPluginParameters() with the name of the plugin
Returns a tuple whose first member is a boolean indicating if the algorithm terminates successfully and second member is a string which can contain an error message.
Parameters: 


Return type:  (boolean, string) 
Throws :  an exception if the requested string algorithm plugin is not registered in the plugins database. 
Warning
Previous values stored in result will be deleted.
Marks the state of the current root graph in the hierarchy. The next updates will be recorded in order to be undone at the next call of the tlp.Graph.pop() method. Be careful that all the updates are undone except those who affect the ordering of edges.
Parameters:  unpopAllowed (boolean) – If set to False, the next updates could not be replayed after undone. If some previously undonevupdates exist they could no longer be replayed. 

Restores a previously marked state of the current root graph in the hierarchy. The restored state does not remain marked.
Parameters:  unpopAllowed (boolean) – If set to False, the undone updates could not be replayed. 

Marks again the current state of the root graph hierarchy and replays the last updates previously undone.
Returns True if a previously marked state can be restored.
Return type:  boolean 

Returns True if some previously undone updates can be replayed.
Return type:  boolean 

Returns True if the current state updates can be undone then replayed.
Return type:  boolean 

Closes a set of existing nodes into a metanode and returns it. Edges from nodes in the set to other nodes are replaced with edges from the metanode to the other nodes.
Parameters: 


Return type:  
Throws :  an exception if one of the provided nodes does not belong to the graph. Warning This method will fail when called on the root graph. 
Populates a quotient graph with one meta node for each iterated graph. Returns a list of created metanodes.
Parameters:  

Return type:  list of tlp.node 
Closes a subgraph into a metanode and returns it. Edges from nodes in the subgraph to nodes outside the subgraph are replaced with edges from the metanode to the nodes outside the subgraph.
The provided subgraph can not be a descendant of the current graph in the graph hierarchy. When creating a metanode, all nodes that are closed in it are first deleted from the graph. These nodes are also deleted in the subgraphs of the graph and in all descendant subgraphs. So if the provided subgraph is a descendant of the graph, all its nodes and edges will be deleted and the metanode will point to an empty subgraph.
Parameters: 


Return type:  
Throws :  an exception if the provided subgraph is a descandent of the graph in the graph hierarchy or if one of the element in the subgraph does not belong to the graph. 
Warning
This method will fail when called on the root graph.
Opens a metanode and replaces all edges between that meta node and other nodes in the graph.
Parameters: 


Warning
This method will fail when called on the root graph.
New in version 3.8.
Registers a new graph observer object that will receive notifications when the graph is modified.
Parameters:  graphObserver (tlp.GraphObserver) – the new graph observer to register 

New in version 3.8.
Removes a registered graph observer object.
Parameters:  graphObserver (tlp.GraphObserver) – the graph observer to remove 

New in version 3.8.
Derived implementation of that class receives a message (through a callback/handler method) after each modification of a tlp.Graph object.
To receive notifications, the tlp.GraphObserver object must first be connected to the tlp.Graph object. This is done by calling the tlp.Graph.addGraphObserver() method.
Depending on which messages you want to receive, you need to override different methods of tlp.GraphObserver.
The Observer pattern is described in the lecture notes and pp293304 of Design Patterns by Gamma, Helm, Johnson, and Vlissides. It is a framework for handling state dependency between observer and observed object.
Below is a small example of an observer that displays a message on the standard output each time a node is added to a graph:
class PrintObs(tlp.GraphObserver):
def addNode(self, graph, node):
print node, " added in ", graph
printObs = PrintObs()
def main(graph):
graph.addGraphObserver(printObs)
graph.addNode() # output : "<node ?> added in <graph ?>"
This method is called each time an edge is added in an observed graph.
Parameters: 

This method is called each time a new inherited property is attached to an observed graph.
Parameters: 


This method is called each time a new local property is attached to an observed graph.
Parameters: 


This method is called each time a node is added in an observed graph.
Parameters: 

This method is called each time a subgraph is added in an observed graph.
Parameters: 

This method is called after the deletion of an inherited property attached to an observed graph.
Parameters: 


This method is called after the deletion of a local property attached to an observed graph.
Parameters: 


This method is called after the creation/modification of an attribute in an observed graph.
Parameters: 


This method is called after the modification of the ends of an edge in an observed graph.
Parameters: 

This method is called before the deletion of an inherited property attached to an observed graph.
Parameters: 


This method is called before the deletion of a local property attached to an observed graph.
Parameters: 


This method is called before the creation/modification of an attribute in an observed graph.
Parameters: 


This method is called before the modification of the ends of an edge in an observed graph.
Parameters: 

This method is called each time an edge is deleted in an observed graph.
Parameters: 

This method is called each time a node is deleted in an observed graph.
Parameters: 

This method is called each time a subgraph is deleted in an observed graph.
Parameters: 

This method is called when an observed graph is deleted.
Parameters:  graph (tlp.Graph) – the observed graph 

New in version 3.8.
Derived implementation of that class receives a message (through a callback/handler method) after each modification of an object deriving from tlp.PropertyInterface.
To receive notifications, the tlp.PropertyObserver object must first be connected to the tlp.Graph object. This is done by calling the tlp.PropertyInterface.addPropertyObserver() method.
Depending on which messages you want to receive, you need to override different methods of tlp.PropertyObserver.
The Observer pattern is described in the lecture notes and pp293304 of Design Patterns by Gamma, Helm, Johnson, and Vlissides. It is a framework for handling state dependency between observer and observed object.
This method is called after setting the same value on all edges in an observed property.
Parameters:  property (subclasses of tlp.PropertyInterface) – the observed property 

This method is called after setting the same value on all nodes in an observed property.
Parameters:  property (subclasses of tlp.PropertyInterface) – the observed property 

This method is called after the modification of the value associated to an edge in an observed property.
Parameters: 


This method is called after the modification of the value associated to a node in an observed property.
Parameters: 


This method is called before setting the same value on all edges in an observed property.
Parameters:  property (subclasses of tlp.PropertyInterface) – the observed property 

This method is called before setting the same value on all nodes in an observed property.
Parameters:  property (subclasses of tlp.PropertyInterface) – the observed property 

This method is called before the modification of the value associated to an edge in an observed property.
Parameters: 


This method is called before the modification of the value associated to a node in an observed property.
Parameters: 


This method is called when an observed property is deleted.
Parameters:  property (subclasses of tlp.PropertyInterface) – the observed property 

This class represents a vector with 3 floating point components. It can be instantiated as illustrated in the code below:
# Initializes a Vec3f with all components set to 0.0
v = tlp.Vec3f()
# Initializes a Vec3f with all components set to 1.0
v2 = tlp.Vec3f(1.0)
# Initializes a Vec3f by specifying the value of each component
v3 = tlp.Vec3f(1.0, 2.0, 3.0)
# Initializes a Vec3f by copy
v4 = tlp.Vec3f(v3)
Numerous mathematical operations are available to work with vectors. The sample code below illustrates them:
# Instantiate two vectors
v = tlp.Vec3f(4.5, 1.0, 3.0)
v2 = tlp.Vec3f(1.5, 2.0, 6.0)
# Add two vectors, operator += is also available
v3 = v + v2
# Add a value to all components of a vector, operator += is also available
v4 = v + 2.0
# Subtract two vectors, operator = is also available
v5 = v  v2
# Subtract a value to all components of a vector, operator = is also available
v6 = v  3.0
# Multiply two vectors (not vector product), operator *= is also available
v7 = v * v2
# Multiply each component of a vector by a value, operator *= is also available
v8 = v * 2.0
# Divide two vectors, operator /= is also available
v9 = v / v2
# Divide each component of a vector by a value, operator /= is also available
v10 = v / 2.0
# Perform a vector product, operator ^= is also available
v11 = v ^ v2
Each component of the vector can be read / written through the [] operator:
v = tlp.Vec3f(1.0, 2.0, 3.0)
# read first component
a = v[0]
# write third component
v[2] = 4.0
Operators for vectors equality (==), vectors difference (!=) and vectors comparison (<, >) are also available.
Convenient method. Returns the third component of the vector.
Return type:  float 

Computes and returns the distance between the vector (3d point) and another one.
Parameters:  v (tlp.Vec3f) – a vector 

Return type:  float 
Computes and returns the dot product (scalar product) of the vector with another one
Parameters:  v (tlp.Vec3f) – a vector 

Return type:  float 
Set the same value to each component of the vector.
Parameters:  val (float) – a value 

Returns the vector as a tuple.
Return type:  (float, float, float) 

Convenient method. Returns the third component of the vector.
Return type:  float 

Convenient method. Returns the second component of the vector.
Return type:  float 

Convenient method. Returns the first component of the vector.
Return type:  float 

Convenient method. Returns the first component of the vector.
Return type:  float 

Convenient method. Returns the second component of the vector.
Return type:  float 

Convenient method. Returns the third component of the vector.
Return type:  float 

Convenient method. Returns the second component of the vector.
Return type:  float 

Computes and returns the euclidean norm of the vector.
Return type:  float 

Sets each component of the vector.
Parameters: 


Convenient method. Sets the third component of the vector.
Parameters:  depth (float) – a value 

Convenient method. Sets the second component of the vector.
Parameters:  height (float) – a value 

Convenient method. Sets the first component of the vector.
Parameters:  width (float) – a value 

Convenient method. Sets the first component of the vector.
Parameters:  x (float) – a value 

Convenient method. Sets the second component of the vector.
Parameters:  y (float) – a value 

Convenient method. Sets the third component of the vector.
Parameters:  z (float) – a value 

Convenient method. Returns the first component of the vector.
Return type:  float 

Convenient method. Returns the first component of the vector.
Return type:  float 

Convenient method. Returns the second component of the vector.
Return type:  float 

Convenient method. Returns the third component of the vector.
Return type:  float 

This class represents the 3D bounding box of an object. It is defined by two 3d points, the first one being the lowest point (bottomleft corner), the second being the highest (topright corner).
A bounding box can be instantiated and manipulated the following ways:
# Initialize a nonvalid bounding box.
# The minimum is (1, 1, 1) and the maximum is (1, 1, 1).
bb = tlp.BoundingBox()
# Initialize a bounding box by specifying the lowest and highest point.
# The validity of the bounding box is checked in debug mode (an assertion is raised if it is not valid).
bb2 = tlp.BoundingBox(tlp.Vec3f(0,0,0), tlp.Vec3f(10,10,10))
# Reading / writing the bounding box components can be done through the [] operator
min = bb2[0]
max = bb2[1]
New in version 3.7.
Checks if the given point is inside the current bounding box. If the bounding box is invalid the result is always False.
Parameters:  point (tlp.Vec3f) – a point in the 3D space. 

Return type:  boolean 
Returns the depth of the bounding box.
Return type:  float 

Expands the bounding box to one containing the vector passed as parameter. If the vector is inside the bounding box, it remains unchanged.
Parameters:  point (tlp.Vec3f) – A point in the 3D space we want the bounding box to encompass. 

Returns the height of the bounding box.
Return type:  float 

New in version 3.7.
Checks if the given bounding box intersects the current one. If one of the bounding boxes is invalid returns False.
Parameters:  boundingBox (tlp.BoundingBox) – the bounding box on which to check intersection 

Return type:  boolean 
New in version 3.7.
Checks if the bounding box intersects the given line segment. If the bounding box is invalid the result is always False.
Parameters:  

Return type:  boolean 
Checks whether the bounding box’s lowest point is less than it’s highest point. “Less Than” means axisbyaxis comparison, i.e. x1 < x2 && y1 < y2 && z1 < z2.
Return type:  boolean 

Translates the bounding box by the displacement given by the vector passed as parameter.
Parameters:  displacement (tlp.Vec3f) – The displacement vector in 3D space to translate this bounding box by. 

Returns the width of the bounding box.
Return type:  float 

This class represents a color using the RGBA color space. It can be instantiated the following way:
# Each component must be in the range [0, 255]
redOpaque = tlp.Color(255, 0, 0)
blueTranslucent = tlp.Color(0, 0, 255, 100)
The value of each component can be read / written using the [] operator.
Returns the alpha component of the color.
Return type:  integer 

Returns the alpha component of the color in the OpenGL format (a float value between 0.0 and 1.0).
Return type:  float 

Returns the blue component of the color.
Return type:  integer 

Returns the blue component of the color in the OpenGL format (a float value between 0.0 and 1.0).
Return type:  float 

Returns the green component of the color.
Return type:  integer 

Returns the green component of the color in the OpenGL format (a float value between 0.0 and 1.0).
Return type:  float 

Returns the hue component (in the range [0, 360]) of the color in the HSV color space.
Return type:  integer 

Returns the red component of the color.
Return type:  integer 

Returns the red component of the color in the OpenGL format (a float value between 0.0 and 1.0).
Return type:  float 

Returns the saturation component (in the range [0, 255]) of the color in the HSV color space.
Return type:  integer 

Returns the value component (in the range [0, 255]) of the color in the HSV color space.
Return type:  integer 

Sets each component of the color. Each component must be in the range [0, 255].
Parameters: 


Sets the alpha component of the color (must be in the range [0, 255]).
Parameters:  alpha (integer) – the alpha component value 

Sets the blue component of the color (must be in the range [0, 255]).
Parameters:  blue (integer) – the blue component value 

Sets the green component of the color (must be in the range [0, 255]).
Parameters:  green (integer) – the green component value 

Sets the hue component of the color in the HSV color space (must be in the range [0, 360]).
Parameters:  hue (integer) – the hue component value 

Sets the red component of the color (must be in the range [0, 255]).
Parameters:  red (integer) – the red component value 

Sets the saturation component of the color in the HSV color space (must be in the range [0, 255]).
Parameters:  saturation (integer) – the saturation component value 

Sets the value component of the color in the HSV color space (must be in the range [0, 255]).
Parameters:  value (integer) – the value component value 

This class represents a color scale to perform color mapping. The color scale can be either gradient (default) or predefined colors steps. If the color scale is a gradient, returned colors are interpolated in function of the position. If the color scale isn’t a gradient returned colors are the predefined colors steps.
The sample code below illustrates how to create and manipulate a color scale:
# Creating an empty color scale (default constructor creates a heatmap from blue to red).
colorScale = tlp.ColorScale([])
# Color scale initialization : from blue to red with gradient.
colorScale.setColorAtPos(0.0, tlp.Color(0,0,255))
colorScale.setColorAtPos(1.0, tlp.Color(255,0,0))
# The following syntax could also be used
# colors = [tlp.Color(0,0,255), tlp.Color(255,0,0)]
# colorScale.setColorScale(colors)
# or
# colorScale = tlp.ColorScale(colors)
# Get the color for the position 0.5, i.e. Color(127,0,127).
color = colorScale.getColorAtPos(0.5);
# Reinitialize the color scale : from blue to red without gradient.
newColors = []
newColors.append(tlp.Color(0,0,255))
newColors.append(tlp.Color(255,0,0))
colorScale.setColorScale(newColors,False)
# Get the color for the position 0.3, i.e. Color(0,0,255).
color = colorScale.getColorAtPos(0.3)
# Get the color for the position 0.7, i.e. Color(255,0,0).
color = colorScale.getColorAtPos(0.7)
This method computes the color associated to a specific position in the color scale and returns it.
Parameters:  pos (float) – This value defines the position of the color in the scale and must be between 0.0 and 1.0 (it will be clamped otherwise). 

Return type:  tlp.Color 
Returns a dictionary corresponding to the color scale.
Return type:  a dictionary whose indexes are of type float and the values of type tlp.Color 

Returns True if the color scale is a gradient.
Return type:  boolean 

This class represents a list of selectable string entries that can be used as plugin parameter. The list will appear as a combo box in the Plugin Parameter Dialog from the Tulip GUI.
Returns the string element at a certain index in the collection.
Parameters:  index (integer) – a valid index in the collection 

Return type:  string 
Returns True if the collection is empty.
Return type:  boolean 

Returns the index of the current selected string.
Return type:  integer 

Returns the current selected string value.
Return type:  string 

Adds a string value to this string collection.
Parameters:  element (string) – the string to add to the collection 

Sets the current selected string index. Returns True if the provided index is valid.
Parameters:  index (integer) – a valid index in the string collection 

Return type:  boolean 
Sets the current selected string value. Returns True if the string value exists in the collection.
Parameters:  value (string) – a string value from the collection 

Return type:  boolean 
Returns the number of strings in the collection.
Return type:  integer 

This class is used to store a set of parameters to transmit to a Tulip algorithm. Below is an exhaustive list of data types that can be stored in a Tulip data set:
If you try to store an unsupported data type, an exception will be thrown. Each value stored in a data set is associated to a string key. Reading / Writing a value in a data set is done through the [] operator as illustrated below:
# data set creation
dataSet = tlp.DataSet()
# writing integer values
dataSet["height"] = 100
dataSet["width"] = 300
# reading integer values
area = dataSet["height"] * dataSet["width"]
When reading a data set value, a reference is returned not a copy.
Checks if the data set contains a value associated to a particular key.
Parameters:  key (string) – the key to check 

Return type:  boolean 
Returns the list of keys associated to the values stored in the data set.
Return type:  list of string 

Remove the value associated to a particular key from the data set if it exists.
Parameters:  key (string) – the key of the value to remove. 

Returns the number of values stored in the data set.
Return type:  integer 

This interface allows to notify and control the progression of a process.
Sets the state flag to cancel, notifying to the process that the user wants to cancel it. Canceling a process must stop it and revert all the changes performed since its start.
Returns a message describing the error encountered during the process. If no error has been encountered, an empty string is returned.
Return type:  string 

Returns True if the preview mode is enabled. The preview mode redraws the graph while applying the algorithm, making it slower.
Return type:  boolean 

Use this method to notify the progression of the process.
Parameters: 


Return type:  a value indicating whether the progress has been stopped (tlp.TLP_STOP), cancelled (tlp.TLP_CANCEL), or will continue (tlp.TLP_CONTINUE). 
Changes the comment about the process progression.
Parameters:  msg (string) – A description of what the process is currently doing, displayed to inform the user. 

Sets the message describing the error encountered during the process.
Parameters:  errorMsg (string) – the error message to set 

Enables / disables the preview mode. The preview mode redraws the graph while applying the algorithm, making it slower.
Parameters:  preview (boolean) – indicates if the preview mode should be activated 

This tells the widget associated to this PluginProgress if it should show a preview checkbox, allowing the user to decide if the algorithm should draw a preview or not.
Parameters:  showPreview (boolean) – whether the progress widget should contain a preview checkbox or not. 

Gets the current internal state of the PluginProgress.
Return type:  a value indicating whether the progress has been stopped (tlp.TLP_STOP), cancelled (tlp.TLP_CANCEL), or will continue (tlp.TLP_CONTINUE). 

Sets the state flag to stop, notifying to the process that the user wants to stop it. Stopping a process does not revert changes.
New in version 3.8.
Registers a new property observer object that will receive notifications when the property is modified.
Parameters:  propertyObserver (tlp.PropertyObserver) – the new property observer to register 

Removes the value stored for the node given in parameter. The new value for the node is the default one.
Parameters:  node (tlp.node) – an existing node 

Throws :  an exception if the node does not belong to the graph attached to the property 
Returns a string representation of the edge default value.
Return type:  string 

Returns a string conversion of the value registered for the given edge.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  string 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Returns the graph on which the property has been defined.
Return type:  tlp.Graph 

Warning
If the property is inherited the graph could be different that the one used to get that property.
Returns the name of the property.
Return type:  string 

Returns a string representation of the node default value.
Return type:  string 

Returns a string conversion of the value registered for the given node.
Parameters:  node (tlp.node) – an existing node 

Return type:  string 
Throws :  an exception if the node does not belong to the graph attached to the property 
Returns an iterator on all edges whose value is different from the default value.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter. In that case, only the edges owned by this subgraph are returned by the iterator. 

Return type:  tlp.IteratorEdge 
Returns an iterator on all nodes whose value is different from the default value.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter. In that case, only the nodes owned by this subgraph are returned by the iterator. 

Return type:  tlp.IteratorNode 
Returns a string describing the type of the property, i.e. “graph”, “double”, “layout”, “string”, “integer”, “color”, “size”, ...
Return type:  string 

New in version 3.8.
Removes a registered property observer object.
Parameters:  propertyObserver (tlp.PropertyObserver) – the property observer to remove 

Clears all edges registered values, and sets a new edge default value in converting the given string representation of a value. Returns True if the given string representation has been successfully converted to a value, False otherwise.
Parameters:  str (string) – a string representation of a value 

Return type:  boolean 
Clears all nodes registered values, and sets a new node default value in converting the given string representation of a value. Returns True if the given string representation has been successfully converted to a value, False otherwise.
Parameters:  str (string) – a string representation of a value 

Return type:  boolean 
Registers a new value for the given edge in converting the given string representation. Returns True if the given string representation has been successfully converted to a value, False otherwise.
Parameters: 


Return type:  boolean 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Registers a new value for the given node in converting the given string representation. Returns True if the given string representation has been successfully converted to a value, False otherwise.
Parameters: 


Return type:  boolean 
Throws :  an exception if the node does not belong to the graph attached to the property 
Bases: tlp.PropertyInterface
New in version 3.8.
Copies the value hold by a property on a node to another node on this property.
Parameters: 


New in version 3.8.
Copies the value hold by a property on an edge to another edge on this property.
Parameters: 


New in version 3.8.
Copies the values hold by a property on this property.
Parameters:  prop (tlp.BooleanProperty) – the property to copy 

Returns an iterator through all nodes belonging to the attached graph whose associated value is equal to the one given in parameter.
Parameters: 


Return type:  tlp.IteratorNode 
Returns an iterator through all edges belonging to the attached graph whose associated value is equal to the one given in parameter.
Parameters: 


Return type:  tlp.IteratorEdge 
Reverses all values associated to graph elements, i.e True => False, False => True .
Reverses all the direction of edges in the attached graph which are set to True in this boolean property.
Returns the default value associated to the edges.
Return type:  boolean 

Returns the value associated to a particular edge.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  boolean 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Returns the default value associated to the nodes.
Return type:  boolean 

Returns the value associated to a particular node.
Parameters:  node (tlp.node) – an existing node 

Return type:  boolean 
Throws :  an exception if the node does not belong to the graph attached to the property 
Sets the same value on the whole set of edges.
Parameters:  val (boolean) – the value to set on the edges. 

Sets the same value on the whole set of nodes.
Parameters:  val (boolean) – the value to set on the nodes. 

Bases: tlp.PropertyInterface
New in version 3.8.
Copies the value hold by a property on a node to another node on this property.
Parameters: 


New in version 3.8.
Copies the value hold by a property on an edge to another edge on this property.
Parameters: 


New in version 3.8.
Copies the values hold by a property on this property.
Parameters:  prop (tlp.ColorProperty) – the property to copy 

Returns the value associated to a particular edge.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  tlp.Color 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Returns the value associated to a particular node.
Parameters:  node (tlp.node) – an existing node 

Return type:  tlp.Color 
Throws :  an exception if the node does not belong to the graph attached to the property 
Sets the same value on the whole set of edges.
Parameters:  val (tlp.Color) – the value to set on the edges. 

Sets the same value on the whole set of nodes.
Parameters:  val (tlp.Color) – the value to set on the nodes. 

Sets the value of a particular edge.
Parameters:  

Throws :  an exception if the edge does not belong to the graph attached to the property 
Bases: tlp.PropertyInterface
New in version 3.8.
Copies the value hold by a property on a node to another node on this property.
Parameters: 


New in version 3.8.
Copies the value hold by a property on an edge to another edge on this property.
Parameters: 


New in version 3.8.
Copies the values hold by a property on this property.
Parameters:  prop (tlp.DoubleProperty) – the property to copy 

Returns the minimum value on the nodes for that double property.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case return the minimum value on the nodes belonging to that subgraph. 

Return type:  float 
Returns the maximum value on the nodes for that double property.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case return the maximum value on the nodes belonging to that subgraph. 

Return type:  float 
Returns the minimum value on the edges for that double property.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case return the minimum value on the edges belonging to that subgraph. 

Return type:  float 
Returns the maximum value on the edges for that double property.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case return the maximum value on the edges belonging to that subgraph. 

Return type:  float 
Performs an uniform quantification on nodes and edges based on the values stored in that double property. An uniform quantification tries to separate the nodes and edges in n classes of equivalent size according to theirs values in increasing order.
Parameters:  n (integer) – the number of desired classes 

Warning
All previous values on nodes and edges will be erased and replaced by the id of the class they belong to.
Performs an uniform quantification on nodes based on the values stored in that double property. An uniform quantification tries to separate the nodes in n classes of equivalent size according to theirs values in increasing order.
Parameters:  n (integer) – the number of desired classes 

Warning
All previous values on nodes will be erased and replaced by the id of the class they belong to.
Performs an uniform quantification on edges based on the values stored in that double property. An uniform quantification tries to separate the edges in n classes of equivalent size according to theirs values in increasing order.
Parameters:  n (integer) – the number of desired classes 

Warning
All previous values on edges will be erased and replaced by the id of the class they belong to.
Returns the default value associated to the edges.
Return type:  float 

Returns the value associated to a particular edge.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  float 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Returns the default value associated to the nodes.
Return type:  float 

Returns the value associated to a particular node.
Parameters:  node (tlp.node) – an existing node 

Return type:  float 
Throws :  an exception if the node does not belong to the graph attached to the property 
Sets the same value on the whole set of edges.
Parameters:  val (float) – the value to set on the edges. 

Sets the same value on the whole set of nodes.
Parameters:  val (float) – the value to set on the nodes. 

Bases: tlp.PropertyInterface
New in version 3.8.
Copies the value hold by a property on a node to another node on this property.
Parameters: 


New in version 3.8.
Copies the value hold by a property on an edge to another edge on this property.
Parameters: 


New in version 3.8.
Copies the values hold by a property on this property.
Parameters:  prop (tlp.IntegerProperty) – the property to copy 

Returns the minimum value on the nodes for that integer property.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case return the minimum value on the nodes belonging to that subgraph. 

Return type:  integer 
Returns the maximum value on the nodes for that integer property.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case return the maximum value on the nodes belonging to that subgraph. 

Return type:  integer 
Returns the minimum value on the edges for that integer property.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case return the minimum value on the edges belonging to that subgraph. 

Return type:  integer 
Returns the maximum value on the edges for that integer property.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case return the maximum value on the edges belonging to that subgraph. 

Return type:  integer 
Returns the default value associated to the edges.
Return type:  integer 

Returns the value associated to a particular edge.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  integer 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Returns the default value associated to the nodes.
Return type:  integer 

Returns the value associated to a particular node.
Parameters:  node (tlp.node) – an existing node 

Return type:  integer 
Throws :  an exception if the node does not belong to the graph attached to the property 
Sets the same value on the whole set of edges.
Parameters:  val (integer) – the value to set on the edges. 

Sets the same value on the whole set of nodes.
Parameters:  val (integer) – the value to set on the nodes. 

Bases: tlp.PropertyInterface
Returns a list of all angular resolution of a node. It is only defined for 2D drawing, meaning the third coordinates is omitted
Parameters:  

Return type:  list of float 
Throws :  an exception if the node does not belong to the graph attached to the property or if the provided subgraph is not a descendant of the graph attached to the property 
Returns the average angular resolution of the layout. It is only defined for 2D drawing, meaning the third coordinate is omitted
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case computes the average angular resolution for the layout of the nodes belonging to that subgraph. 

Return type:  float 
Throws :  an exception if the provided subgraph is not a descendant of the graph attached to the property 
Returns the average angular resolution of a node. It is only defined for 2D drawing, meaning the third coordinate is omitted
Parameters:  

Return type:  float 
Throws :  an exception if the node does not belong to the graph attached to the property or if the provided subgraph is not a descendant of the graph attached to the property 
New in version 3.7.
Returns the average edge length of the layout, the bends are taken into account.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case only computes the average edge length for that subgraph. 

Return type:  float 
Throws :  an exception if the provided subgraph is not a descendant of the graph attached to the property 
Centers the layout, meaning translating it in order that the center of its bounding box is (0,0,0)
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case only centers the layout of that subgraph. 

Throws :  an exception if the provided subgraph is not a descendant of the graph attached to the property 
New in version 3.7.
Centers the layout to newCenter, meaning translating it in order that the center of its bounding box is equal to newCenter.
Parameters:  

Throws :  an exception if the provided subgraph is not a descendant of the graph attached to the property 
Fixes embedding of the graph according to the layout, ie. sort edges around nodes according to their neighbors/bends position in the layout. Only works in 2D, the third coordinate is not taken into account.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case fixes embedding of that subgraph 

Throws :  an exception if the provided subgraph is not a descendant of the graph attached to the property 
Fixes embedding of the node according to the layout, ie. sort edges around the node according to their neighbors/bends position in the layout. Only works in 2D, the third coordinate is not taken into account.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case fixes embedding of the node in that subgraph 

Throws :  an exception if the node does not belong to the graph attached to the property or if the provided subgraph is not a descendant of the graph attached to the property 
New in version 3.8.
Copies the value hold by a property on a node to another node on this property.
Parameters: 


New in version 3.8.
Copies the value hold by a property on an edge to another edge on this property.
Parameters: 


New in version 3.8.
Copies the values hold by a property on this property.
Parameters:  prop (tlp.LayoutProperty) – the property to copy 

Returns the number of edges crossings in the layout.
Returns the length of an edge, the bends are taken into account. Thus, it measures the length of a polyline.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  float 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Warning
This function only measures the length of the polyline between bends, when using curves like Bezier etc... the result will not be the length of the curve.
Returns the minimum coordinate in that layout property, i.e. the bottomleft corner of the graph drawing bounding box.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case return the minimum coordinate of the subgraph layout. 

Return type:  tlp.Coord 
Throws :  an exception if the provided subgraph is not a descendant of the graph attached to the property 
Returns the maximum coordinate in that layout property, i.e. the topright corner of the graph drawing bounding box.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case return the maximum coordinate of the subgraph layout. 

Return type:  tlp.Coord 
Throws :  an exception if the provided subgraph is not a descendant of the graph attached to the property 
Normalizes the layout, meaning dividing each nodes and edges coordinate by the maximum magnitude of the whole coordinates set
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case only normalizes the layout of that subgraph. 

Throws :  an exception if the provided subgraph is not a descendant of the graph attached to the property 
Scales the layout in order to approach an aspect ratio (width / height) of 1.0 .
New in version 3.7.
Rotates the layout around the Xaxis according to an angle in degrees.
Parameters: 


Throws :  an exception if the provided subgraph is not a descendant of the graph attached to the property 
Rotates the layout around the Xaxis of the nodes and edges provided through iterators according to an angle in degrees.
Parameters: 


New in version 3.7.
Rotates the layout around the Yaxis according to an angle in degrees.
Parameters: 


Throws :  an exception if the provided subgraph is not a descendant of the graph attached to the property 
Rotates the layout around the Yaxis of the nodes and edges provided through iterators according to an angle in degrees.
Parameters: 


Rotates the layout around the Zaxis according to an angle in degrees.
Parameters: 


Throws :  an exception if the provided subgraph is not a descendant of the graph attached to the property 
Rotates the layout around the Zaxis of the nodes and edges provided through iterators according to an angle in degrees.
Parameters: 


Scales the layout according to a vector of scale factors (sx, sy, sz).
Parameters:  

Throws :  an exception if the provided subgraph is not a descendant of the graph attached to the property 
Scales the layout of the nodes and edges provided through iterators according to a vector of scale factors (sx, sy, sz).
Parameters: 


Translates the current layout according to a movement vector.
Parameters:  

Throws :  an exception if the provided subgraph is not a descendant of the graph attached to the property 
Translates the layout of a set of nodes and edges provided through iterators according to a movement vector.
Parameters: 


Returns the default value associated to the edges.
Return type:  list of tlp.Coord 

Returns the value associated to a particular edge.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  list of tlp.Coord 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Returns the value associated to a particular node.
Parameters:  node (tlp.node) – an existing node 

Return type:  tlp.Coord 
Throws :  an exception if the node does not belong to the graph attached to the property 
Sets the same value on the whole set of edges.
Parameters:  val (list of tlp.Coord) – the value to set on the edges. 

Sets the same value on the whole set of nodes.
Parameters:  val (tlp.Coord) – the value to set on the nodes. 

Sets the value of a particular edge.
Parameters:  

Throws :  an exception if the edge does not belong to the graph attached to the property 
Bases: tlp.PropertyInterface
New in version 3.8.
Copies the value hold by a property on a node to another node on this property.
Parameters: 


New in version 3.8.
Copies the value hold by a property on an edge to another edge on this property.
Parameters: 


New in version 3.8.
Copies the values hold by a property on this property.
Parameters:  prop (tlp.SizeProperty) – the property to copy 

Returns the minimum value on the nodes for that size property.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case return the minimum value on the nodes belonging to that subgraph. 

Return type:  tlp.Size 
Returns the maximum value on the nodes for that size property.
Parameters:  subgraph (tlp.Graph) – a subgraph can be given in parameter, in that case return the maximum value on the nodes belonging to that subgraph. 

Return type:  tlp.Size 
Scales the sizes of the nodes and edges according to a scale factors vector (sx, sy, sz).
Parameters: 

Scales the sizes of the nodes and edges provided through iterators according to a scale factors vector (sx, sy, sz).
Parameters: 


Returns the value associated to a particular edge.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  tlp.Size 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Returns the value associated to a particular node.
Parameters:  node (tlp.node) – an existing node 

Return type:  tlp.Size 
Throws :  an exception if the node does not belong to the graph attached to the property 
Sets the same value on the whole set of edges.
Parameters:  val (tlp.Size) – the value to set on the edges. 

Sets the same value on the whole set of nodes.
Parameters:  val (tlp.Size) – the value to set on the nodes. 

Sets the value of a particular edge.
Parameters:  

Throws :  an exception if the edge does not belong to the graph attached to the property 
Bases: tlp.PropertyInterface
New in version 3.8.
Copies the value hold by a property on a node to another node on this property.
Parameters: 


New in version 3.8.
Copies the value hold by a property on an edge to another edge on this property.
Parameters: 


New in version 3.8.
Copies the values hold by a property on this property.
Parameters:  prop (tlp.StringProperty) – the property to copy 

Returns the default value associated to the edges.
Return type:  string 

Returns the value associated to a particular edge.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  string 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Returns the default value associated to the nodes.
Return type:  string 

Returns the value associated to a particular node.
Parameters:  node (tlp.node) – an existing node 

Return type:  string 
Throws :  an exception if the node does not belong to the graph attached to the property 
Sets the same value on the whole set of edges.
Parameters:  val (string) – the value to set on the edges. 

Sets the same value on the whole set of nodes.
Parameters:  val (string) – the value to set on the nodes. 

Bases: tlp.PropertyInterface
New in version 3.8.
Copies the value hold by a property on a node to another node on this property.
Parameters: 


New in version 3.8.
Copies the value hold by a property on an edge to another edge on this property.
Parameters: 


New in version 3.8.
Copies the values hold by a property on this property.
Parameters:  prop (tlp.BooleanVectorProperty) – the property to copy 

Returns the default list of values associated to the edges.
Return type:  list of boolean 

Returns the list of values associated to a particular edge.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  list of boolean 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Returns the default list of values associated to the nodes.
Return type:  list of boolean 

Returns the list of values associated to a particular node.
Parameters:  node (tlp.node) – an existing node 

Return type:  list of boolean 
Throws :  an exception if the node does not belong to the graph attached to the property 
Sets the same list of values on the whole set of edges.
Parameters:  val (list of boolean) – the list of values to set on the edges 

Sets the same list of values on the whole set of nodes.
Parameters:  val (list of boolean) – the list of values to set on the nodes 

Sets the list of values of a particular edge.
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property 
Sets the list of values of a particular node.
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Returns the value in the list attached to a particular node at the given index.
Parameters: 


Return type:  boolean 
Throws :  an exception if the node does not belong to the graph attached to the property or if the list attached to the node has a size smaller than the given index. 
Sets the value in the list attached to a particular node at the given index.
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property or if the list attached to the node has a size smaller than the given index. 
Inserts a value at the end of the list attached to a particular node. The size of the list is incremented by one.
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Removes the value at the end of the list (if not empty) attached to a particular node. The size of the list is decremented by one.
Parameters:  node (tlp.node) – an existing node 

Throws :  an exception if the node does not belong to the graph attached to the property 
Resizes the list attached to a particular node. A default value will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Resizes the list attached to a particular node. The value given in paramater will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Returns the value in the list attached to a particular edge at the given index.
Parameters: 


Return type:  boolean 
Throws :  an exception if the edge does not belong to the graph attached to the property or if the list attached to the edge has a size smaller than the given index. 
Sets the value in the list attached to a particular edge at the given index.
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property or if the list attached to the edge has a size smaller than the given index. 
Inserts a value at the end of the list attached to a particular edge. The size of the list is incremented by one.
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property 
Removes the value at the end of the list (if not empty) attached to a particular edge. The size of the list is decremented by one.
Parameters:  edge (tlp.edge) – an existing edge 

Throws :  an exception if the edge does not belong to the graph attached to the property 
Resizes the list attached to a particular edge. A default value will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property 
Resizes the list attached to a particular edge. The value given in paramater will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Bases: tlp.PropertyInterface
New in version 3.8.
Copies the value hold by a property on a node to another node on this property.
Parameters: 


New in version 3.8.
Copies the value hold by a property on an edge to another edge on this property.
Parameters: 


New in version 3.8.
Copies the values hold by a property on this property.
Parameters:  prop (tlp.CoordVectorProperty) – the property to copy 

Returns the default list of values associated to the edges.
Return type:  list of tlp.Coord 

Returns the list of values associated to a particular edge.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  list of tlp.Coord 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Returns the default list of values associated to the nodes.
Return type:  list of tlp.Coord 

Returns the list of values associated to a particular node.
Parameters:  node (tlp.node) – an existing node 

Return type:  list of tlp.Coord 
Throws :  an exception if the node does not belong to the graph attached to the property 
Sets the same list of values on the whole set of edges.
Parameters:  val (list of tlp.Coord) – the list of values to set on the edges 

Sets the same list of values on the whole set of nodes.
Parameters:  val (list of tlp.Coord) – the list of values to set on the nodes 

Sets the list of values of a particular edge.
Parameters:  

Throws :  an exception if the edge does not belong to the graph attached to the property 
Sets the list of values of a particular node.
Parameters:  

Throws :  an exception if the node does not belong to the graph attached to the property 
Returns the value in the list attached to a particular node at the given index.
Parameters: 


Return type:  
Throws :  an exception if the node does not belong to the graph attached to the property or if the list attached to the node has a size smaller than the given index. 
Sets the value in the list attached to a particular node at the given index.
Parameters:  

Throws :  an exception if the node does not belong to the graph attached to the property or if the list attached to the node has a size smaller than the given index. 
Inserts a value at the end of the list attached to a particular node. The size of the list is incremented by one.
Parameters:  

Throws :  an exception if the node does not belong to the graph attached to the property 
Removes the value at the end of the list (if not empty) attached to a particular node. The size of the list is decremented by one.
Parameters:  node (tlp.node) – an existing node 

Throws :  an exception if the node does not belong to the graph attached to the property 
Resizes the list attached to a particular node. A default value will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Resizes the list attached to a particular node. The value given in paramater will be assigned to new elements (if any).
Parameters:  

Throws :  an exception if the node does not belong to the graph attached to the property 
Returns the value in the list attached to a particular edge at the given index.
Parameters: 


Return type:  
Throws :  an exception if the edge does not belong to the graph attached to the property or if the list attached to the edge has a size smaller than the given index. 
Sets the value in the list attached to a particular edge at the given index.
Parameters:  

Throws :  an exception if the edge does not belong to the graph attached to the property or if the list attached to the edge has a size smaller than the given index. 
Inserts a value at the end of the list attached to a particular edge. The size of the list is incremented by one.
Parameters:  

Throws :  an exception if the edge does not belong to the graph attached to the property 
Removes the value at the end of the list (if not empty) attached to a particular edge. The size of the list is decremented by one.
Parameters:  edge (tlp.edge) – an existing edge 

Throws :  an exception if the edge does not belong to the graph attached to the property 
Resizes the list attached to a particular edge. A default value will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property 
Resizes the list attached to a particular edge. The value given in paramater will be assigned to new elements (if any).
Parameters:  

Throws :  an exception if the node does not belong to the graph attached to the property 
Bases: tlp.PropertyInterface
New in version 3.8.
Copies the value hold by a property on a node to another node on this property.
Parameters: 


New in version 3.8.
Copies the value hold by a property on an edge to another edge on this property.
Parameters: 


New in version 3.8.
Copies the values hold by a property on this property.
Parameters:  prop (tlp.ColorVectorProperty) – the property to copy 

Returns the default list of values associated to the edges.
Return type:  list of tlp.Color 

Returns the list of values associated to a particular edge.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  list of tlp.Color 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Returns the default list of values associated to the nodes.
Return type:  list of tlp.Color 

Returns the list of values associated to a particular node.
Parameters:  node (tlp.node) – an existing node 

Return type:  list of tlp.Color 
Throws :  an exception if the node does not belong to the graph attached to the property 
Sets the same list of values on the whole set of edges.
Parameters:  val (list of tlp.Color) – the list of values to set on the edges 

Sets the same list of values on the whole set of nodes.
Parameters:  val (list of tlp.Color) – the list of values to set on the nodes 

Sets the list of values of a particular edge.
Parameters:  

Throws :  an exception if the edge does not belong to the graph attached to the property 
Sets the list of values of a particular node.
Parameters:  

Throws :  an exception if the node does not belong to the graph attached to the property 
Returns the value in the list attached to a particular node at the given index.
Parameters: 


Return type:  
Throws :  an exception if the node does not belong to the graph attached to the property or if the list attached to the node has a size smaller than the given index. 
Sets the value in the list attached to a particular node at the given index.
Parameters:  

Throws :  an exception if the node does not belong to the graph attached to the property or if the list attached to the node has a size smaller than the given index. 
Inserts a value at the end of the list attached to a particular node. The size of the list is incremented by one.
Parameters:  

Throws :  an exception if the node does not belong to the graph attached to the property 
Removes the value at the end of the list (if not empty) attached to a particular node. The size of the list is decremented by one.
Parameters:  node (tlp.node) – an existing node 

Throws :  an exception if the node does not belong to the graph attached to the property 
Resizes the list attached to a particular node. A default value will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Resizes the list attached to a particular node. The value given in paramater will be assigned to new elements (if any).
Parameters:  

Throws :  an exception if the node does not belong to the graph attached to the property 
Returns the value in the list attached to a particular edge at the given index.
Parameters: 


Return type:  
Throws :  an exception if the edge does not belong to the graph attached to the property or if the list attached to the edge has a size smaller than the given index. 
Sets the value in the list attached to a particular edge at the given index.
Parameters:  

Throws :  an exception if the edge does not belong to the graph attached to the property or if the list attached to the edge has a size smaller than the given index. 
Inserts a value at the end of the list attached to a particular edge. The size of the list is incremented by one.
Parameters:  

Throws :  an exception if the edge does not belong to the graph attached to the property 
Removes the value at the end of the list (if not empty) attached to a particular edge. The size of the list is decremented by one.
Parameters:  edge (tlp.edge) – an existing edge 

Throws :  an exception if the edge does not belong to the graph attached to the property 
Resizes the list attached to a particular edge. A default value will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property 
Resizes the list attached to a particular edge. The value given in paramater will be assigned to new elements (if any).
Parameters:  

Throws :  an exception if the node does not belong to the graph attached to the property 
Bases: tlp.PropertyInterface
New in version 3.8.
Copies the value hold by a property on a node to another node on this property.
Parameters: 


New in version 3.8.
Copies the value hold by a property on an edge to another edge on this property.
Parameters: 


New in version 3.8.
Copies the values hold by a property on this property.
Parameters:  prop (tlp.DoubleVectorProperty) – the property to copy 

Returns the default list of values associated to the edges.
Return type:  list of float 

Returns the list of values associated to a particular edge.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  list of float 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Returns the default list of values associated to the nodes.
Return type:  list of float 

Returns the list of values associated to a particular node.
Parameters:  node (tlp.node) – an existing node 

Return type:  list of float 
Throws :  an exception if the node does not belong to the graph attached to the property 
Sets the same list of values on the whole set of edges.
Parameters:  val (list of float) – the list of values to set on the edges 

Sets the same list of values on the whole set of nodes.
Parameters:  val (list of float) – the list of values to set on the nodes 

Sets the list of values of a particular edge.
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property 
Sets the list of values of a particular node.
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Returns the value in the list attached to a particular node at the given index.
Parameters: 


Return type:  float 
Throws :  an exception if the node does not belong to the graph attached to the property or if the list attached to the node has a size smaller than the given index. 
Sets the value in the list attached to a particular node at the given index.
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property or if the list attached to the node has a size smaller than the given index. 
Inserts a value at the end of the list attached to a particular node. The size of the list is incremented by one.
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Removes the value at the end of the list (if not empty) attached to a particular node. The size of the list is decremented by one.
Parameters:  node (tlp.node) – an existing node 

Throws :  an exception if the node does not belong to the graph attached to the property 
Resizes the list attached to a particular node. A default value will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Resizes the list attached to a particular node. The value given in paramater will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Returns the value in the list attached to a particular edge at the given index.
Parameters: 


Return type:  float 
Throws :  an exception if the edge does not belong to the graph attached to the property or if the list attached to the edge has a size smaller than the given index. 
Sets the value in the list attached to a particular edge at the given index.
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property or if the list attached to the edge has a size smaller than the given index. 
Inserts a value at the end of the list attached to a particular edge. The size of the list is incremented by one.
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property 
Removes the value at the end of the list (if not empty) attached to a particular edge. The size of the list is decremented by one.
Parameters:  edge (tlp.edge) – an existing edge 

Throws :  an exception if the edge does not belong to the graph attached to the property 
Resizes the list attached to a particular edge. A default value will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property 
Resizes the list attached to a particular edge. The value given in paramater will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Bases: tlp.PropertyInterface
New in version 3.8.
Copies the value hold by a property on a node to another node on this property.
Parameters: 


New in version 3.8.
Copies the value hold by a property on an edge to another edge on this property.
Parameters: 


New in version 3.8.
Copies the values hold by a property on this property.
Parameters:  prop (tlp.IntegerVectorProperty) – the property to copy 

Returns the default list of values associated to the edges.
Return type:  list of integer 

Returns the list of values associated to a particular edge.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  list of integer 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Returns the default list of values associated to the nodes.
Return type:  list of integer 

Returns the list of values associated to a particular node.
Parameters:  node (tlp.node) – an existing node 

Return type:  list of integer 
Throws :  an exception if the node does not belong to the graph attached to the property 
Sets the same list of values on the whole set of edges.
Parameters:  val (list of integer) – the list of values to set on the edges 

Sets the same list of values on the whole set of nodes.
Parameters:  val (list of integer) – the list of values to set on the nodes 

Sets the list of values of a particular edge.
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property 
Sets the list of values of a particular node.
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Returns the value in the list attached to a particular node at the given index.
Parameters: 


Return type:  integer 
Throws :  an exception if the node does not belong to the graph attached to the property or if the list attached to the node has a size smaller than the given index. 
Sets the value in the list attached to a particular node at the given index.
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property or if the list attached to the node has a size smaller than the given index. 
Inserts a value at the end of the list attached to a particular node. The size of the list is incremented by one.
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Removes the value at the end of the list (if not empty) attached to a particular node. The size of the list is decremented by one.
Parameters:  node (tlp.node) – an existing node 

Throws :  an exception if the node does not belong to the graph attached to the property 
Resizes the list attached to a particular node. A default value will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Resizes the list attached to a particular node. The value given in paramater will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Returns the value in the list attached to a particular edge at the given index.
Parameters: 


Return type:  integer 
Throws :  an exception if the edge does not belong to the graph attached to the property or if the list attached to the edge has a size smaller than the given index. 
Sets the value in the list attached to a particular edge at the given index.
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property or if the list attached to the edge has a size smaller than the given index. 
Inserts a value at the end of the list attached to a particular edge. The size of the list is incremented by one.
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property 
Removes the value at the end of the list (if not empty) attached to a particular edge. The size of the list is decremented by one.
Parameters:  edge (tlp.edge) – an existing edge 

Throws :  an exception if the edge does not belong to the graph attached to the property 
Resizes the list attached to a particular edge. A default value will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property 
Resizes the list attached to a particular edge. The value given in paramater will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Bases: tlp.PropertyInterface
New in version 3.8.
Copies the value hold by a property on a node to another node on this property.
Parameters: 


New in version 3.8.
Copies the value hold by a property on an edge to another edge on this property.
Parameters: 


New in version 3.8.
Copies the values hold by a property on this property.
Parameters:  prop (tlp.SizeVectorProperty) – the property to copy 

Returns the default list of values associated to the edges.
Return type:  list of tlp.Size 

Returns the list of values associated to a particular edge.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  list of tlp.Size 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Returns the default list of values associated to the nodes.
Return type:  list of tlp.Size 

Returns the list of values associated to a particular node.
Parameters:  node (tlp.node) – an existing node 

Return type:  list of tlp.Size 
Throws :  an exception if the node does not belong to the graph attached to the property 
Sets the same list of values on the whole set of edges.
Parameters:  val (list of tlp.Size) – the list of values to set on the edges 

Sets the same list of values on the whole set of nodes.
Parameters:  val (list of tlp.Size) – the list of values to set on the nodes 

Sets the list of values of a particular edge.
Parameters:  

Throws :  an exception if the edge does not belong to the graph attached to the property 
Sets the list of values of a particular node.
Parameters:  

Throws :  an exception if the node does not belong to the graph attached to the property 
Returns the value in the list attached to a particular node at the given index.
Parameters: 


Return type:  
Throws :  an exception if the node does not belong to the graph attached to the property or if the list attached to the node has a size smaller than the given index. 
Sets the value in the list attached to a particular node at the given index.
Parameters:  

Throws :  an exception if the node does not belong to the graph attached to the property or if the list attached to the node has a size smaller than the given index. 
Inserts a value at the end of the list attached to a particular node. The size of the list is incremented by one.
Parameters:  

Throws :  an exception if the node does not belong to the graph attached to the property 
Removes the value at the end of the list (if not empty) attached to a particular node. The size of the list is decremented by one.
Parameters:  node (tlp.node) – an existing node 

Throws :  an exception if the node does not belong to the graph attached to the property 
Resizes the list attached to a particular node. A default value will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Resizes the list attached to a particular node. The value given in paramater will be assigned to new elements (if any).
Parameters:  

Throws :  an exception if the node does not belong to the graph attached to the property 
Returns the value in the list attached to a particular edge at the given index.
Parameters: 


Return type:  
Throws :  an exception if the edge does not belong to the graph attached to the property or if the list attached to the edge has a size smaller than the given index. 
Sets the value in the list attached to a particular edge at the given index.
Parameters:  

Throws :  an exception if the edge does not belong to the graph attached to the property or if the list attached to the edge has a size smaller than the given index. 
Inserts a value at the end of the list attached to a particular edge. The size of the list is incremented by one.
Parameters:  

Throws :  an exception if the edge does not belong to the graph attached to the property 
Removes the value at the end of the list (if not empty) attached to a particular edge. The size of the list is decremented by one.
Parameters:  edge (tlp.edge) – an existing edge 

Throws :  an exception if the edge does not belong to the graph attached to the property 
Resizes the list attached to a particular edge. A default value will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property 
Resizes the list attached to a particular edge. The value given in paramater will be assigned to new elements (if any).
Parameters:  

Throws :  an exception if the node does not belong to the graph attached to the property 
Bases: tlp.PropertyInterface
New in version 3.8.
Copies the value hold by a property on a node to another node on this property.
Parameters: 


New in version 3.8.
Copies the value hold by a property on an edge to another edge on this property.
Parameters: 


New in version 3.8.
Copies the values hold by a property on this property.
Parameters:  prop (tlp.StringVectorProperty) – the property to copy 

Returns the default list of values associated to the edges.
Return type:  list of string 

Returns the list of values associated to a particular edge.
Parameters:  edge (tlp.edge) – an existing edge 

Return type:  list of string 
Throws :  an exception if the edge does not belong to the graph attached to the property 
Returns the default list of values associated to the nodes.
Return type:  list of string 

Returns the list of values associated to a particular node.
Parameters:  node (tlp.node) – an existing node 

Return type:  list of string 
Throws :  an exception if the node does not belong to the graph attached to the property 
Sets the same list of values on the whole set of edges.
Parameters:  val (list of string) – the list of values to set on the edges 

Sets the same list of values on the whole set of nodes.
Parameters:  val (list of string) – the list of values to set on the nodes 

Sets the list of values of a particular edge.
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property 
Sets the list of values of a particular node.
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Returns the value in the list attached to a particular node at the given index.
Parameters: 


Return type:  string 
Throws :  an exception if the node does not belong to the graph attached to the property or if the list attached to the node has a size smaller than the given index. 
Sets the value in the list attached to a particular node at the given index.
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property or if the list attached to the node has a size smaller than the given index. 
Inserts a value at the end of the list attached to a particular node. The size of the list is incremented by one.
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Removes the value at the end of the list (if not empty) attached to a particular node. The size of the list is decremented by one.
Parameters:  node (tlp.node) – an existing node 

Throws :  an exception if the node does not belong to the graph attached to the property 
Resizes the list attached to a particular node. A default value will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Resizes the list attached to a particular node. The value given in paramater will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
Returns the value in the list attached to a particular edge at the given index.
Parameters: 


Return type:  string 
Throws :  an exception if the edge does not belong to the graph attached to the property or if the list attached to the edge has a size smaller than the given index. 
Sets the value in the list attached to a particular edge at the given index.
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property or if the list attached to the edge has a size smaller than the given index. 
Inserts a value at the end of the list attached to a particular edge. The size of the list is incremented by one.
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property 
Removes the value at the end of the list (if not empty) attached to a particular edge. The size of the list is decremented by one.
Parameters:  edge (tlp.edge) – an existing edge 

Throws :  an exception if the edge does not belong to the graph attached to the property 
Resizes the list attached to a particular edge. A default value will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the edge does not belong to the graph attached to the property 
Resizes the list attached to a particular edge. The value given in paramater will be assigned to new elements (if any).
Parameters: 


Throws :  an exception if the node does not belong to the graph attached to the property 
This class describes parameters for a plugin. These parameters can be of multiple types, and are used to generate a GUI that will be shown when the plugin in invoked by the user.
Adds a boolean parameter to the plugin.
Parameters: 


Adds a tlp.BooleanProperty parameter to the plugin.
Parameters: 


New in version 4.2.
Adds a tlp.BooleanVectorProperty parameter to the plugin.
Parameters: 


Adds a tlp.Color parameter to the plugin.
Parameters: 


Adds a tlp.ColorProperty parameter to the plugin.
Parameters: 


Adds a tlp.ColorScale parameter to the plugin.
Parameters: 


New in version 4.2.
Adds a tlp.ColorVectorProperty parameter to the plugin.
Parameters: 


New in version 4.2.
Adds a tlp.CoorVectorProperty parameter to the plugin.
Parameters: 


Adds a tlp.DoubleProperty parameter to the plugin.
Parameters: 


New in version 4.2.
Adds a tlp.DoubleVectorProperty parameter to the plugin.
Parameters: 


Adds a floating point number parameter to the plugin.
Parameters: 


Adds an integer parameter to the plugin.
Parameters: 


Adds a tlp.IntegerProperty parameter to the plugin.
Parameters: 


New in version 4.2.
Adds a tlp.IntegerVectorProperty parameter to the plugin.
Parameters: 


Adds a tlp.LayoutProperty parameter to the plugin.
Parameters: 


Adds a tlp.PropertyInterface parameter to the plugin.
Parameters: 


Adds a tlp.SizeProperty parameter to the plugin.
Parameters: 


New in version 4.2.
Adds a tlp.SizeVectorProperty parameter to the plugin.
Parameters: 


Adds a tlp.StringCollection parameter to the plugin.
Parameters: 


Adds a string parameter to the plugin.
Parameters: 


Adds a tlp.StringProperty parameter to the plugin.
Parameters: 


New in version 4.2.
Adds a tlp.StringVectorProperty parameter to the plugin.
Parameters: 


Bases: tlp.Plugin
This abstract class describes a general algorithm plugin. Basic functionality consists in checking the algorithm can run on the current Graph (e.g. is the graph simple ?) then running the algorithm. The algorithm can and should report progress and which task it is performing if it is decomposed in multiple phases (e.g. layouting the graph, coloring it, ...).
class attributes
A tlp.DataSet containing parameters for this algorithm, if any.
A tlp.PluginProgress to give feedback to the user. It can be None, so use with caution.
class methods
This method is called before applying the algorithm on the input graph. You can perform some precondition checks here. Derived classes can reimplement it. Must return a tuple whose first member indicates if the algorithm can be applied and the second one can be used to provide an error message
Return type:  (boolean, string) 

This method is the entry point of the algorithm when it is called. Derived classes must implement it. It is a good practice to report progress through the PluginProgress. The PluginProgress should also be used to report errors, if any. A boolean must also be returned to indicate if the algorithm was successful.
Return type:  boolean 

Bases: tlp.Algorithm
This class is the base interface for metric plugins.
class attributes
The result of the algorithm must be stored in this tlp.DoubleProperty.
Bases: tlp.Plugin
This abstract class describes an import plugin.
class attributes
A tlp.DataSet containing parameters for this import plugin, if any
A tlp.PluginProgress to give feedback to the user. It can be None, so use with caution
class methods
This method is called to import a graph. Derived classes must implement it. A boolean must also be returned to indicate if the import was successful.
Return type:  boolean 

Bases: tlp.WithParameter
This abstract class describes an export plugin.
class attributes
A tlp.DataSet containing parameters for this export plugin, if any
A tlp.PluginProgress to give feedback to the user. It can be None, so use with caution
class methods
This method is called to export the graph to a file. Derived classes must implement it.
The os parameter is an output file stream (initialized by the Tulip GUI or by the tlp.exportGraph() function.). To write data to the file, you have to use the following syntax:
# write the number of nodes and edges to the file
os << self.graph.numberOfNodes() << "\n"
os << self.graph.numberOfEdges() << "\n"
A boolean must also be returned to indicate if the export was successful.
Parameters:  os (std.ostream) – an output file stream 

Return type:  boolean 
The tlp.SelfLoops class represents a self loop that has been replaced by two nodes and three edges. The method tlp.AcyclicTest.makeAcyclic() returns a list of this type.
It contains the following variables :
Returns a tuple whose first member is a boolean indicating if the graph is acyclic or not and second member is a list of edges that create cycle (when the graph is not acyclic).
Parameters:  graph (tlp.Graph) – the graph on which to perform the acyclic test 

Return type:  (boolean, list of tlp.edge) 
Returns True if the graph is acyclic, False if not. The result is cached (ie. the next call with the same graph is done in O(1) time)
Parameters:  graph (tlp.Graph) – the graph on which to perform the acyclic test 

Return type:  boolean 
Makes the graph acyclic, by reversing edge direction (feedback arc set problem). If there is self loops, a new node is added with two edges that points to it. Returns a tuple containing whose first member is a list of reversed edges and second member is a list of transformed self loops.
Parameters:  graph (tlp.Graph) – the graph to make acyclic 

Return type:  (list of tlp.edge, list of tlp.SelfLoops) 
Computes the sets of connected components. Returns a list of connected components.
Parameters:  graph (tlp.Graph) – the graph on which to compute the sets of connected components 

Return type:  list of list of tlp.node 
Returns True if the graph is connected (ie. it exists an undirected path between each pair of nodes), False otherwise.
Parameters:  graph (tlp.Graph) – the graph on which to perform the connected test 

Return type:  boolean 
Returns True if the graph is outerplanar (i.e. a graph with an embedding in the plane such that all vertices belong to the unbounded face of the embedding), False otherwise.
Parameters:  graph (tlp.Graph) – the graph on which to perform the outerplanarity test 

Return type:  boolean 
Returns a list of edges that prevents to make the graph planar (ie. part of the minor of K3,3 or K5).
Parameters:  graph (tlp.Graph) – the graph on which to compute the obstruction edges 

Return type:  list of tlp.edge 
Returns True if the graph is planar (i.e. the graph can be drawn in such a way that no edges cross each other), False otherwise.
Parameters:  graph (tlp.Graph) – the graph on which to perform the planarity test 

Return type:  boolean 
Returns True if the graph is simple (i.e. it contains no self loops or parallel edges), False otherwise.
Parameters:  graph (tlp.Graph) – the graph on which to perform the simple test 

Return type:  boolean 
Makes the graph simple by removing self loops and parallel edges if any. Returns a list of removed edges.
Parameters:  graph (tlp.Graph) – the graph to make simple 

Return type:  list of tlp.edge 
Performs a simple test and returns a tuple with 3 elements. The first element is a boolean indicating the result of the test. The second element is a list of found parallel edges. The third element is a list of found self loops.
Parameters:  graph (tlp.Graph) – the graph on which to perform the simple test 

Return type:  (boolean, list of tlp.edge, list of tlp.edge) 
Cleans the graph from a tree previously computed with the tlp.TreeTest.computeTree() method.
Parameters: 

Computes a rooted tree from the graph. The algorithm is the following :
Parameters:  graph (tlp.Graph) – the graph on which to compute a rooted tree 

Return type:  tlp.Graph 
Returns True if the graph is a topological tree (i.e. if the graph was undirected, there would be no cycle), False otherwise.
Parameters:  graph (tlp.Graph) – the graph on which to perform the free tree test 

Return type:  boolean 
Returns True if the graph is triconnected (i.e. a connected graph such that deleting any two nodes (and incident edges) results in a graph that is still connected), False otherwise.
Parameters:  graph (tlp.Graph) – the graph on which to perform the triconnected test 

Return type:  boolean 