dodiscover.EquivalenceClass#

class dodiscover.EquivalenceClass(*args, **kwargs)[source]#

Protocol for equivalence class of graphs.

Attributes:
bidirected_edge_name

Name of the bidirected edges.

circle_edge_name

Name of the circle edge endpoints.

directed_edge_name

Name of the directed edges.

excluded_triples

A set of triples that are excluded from orientation.

nodes

Return an iterable over nodes in graph.

undirected_edge_name

Name of the undirected edges.

Methods

add_edge(u, v[, edge_type])

Add an edge to the graph.

add_node(node_for_adding, **attr)

Add a node to the graph.

copy()

Create a copy of the graph.

edges([data])

Return an iterable over edge tuples in graph.

has_edge(u, v[, edge_type])

Check if graph has an edge for a specific edge type.

mark_unfaithful_triple(v_i, u, v_j)

Mark a triple as unfaithful, and put it in the excluded triple set.

neighbors(node)

Iterate over all nodes that have any edge connection with 'node'.

orient_uncertain_edge(u, v)

Orients an uncertain edge in the equivalence class to directed 'u'*->'v'.

predecessors(node)

Nodes with directed edges pointing to 'node'.

remove_edge(u, v[, edge_type])

Remove an edge from the graph.

remove_edges_from(edges)

Remove a set of edges from the graph.

remove_node(u)

Remove a node from the graph.

subgraph(nodes)

Get subgraph based on nodes.

successors(node)

Nodes with directed edges pointing from 'node'.

to_undirected()

Convert a graph to a fully undirected networkx graph.

add_edge(u, v, edge_type='all')#

Add an edge to the graph.

add_node(node_for_adding, **attr)#

Add a node to the graph.

property bidirected_edge_name#

Name of the bidirected edges.

property circle_edge_name#

Name of the circle edge endpoints.

copy()#

Create a copy of the graph.

property directed_edge_name#

Name of the directed edges.

edges(data=None)#

Return an iterable over edge tuples in graph.

property excluded_triples#

A set of triples that are excluded from orientation.

has_edge(u, v, edge_type='any')#

Check if graph has an edge for a specific edge type.

mark_unfaithful_triple(v_i, u, v_j)[source]#

Mark a triple as unfaithful, and put it in the excluded triple set.

neighbors(node)#

Iterate over all nodes that have any edge connection with ‘node’.

property nodes#

Return an iterable over nodes in graph.

orient_uncertain_edge(u, v)[source]#

Orients an uncertain edge in the equivalence class to directed 'u'*->'v'.

predecessors(node)[source]#

Nodes with directed edges pointing to ‘node’.

remove_edge(u, v, edge_type='all')#

Remove an edge from the graph.

remove_edges_from(edges)#

Remove a set of edges from the graph.

remove_node(u)#

Remove a node from the graph.

subgraph(nodes)#

Get subgraph based on nodes.

successors(node)[source]#

Nodes with directed edges pointing from ‘node’.

to_undirected()#

Convert a graph to a fully undirected networkx graph.

All nodes are connected by an undirected edge if there are any edges between the two.

property undirected_edge_name#

Name of the undirected edges.