<reponame>alexshpunt/py_practise<gh_stars>0
from demos.graphs.demo_util import *

import algs.graphs.input_data as graphInput
import algs.graphs.single_linkage_cluster as singleLinkageCluster

def demo_single_linkage_clustering_naive():
    print("Original graph:")
    G = graphInput.ClusterableGraph
    pos = nx.get_node_attributes(G, "pos")
    nx.draw(G, pos, with_labels = True)
    make_plot()

    print("Clusters:")
    T = singleLinkageCluster.get_clusters(G)
    pos = nx.get_node_attributes(T, "pos")
    nx.draw(T, pos, with_labels = True)
    make_plot()

from demos.graphs.demo_util import *

import algs.graphs.input_data as graphInput
import algs.graphs.single_linkage_cluster as singleLinkageCluster

def demo_single_linkage_clustering_naive():
    print("Original graph:")
    G = graphInput.ClusterableGraph
    pos = nx.get_node_attributes(G, "pos")
    nx.draw(G, pos, with_labels = True)
    make_plot()

    print("Clusters:")
    T = singleLinkageCluster.get_clusters(G)
    pos = nx.get_node_attributes(T, "pos")
    nx.draw(T, pos, with_labels = True)
    make_plot()