summaryrefslogtreecommitdiff
path: root/matching/tests/test_bifiltration.cpp
diff options
context:
space:
mode:
authorArnur Nigmetov <nigmetov@tugraz.at>2020-03-09 16:43:07 +0100
committerArnur Nigmetov <nigmetov@tugraz.at>2020-03-09 16:43:07 +0100
commitca4222ab40f1c6c0d17fb7d43539aa675f640976 (patch)
treee2a91037ac1d9e8895eafbab54c1c11f0b257c85 /matching/tests/test_bifiltration.cpp
parent7fb44351b487c64f23066a428089ef14a95b4176 (diff)
parent14e91d6c3ad81a1ec763d75a28f20fb689e5166e (diff)
Merge README
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);
+//}