2 GTSAM Copyright 2010-2019, Georgia Tech Research Corporation, 3 Atlanta, Georgia 30332-0415 6 See LICENSE for the license information 8 Unit tests for Disjoint Set Forest. 9 Author: Frank Dellaert & Varun Agrawal 13 from __future__
import print_function
22 """Tests for DSFMap.""" 25 """Test everything in DFSMap.""" 27 return index_pair.i(), index_pair.j()
31 self.assertEqual(
key(dsf.find(pair1)),
key(pair1))
35 dsf.merge(pair1, pair2)
36 self.assertEqual(
key(dsf.find(pair1)),
key(dsf.find(pair2)))
39 from gtsam
import IndexPair
41 dsf.merge(IndexPair(0, 1), IndexPair(1,2))
42 dsf.merge(IndexPair(0, 1), IndexPair(3,4))
43 dsf.merge(IndexPair(4,5), IndexPair(6,8))
53 if __name__ ==
'__main__':
IndexPairVector IndexPairSetAsArray(IndexPairSet &set)
Small utility class for representing a wrappable pairs of ints.