pyclustering  0.10.1
pyclustring is a Python, C++ data mining library.
pyclustering.utils.graph Namespace Reference

Graph representation (uses format GRPR). More...

Classes

class  graph
 Graph representation. More...
 
class  type_graph_descr
 Enumeration of graph description. More...
 

Functions

def read_graph (filename)
 Read graph from file in GRPR format. More...
 
def draw_graph (graph_instance, map_coloring=None)
 Draw graph. More...
 

Detailed Description

Graph representation (uses format GRPR).

Authors
Andrei Novikov (pyclu.nosp@m.ster.nosp@m.ing@y.nosp@m.ande.nosp@m.x.ru)
Date
2014-2020

Function Documentation

◆ draw_graph()

def pyclustering.utils.graph.draw_graph (   graph_instance,
  map_coloring = None 
)

Draw graph.

Parameters
[in]graph_instance(graph): Graph that should be drawn.
[in]map_coloring(list): List of color indexes for each vertex. Size of this list should be equal to size of graph (number of vertices). If it's not specified (None) than graph without coloring will be dwarn.
Warning
Graph can be represented if there is space representation for it.

Definition at line 212 of file graph.py.

◆ read_graph()

def pyclustering.utils.graph.read_graph (   filename)

Read graph from file in GRPR format.

Parameters
[in]filename(string): Path to file with graph in GRPR format.
Returns
(graph) Graph that is read from file.

Definition at line 118 of file graph.py.