Beispiel #1
0
def test_k_core():
    property_graph = PropertyGraph(
        get_input("propertygraphs/rmat10_symmetric"))

    k_core(property_graph, 10, "output")

    stats = KCoreStatistics(property_graph, 10, "output")

    assert stats.number_of_nodes_in_kcore == 438

    k_core_assert_valid(property_graph, 10, "output")
Beispiel #2
0
def run_kcore(property_graph: PropertyGraph, _input_args):
    property_name = "NewProp"
    k = 10

    with time_block("k-core"):
        analytics.k_core(property_graph, k, property_name)

    check_schema(property_graph, property_name)

    analytics.k_core_assert_valid(property_graph, k, property_name)

    stats = analytics.KCoreStatistics(property_graph, k, property_name)
    print(f"STATS:\n{stats}")
    property_graph.remove_node_property(property_name)