summaryrefslogtreecommitdiff
path: root/matching/tests/test_bifiltration.cpp
diff options
context:
space:
mode:
authorArnur Nigmetov <nigmetov@tugraz.at>2020-03-06 18:29:25 +0100
committerArnur Nigmetov <nigmetov@tugraz.at>2020-03-06 18:29:25 +0100
commit5ebf7142b00554b3f5d151c8b4e81b746962a5b8 (patch)
treefc5306ab414ef803e6bcbe13817e1c1d990b08b5 /matching/tests/test_bifiltration.cpp
parent3809e4071827a5959f27e472514eaed08ba6d15e (diff)
Reorganize matching_dist code, minor fixes.
Diffstat (limited to 'matching/tests/test_bifiltration.cpp')
-rw-r--r--matching/tests/test_bifiltration.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/matching/tests/test_bifiltration.cpp b/matching/tests/test_bifiltration.cpp
new file mode 100644
index 0000000..742dab8
--- /dev/null
+++ b/matching/tests/test_bifiltration.cpp
@@ -0,0 +1,36 @@
+#include "catch/catch.hpp"
+
+#include <sstream>
+#include <iostream>
+
+#include "common_util.h"
+#include "box.h"
+#include "bifiltration.h"
+
+using namespace md;
+
+//TEST_CASE("Small check", "[bifiltration][dim2]")
+//{
+// Bifiltration bif("/home/narn/code/matching_distance/code/src/tests/test_bifiltration_full_triangle_phat_like.txt", BifiltrationFormat::phat_like);
+// auto simplices = bif.simplices();
+// bif.sanity_check();
+//
+// REQUIRE( simplices.size() == 7 );
+//
+// REQUIRE( simplices[0].dim() == 0 );
+// REQUIRE( simplices[1].dim() == 0 );
+// REQUIRE( simplices[2].dim() == 0 );
+// REQUIRE( simplices[3].dim() == 1 );
+// REQUIRE( simplices[4].dim() == 1 );
+// REQUIRE( simplices[5].dim() == 1 );
+// REQUIRE( simplices[6].dim() == 2);
+//
+// REQUIRE( simplices[0].position() == Point(0, 0));
+// REQUIRE( simplices[1].position() == Point(0, 0));
+// REQUIRE( simplices[2].position() == Point(0, 0));
+// REQUIRE( simplices[3].position() == Point(3, 1));
+// REQUIRE( simplices[6].position() == Point(30, 40));
+//
+// Line line_1(Line::pi / 2.0, 0.0);
+// auto dgm = bif.slice_diagram(line_1);
+//}