Exemple #1
0
h[6] = "six"
h[1] = "one"

print h.Len()

print "h[3] =", h[3]

h[3] = "four"
print "h[3] =", h[3]

for key in h:
    print key, h[key]

print "----- pair ----- "

p = snap.TIntStrPr(1, "one")

print p.GetVal1()
print p.GetVal2()

print "----- graphs ----- "

G1 = snap.TUNGraph.New()
G2 = snap.TNGraph.New()
N1 = snap.TNEANet.New()

G1.AddNode(1)
G1.AddNode(5)
G1.AddNode(32)

G1.AddEdge(1, 5)
Exemple #2
0
import snap

p = snap.TIntStrPr(1, 'one')  # Create a new pair

print p.GetVal1()  # Get values
print p.GetVal2()