source: orange/Orange/network/__init__.py @ 9994:1073e0304a87

Revision 9994:1073e0304a87, 1.6 KB checked in by Matija Polajnar <matija.polajnar@…>, 2 years ago (diff)

Remove links from documentation to datasets. Remove datasets reference directory.

Line 
1"""
2
3*************************
4Network classes in Orange
5*************************
6
7Orange network classes are derived from `NetworkX basic graph types <http://networkx.lanl.gov/reference/classes.html>`_
8and :obj:`Orange.network.BaseGraph`. They provide data structures and methods
9for storing graphs, network analysis and layout optimization.
10
11There are four graph types: :obj:`Orange.network.Graph`,
12:obj:`Orange.network.DiGraph`, :obj:`Orange.network.MultiGraph` and
13:obj:`Orange.network.MultiDiGraph`. The choice of graph class depends on the
14structure of the graph you want to represent.
15
16Examples
17========
18
19Reading and writing a network
20-----------------------------
21
22This example demonstrates reading a network. Network class can read or write
23Pajek (.net) or GML file format.
24
25:download:`network-read-nx.py <code/network-read-nx.py>`:
26
27.. literalinclude:: code/network-read.py
28    :lines: 5-6
29   
30Visualize a network in NetExplorer widget
31-----------------------------------------
32
33This example demonstrates how to display a network in NetExplorer.
34
35part of :download:`network-widget.py <code/network-widget.py>`
36
37.. literalinclude:: code/network-widget.py
38    :lines: 10-16
39   
40.. image:: files/network-explorer.png
41    :width: 100%
42
43"""
44
45import math
46import random
47import os
48
49import Orange.core
50import Orange.data
51import Orange.projection
52
53from Orange.core import GraphAsList, GraphAsMatrix, GraphAsTree
54
55try:
56    from network import *
57except ImportError:
58    import warnings
59    warnings.warn("Warning: some features are disabled. Install networkx to use the 'Orange.network' module.") 
60
61import community
62import snap
63
64from deprecated import *
Note: See TracBrowser for help on using the repository browser.