12 #ifndef THRILL_EXAMPLES_TRIANGLES_TRIANGLES_HEADER 13 #define THRILL_EXAMPLES_TRIANGLES_TRIANGLES_HEADER 21 using Edge = std::pair<Node, Node>;
29 size_t operator () (
const Edge& v)
const {
32 seed ^= std::hash<size_t>()(
33 v.first) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
34 seed ^= std::hash<size_t>()(
35 v.second) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
45 template <
bool UseDetection = false,
typename Stack>
52 [](
const Edge& e) {
return e.second; },
53 [](
const Edge& e) {
return e.first; },
55 assert(e1.second == e2.first);
56 return std::make_pair(e1.first, e2.second);
62 edges_length_2, edges,
63 [](
const Edge& e) {
return e; },
64 [](
const Edge& e) {
return e; },
69 return triangles.Size();
75 #endif // !THRILL_EXAMPLES_TRIANGLES_TRIANGLES_HEADER DIA is the interface between the user and the Thrill framework.
std::pair< Node, Node > Edge
auto InnerJoin(const LocationDetectionFlag< LocationDetectionValue > &, const FirstDIA &first_dia, const SecondDIA &second_dia, const KeyExtractor1 &key_extractor1, const KeyExtractor2 &key_extractor2, const JoinFunction &join_function, const HashFunction &hash_function=HashFunction())
Performs an inner join between this DIA and the DIA given in the first parameter. ...
size_t CountTriangles(const DIA< Edge, Stack > &edges)
tag structure for GroupByKey(), and InnerJoin()
HashCrc32< T > hash
Select a hashing method.