# MST Test Page

```1 from numpy import *
2 from iaOPF import *
3
4 #Instancia um objeto de testes
5 objTestes_inf = PerfTest()
```

# List of test values

``` 1 from courseIA368Q1S2012.rob_biblio2 import randGraph
2
3 #Initialize an empty test list vector:
4 listT_inf = []
5
6 #Grafo simples
7 a = array([[Inf,1.,1.,0.,8.],
8            [1.,Inf,2.,5.,7.],
9            [1.,2.,Inf,6.,9.],
10            [0.,5.,6.,Inf,10.],
11            [8.,7.,9.,10.,Inf]])
12 listT_inf.append(['A simple', a])
13
14 #Grafo aleatório 6x6
15 random.seed(0)
16 A = random.random_integers(0,10,(6,6))
17 A =array(A,dtype = float)
18 i = range(0,6)
19 A[i,i] = float('inf')
20 A = maximum(A,A.transpose())
21 test_1 = ['A: rand(6,6)', A]
22 listT_inf.append(test_1)
23
24 #Grafo completo com 100 nós
25 random.seed(0)
26 temp = randGraph(100,1,'yes')
27 test_2 = ['100 nodes, complete', temp]
28 listT_inf.append(test_2)
29
30
31 #Grafo intermediário com 100 nós
32 random.seed(0)
33 temp3 = randGraph(100,0.5,'yes')
34 test_3 = ['100 nodes, 0.5', temp3]
35 listT_inf.append(test_3)
36
37
38 # Grafo que é uma MST
39 temp5 = array([[inf,inf,10,inf,inf,inf,inf,inf,inf,inf],[inf,inf,13,11,inf,inf,inf,inf,inf,inf],[10, 13, inf, inf, 12, inf,inf, inf, inf, inf],[inf, 11,inf,inf,inf,inf,inf,15,inf,inf],
40            [inf, inf,12,inf,inf,inf,inf,inf,inf,inf],[inf,inf,inf,inf,inf,inf,inf,20,inf,inf],[inf,inf,inf,inf,inf,inf,inf,14,11,33],
41            [inf,inf,inf,15,inf,20,14,inf,inf,inf],[inf,inf,inf,inf,inf,inf,11,inf,inf,inf],[inf,inf,inf,inf,inf,inf,33,inf,inf,inf]])
42 test_4 = ['Grafo MST',temp5]
43 listT_inf.append(test_4)
44 print type(temp5[0,0])
45
46 #Testes debug
47 random.seed(0)
48 debug_1 = randGraph(10,1,'yes')
49 teste_deb = ['10 nodes, complete', debug_1]
50 #listT.append(teste_deb)
51
```

# Pages to get tests from

A list of namespaces + pages to get the tests results from

``` 1 #List of namespaces + pages
2 listPaginas = []
3 listPaginas.append(['iaOPF', 'iamstk_rob'])
4 listPaginas.append(['iaOPF', 'iamstk_fra'])
5 listPaginas.append(['iaOPF', 'iamstk_wes'])
6 listPaginas.append(['iaOPF', 'iamstk_fer'])
7 listPaginas.append(['iaOPF', 'iaprim'])
8 listPaginas.append(['iaOPF', 'iamstb_and'])
9 listPaginas.append(['iaOPF', 'iamstk_and'])
10 listPaginas.append(['iaOPF', 'iamstp_and'])
11 listPaginas.append(['iaOPF', 'iamstk_thi'])
12 listPaginas.append(['iaOPF', 'iamstk_tia'])
```

# Tests Summary

<type 'numpy.float64'>

Autor Funcao A simple   A: rand(6,6)   100 nodes, complete   100 nodes, 0.5   Grafo MST
Roberto iamstk_rob 0.222 ms 9.0 0.167 ms 21.0 18.374 ms 318.055294457 10.175 ms 624.679654926 0.205 ms 139.0
Francisco iamstk_fra 0.352 ms 9.0 0.36 ms 21.0 46.726 ms 318.055294457 22.973 ms 624.679654926 0.394 ms 139.0
Wesley iamstk_wes 0.375 ms 9.0 0.239 ms 21.0 3.864 ms 318.055294457 3.569 ms 624.679654926 0.296 ms 139.0
Fernanda iamstk_fer 1.561 ms 9.0 2.288 ms 21.0 126.642 ms 318.055294457 77.431 ms 624.679654926 0.543 ms 139.0
iaprim iaprim 0.334 ms 9.0 0.371 ms 21.0 7.775 ms 318.055294457 7.589 ms 624.679654926 0.583 ms 139.0
Andre iamstb_and 0.304 ms 9.0 0.447 ms 21.0 11.756 ms 318.055294457 9.452 ms 624.679654926 0.623 ms 139.0
Andre iamstk_and 0.169 ms 9.0 0.156 ms 21.0 2.874 ms 318.055294457 2.446 ms 624.679654926 0.211 ms 139.0
Andre iamstp_and 0.223 ms 9.0 0.263 ms 21.0 16.45 ms 318.055294457 9.583 ms 624.679654926 0.325 ms 139.0
Thiago iamstk_thi 0.237 ms 14.0 0.257 ms 21.0 52.639 ms 318.055294457 58.411 ms 8153.94473627 0.781 ms 61.0
Tiago iamstk_tia 0.445 ms 14.0 1.315 ms 21.0 97.309 ms 318.055294457 61.992 ms 624.679654926 0.445 ms 139.0