DynamicMetaNetwork — dynetml2other 0.1 documentation

# DynamicMetaNetwork

class `DynamicMetaNetwork.` `DynamicMetaNetwork`(network_format='dict')

  The DynamicMetaNetwork class is a container for dynamic meta-networks extracted from DyNetML. It bundles together a set of Meta-Networks collected at different times.

  Variables: | __network_format – the format in which the networks should be stored:”dict”, “igraph” or “networkx”. It cannot be changed after initialization. attributes – A dictionary of attributes associated with the dynamic network metanetworks – The list of the Meta-Networks associated with the dynamic meta-network.

  `convert_to_dynetml`()

    Return the dynamic meta-network as an `lxml._Element`

  `drop_metanetworks_after`(end_date)

    Parameters: | end_date (datetime.datetime) – Drop meta-networks that occur after this datetime.

  `drop_metanetworks_before`(start_date)

    Parameters: | start_date (datetime.datetime) – Drop meta-networks that occur before this datetime.

  `drop_metanetworks_for_ranges`(range_tuples, keep_in_range=True)

    Parameters: | range_tuples (list) – A list of tuples containing of a start date and end date pair keep_in_range (list) – If true, dates outside of any tuple are dropped. If false, dates within any tuple are dropped.

  `get_network_format`()

    Returns the network format

  `load_from_dynetml`(dmn_text, properties_to_include=None, properties_to_ignore=None, nodeclasses_to_include=None, nodeclasses_to_ignore=None, networks_to_include=None, networks_to_ignore=None, start_date=None, end_date=None)

    Parses and loads the contents of an XML containing a dynamic meta-network

    Parameters: | dmn_text (str|unicode) – XML containing a dynamic meta-network properties_to_include (list) – a list of nodeclass properties that should be included properties_to_ignore (list) – a list of nodeclass properties that should be ignored nodeclasses_to_include (list) – a list of nodeclasses that should be included nodeclasses_to_ignore (list) – a list of nodeclasses that should be ignored networks_to_include (list) – a list of networks that should be included networks_to_ignore (list) – a list of networks that should be ignored start_date (datetime.datetime) – Meta-Networks from before this datetime should not be imported end_date (datetime.datetime) – MetaNetworks from after this datetime should not be imported

  `load_from_tag`(dmn_tag, properties_to_include=None, properties_to_ignore=None, nodeclasses_to_include=None, nodeclasses_to_ignore=None, networks_to_include=None, networks_to_ignore=None, start_date=None, end_date=None)

    Parses and loads the contents of an `lxml._Element` containing a dynamic meta-network

    Parameters: | dmn_tag (lxml._Element) – A tag containing a dynamic meta-network properties_to_include (list) – a list of nodeclass properties that should be included properties_to_ignore (list) – a list of nodeclass properties that should be ignored nodeclasses_to_include (list) – a list of nodeclasses that should be included nodeclasses_to_ignore (list) – a list of nodeclasses that should be ignored networks_to_include (list) – a list of networks that should be included networks_to_ignore (list) – a list of networks that should be ignored start_date (datetime.datetime) – MetaNetworks from before this datetime should not be imported end_date (datetime.datetime) – MetaNetworks from after this datetime should not be imported

  `pretty_print`()

    Pretty-print the dynamic meta-network

  `write_dynetml`(out_file_path)

    Parameters: | out_file_path (str|unicode) – Write the dynamic meta-network to this path.