Ignore:
Timestamp:
03/22/11 17:32:08 (3 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
cec8f1027aa94c7dd7196ec97517bb4ac959054e
Message:

Call new underscore case functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/doc/Orange/rst/code/network-graph-analysis.py

    r7768 r7771  
    99net = Orange.network.Network.read("combination.net") 
    1010 
    11 components = net.getConnectedComponents() 
     11components = net.get_connected_components() 
    1212print "Connected components" 
    1313print components 
    1414print 
    1515 
    16 distribution = net.getDegreeDistribution() 
     16distribution = net.get_degree_distribution() 
    1717print "Degree distribution" 
    1818print distribution 
    1919print 
    2020 
    21 degrees = net.getDegrees() 
     21degrees = net.get_degrees() 
    2222print "Degrees" 
    2323print degrees 
    2424print 
    2525 
    26 hubs = net.getHubs(3) 
     26hubs = net.get_hubs(3) 
    2727print "Hubs" 
    2828print hubs 
    2929print 
    3030 
    31 path = net.getShortestPaths(0, 2) 
     31path = net.get_shortest_paths(0, 2) 
    3232print "Shortest path" 
    3333print path 
    3434print 
    3535 
    36 distance = net.getDistance(0, 2) 
     36distance = net.get_distance(0, 2) 
    3737print "Distance" 
    3838print distance 
    3939print 
    4040 
    41 diameter = net.getDiameter() 
     41diameter = net.get_diameter() 
    4242print "Diameter" 
    4343print diameter 
    4444print 
    4545 
    46 subnet = Orange.network.Network(net.getSubGraph([0, 1, 2, 3])) 
     46subnet = Orange.network.Network(net.get_sub_graph([0, 1, 2, 3])) 
    4747subNetOptimization = Orange.network.NetworkOptimization(subnet) 
    48 subNetOptimization.fruchtermanReingold(100, 1000) 
     48subNetOptimization.fruchterman_reingold(100, 1000) 
    4949 
    5050# read all edges in subnetwork and plot a line 
Note: See TracChangeset for help on using the changeset viewer.