linchemin.cgu.iron.Iron¶
- class linchemin.cgu.iron.Iron[source]¶
Class representing a graph in the Internal Representation Of Networks (IRON) format.
Attributes:¶
nodes: a dictionary storing the nodes of the graph
edges: a dictionary storing the edges of the graph
name: a string representing the name of the graph
- __init__()[source]¶
Parameters:¶
None. When a new Iron instance is created, an empty graph is initialized. It can be populated by adding nodes and edges.
Methods
__init__()Parameters: None. When a new Iron instance is created, an empty graph is initialized. It can be populated by adding nodes and edges.
add_edge(k, edge)To add an edge to an Iron instance.
add_node(k, node)To add a node to an Iron instance.
get_child_nodes(b_iid)To get the list of 'child' nodes of a given node
get_degree_sequence()To get the degree sequence of an Iron instance.
get_edge_id(a, b)To get the list of edge ids connecting the nodes a and b (direction ignored)
get_neighbors(a)To get the list of nodes sharing an edge with a given node
get_parent_nodes(a_iid)To get the list of 'parent' nodes of a given node
i_edge_number()To get the number of edges in an Iron instance
i_node_number()To get the number of nodes in an Iron instance