xgi.convert.hif_dict#
Methods for converting to/from HIF standard.
Functions
- to_hif_dict(H)[source]#
A function to create a dictionary according to the HIF standard from a higher-order network.
For more information, see the HIF project.
- Parameters:
H (Hypergraph, DiHypergraph, or SimplicialComplex object) – The specified higher-order network
- Returns:
A dict according to the HIF standard.
- Return type:
defaultdict
- from_hif_dict(data, nodetype=None, edgetype=None)[source]#
A function to read a dictionary that follows the HIF standard.
For more information, see the HIF project.
- Parameters:
data (dict) – A dictionary in the hypergraph JSON format
nodetype (type, optional) – Type that the node IDs will be cast to
edgetype (type, optional) – Type that the edge IDs will be cast to
- Returns:
The loaded network
- Return type:
A Hypergraph, SimplicialComplex, or DiHypergraph object