()
| 90 | |
| 91 | |
| 92 | def test_link(): |
| 93 | pos1 = 1, 1 |
| 94 | idx1 = 0 |
| 95 | pos2 = 10, 10 |
| 96 | idx2 = 1 |
| 97 | conf = 0.5 |
| 98 | j1 = inferenceutils.Joint(pos1, conf, idx=idx1) |
| 99 | j2 = inferenceutils.Joint(pos2, conf, idx=idx2) |
| 100 | link = inferenceutils.Link(j1, j2) |
| 101 | assert link.confidence == conf**2 |
| 102 | assert link.idx == (idx1, idx2) |
| 103 | assert link.to_vector() == [*pos1, *pos2] |
| 104 | |
| 105 | |
| 106 | def test_assembly(): |