summaryrefslogtreecommitdiff
path: root/src/tx-intdiff.cpp
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2023-02-10 15:27:06 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2023-02-10 15:27:06 +0100
commit7501bff8432444b7ae8e7f3d9289c0d61f3f0b64 (patch)
treebd53603f464c3747e897a8996158a0fef7b41bc3 /src/tx-intdiff.cpp
parent0f124df68d87c9073f76efeff1a901a69b1f3e13 (diff)
parent9e9336185f86bd97ff22f54e4d561c2cccccecf5 (diff)
Merge branch 'release/debian/4.10-1'debian/4.10-1
Diffstat (limited to 'src/tx-intdiff.cpp')
-rw-r--r--src/tx-intdiff.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/tx-intdiff.cpp b/src/tx-intdiff.cpp
new file mode 100644
index 0000000..cd8ec7a
--- /dev/null
+++ b/src/tx-intdiff.cpp
@@ -0,0 +1,24 @@
+#include <cstdio>
+#include <iterator>
+#include <vector>
+#include <libHX/intdiff.hpp>
+int main()
+{
+ std::vector<int> a{1, 2, 5};
+ std::vector<long> b{2, 3, 4, 5};
+ std::vector<float> comm, left, right;
+
+ HX::set_intersect_diff(a.cbegin(), a.cend(), b.cbegin(), b.cend(),
+ std::back_inserter(comm), std::back_inserter(left),
+ std::back_inserter(right));
+ for (auto e : comm)
+ printf("%f,", e);
+ printf("\n");
+ for (auto e : left)
+ printf("%f,", e);
+ printf("\n");
+ for (auto e : right)
+ printf("%f,", e);
+ printf("\n");
+ return 0;
+}