source: orange/Orange/doc/reference/pf_progress.py @ 11012:19029caa4a32

Revision 11012:19029caa4a32, 463 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 18 months ago (diff)

Fixed more network references.

Line 
1import Orange
2from orangeom import Pathfinder
3
4def myCb(complete):
5    """
6    The callback function.
7    """
8    print 'The procedure is %d%% complete.' % int(complete * 100)
9
10# Read a demo network from a file
11net = Orange.core.Network.read('demo.net')
12
13# Choose some parameters
14r, q = 1, 6
15
16# Create a pathfinder instance
17pf = Pathfinder()
18
19# Pass the reference to the desired function
20pf.setProgressCallback(myCb)
21
22# Simplify the network
23pf.simplify(r, q, net)
Note: See TracBrowser for help on using the repository browser.