12#ifndef MCRL2_UTILITIES_DETAIL_JOIN_H
13#define MCRL2_UTILITIES_DETAIL_JOIN_H
33template <
typename T,
typename OutputIterator,
typename MatchFunction,
typename AccessorFunction1,
typename AccessorFunction2>
34void split(
const T& t, OutputIterator i, MatchFunction match, AccessorFunction1 lhs, AccessorFunction2 rhs)
38 split(lhs(t), i, match, lhs, rhs);
39 split(rhs(t), i, match, lhs, rhs);
54template <
typename T,
typename FwdIt,
typename BinaryOperation>
55T
join(FwdIt first, FwdIt last, BinaryOperation op, T empty_sequence_result)
59 return empty_sequence_result;
64 result = op(result, *first++);
75template <
typename T,
typename RndIt,
typename BinaryOperation>
78 auto n = std::distance(first, last);
85 return op(*first, *(first + 1));
88 auto left = join_balanced<T, RndIt, BinaryOperation>(first, first + d, op);
89 auto right = join_balanced<T, RndIt, BinaryOperation>(first + d, last, op);
90 return op(left, right);
T join(FwdIt first, FwdIt last, BinaryOperation op, T empty_sequence_result)
Given a sequence [t1, t2, ..., tn] of elements of type T, returns op(t1, op(t2, .....
T join_balanced(RndIt first, RndIt last, BinaryOperation op)
Given a non-empty sequence [t1, t2, ..., tn] of elements of type T, returns op(op(t1,...
void split(const T &t, OutputIterator i, MatchFunction match, AccessorFunction1 lhs, AccessorFunction2 rhs)
Splits a binary tree T into a sequence, and writes the result to the output range given by an output ...
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...