def get_sample_configuration():
    hypothgraph = sample_graphs.sample_hypothgraph()
    source, target = hypoth_conf.generate_rich_endpoints(hypothgraph)

    subgraph = sub_hypothgraph.generate_sub_hypothgraph(
        hypothgraph, source, target)

    return hypothgraph, subgraph, source, target
def sample_big_and_small(ratio_endpoints_paths=0.5,
                         ratio_on_boundary_paths=0.5):
    big = sample_graphs.sample_hypothgraph()
    source, target = hypoth_conf.generate_rich_endpoints(big, min_nb_paths=5)

    small = sub_hypothgraph.generate_sub_hypothgraph(
        big,
        source,
        target,
        ratio_endpoints_paths=ratio_endpoints_paths,
        ratio_on_boundary_paths=ratio_on_boundary_paths,
        data=True)

    return big, small, source, target
Пример #3
0
def get_sample_hypothgraph_and_configurations():
    hypothgraph = sample_graphs.sample_hypothgraph()

    source, target = hypoth_conf.generate_rich_endpoints(hypothgraph)

    partial_nodes = list(
        boundary.partial_nodes_boundary_interior(hypothgraph, source, target))
    full_nodes = list(
        boundary.in_boundary_interior(hypothgraph, source, target))

    nothing = Hypoth_Conf(source=source, target=target, evidenced_nodes=[])
    partial = Hypoth_Conf(source=source,
                          target=target,
                          evidenced_nodes=partial_nodes)
    full = Hypoth_Conf(source=source,
                       target=target,
                       evidenced_nodes=full_nodes)

    return {
        'hypothgraph': hypothgraph,
        'nothing': nothing,
        'partial_within': partial,
        'full_within': full
    }
def get_sample_hypothgraph():
    return sample_graphs.sample_hypothgraph()