Given the output of RootedGraph.get_dendrite() as 'dendritem', it returns the less and the most differentiated nodes (used internally).
(self, dendritem)
| 1471 | return dendrite |
| 1472 | |
| 1473 | def find_root(self, dendritem): |
| 1474 | """ |
| 1475 | Given the output of RootedGraph.get_dendrite() as 'dendritem', it returns the less and the most differentiated |
| 1476 | nodes (used internally). |
| 1477 | """ |
| 1478 | q = 1000.0 |
| 1479 | q2 = -1000.0 |
| 1480 | ind = 0 |
| 1481 | ind2 = 0 |
| 1482 | for n in dendritem.keys(): |
| 1483 | if -2.0 < dendritem[n] < q: |
| 1484 | q = dendritem[n] |
| 1485 | ind = n |
| 1486 | if dendritem[n] > q2 and dendritem[n] > -2.0: |
| 1487 | q2 = dendritem[n] |
| 1488 | ind2 = n |
| 1489 | return ind, ind2 |
| 1490 | |
| 1491 | def dendritic_graph(self): |
| 1492 | """ |