diff --git a/.cproject b/.cproject
index 6ef68f8f2..55ad7b743 100644
--- a/.cproject
+++ b/.cproject
@@ -317,7 +317,6 @@
make
-
clean
true
true
@@ -477,6 +476,7 @@
make
+
testBayesTree.run
true
false
@@ -484,7 +484,6 @@
make
-
testSymbolicBayesNet.run
true
false
@@ -492,6 +491,7 @@
make
+
testSymbolicFactorGraph.run
true
false
@@ -683,6 +683,7 @@
make
+
testGraph.run
true
false
@@ -738,7 +739,6 @@
make
-
testSimulated2D.run
true
false
@@ -786,11 +786,20 @@
make
+
testErrors.run
true
false
true
+
+make
+
+testDSF.run
+true
+true
+true
+
make
-j2
diff --git a/cpp/BTree.h b/cpp/BTree.h
index 862501bcd..24f45a1af 100644
--- a/cpp/BTree.h
+++ b/cpp/BTree.h
@@ -224,7 +224,8 @@ namespace gtsam {
else if (key < k) node = node->right.root_.get();
else /* (key() == k) */ return node->value();
}
- throw std::invalid_argument("BTree::find: key '" + (std::string) k + "' not found");
+ //throw std::invalid_argument("BTree::find: key '" + (std::string) k + "' not found");
+ throw std::invalid_argument("BTree::find: key not found");
}
/** print in-order */
diff --git a/cpp/DSF.h b/cpp/DSF.h
new file mode 100644
index 000000000..7d8c2e9f1
--- /dev/null
+++ b/cpp/DSF.h
@@ -0,0 +1,134 @@
+/*
+ * DSF.h
+ *
+ * Created on: Mar 26, 2010
+ * Author: nikai
+ * Description: An implementation of Disjoint set forests (see CLR page 446 and up)
+ * Quoting from CLR: A disjoint-set data structure maintains a collection
+ * S = {S_1,S_2,...} of disjoint dynamic sets. Each set is identified by
+ * a representative, which is some member of the set.
+ */
+
+#pragma once
+
+#include
+#include
+#include