summaryrefslogtreecommitdiff
path: root/src/tx-intdiff.cpp
blob: cd8ec7ac32e6d73d45b58ae505dbd9b562b37497 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
}