This module provide an implementation of a dataflow
Bases: exceptions.Exception
Bases: openalea.core.graph.property_graph.PropertyGraph
Directed graph with connections between in_ports of vertices and out_port of vertices ports are typed
create a vertex and the corresponding ports and associate it with the given actor return: vid
add a new in port to vertex pid using local_pid use pid as global port id if specified or create a new one if None raise an error if pid is already used
Returns: | pid used |
---|---|
Return type: | pid |
add a new out port to vertex pid using local_pid use pid as global port id if specified or create a new one if None raise an error if pid is already used
Returns: | pid used |
---|---|
Return type: | pid |
add a vertex to the graph, if vid is not provided create a new vid
Parameters: | vid (vid) -- the id of the vertex to add, default=None |
---|---|
Returns: | the id of the created vertex |
Return type: | vid |
connect the out port source_pid with the in_port target_pid use eid if not None or create a new one raise an error if eid is already used
Returns: | eid used |
---|---|
Return type: | eid |
Return an iterator of vextex id corresponding to all the parent node of vid
iter on all in ports of a given vertex iter on all in ports of the dataflow if vid is None
Return type: | iter of pid |
---|
test whether port refered by pid is an out port of its vertex :rtype: bool
Compute number of edges connected to a given port.
iter on all out ports of a given vertex iter on all out ports of the dataflow if vid is None
Parameters: | vid -- todo |
---|---|
Return type: | iter of pid |
iter on all ports of a given vertex iter on all ports of the dataflow if vid is None
Return type: | iter of pid |
---|
remove a specified vertex of the graph remove all the edges attached to it
Parameters: | vid (vid) -- the id of the vertex to remove |
---|
out port of the source vertex of the edge
Parameters: | eid -- todo |
---|---|
Return type: | pid |