26 #ifndef CRYPTO3_ACCUMULATORS_PUBKEY_SSS_DEAL_SHARE_HPP
27 #define CRYPTO3_ACCUMULATORS_PUBKEY_SSS_DEAL_SHARE_HPP
34 #include <boost/concept_check.hpp>
36 #include <boost/accumulators/framework/accumulator_base.hpp>
37 #include <boost/accumulators/framework/parameters/sample.hpp>
49 namespace accumulators {
51 template<
typename ProcessingMode,
typename =
void>
54 template<
typename ProcessingMode>
57 typedef typename processing_mode_type::scheme_type
scheme_type;
58 typedef typename processing_mode_type::op_type
op_type;
62 typedef typename processing_mode_type::result_type
result_type;
67 template<
typename Args>
69 processing_mode_type::init_accumulator(acc, args[boost::accumulators::sample]);
73 return processing_mode_type::process(acc);
80 template<
typename Args>
82 resolve_type(args[boost::accumulators::sample],
83 args[::nil::crypto3::accumulators::iterator_last |
nullptr]);
88 processing_mode_type::update(acc, share);
91 template<
typename InputRange>
92 inline void resolve_type(
const InputRange &range, std::nullptr_t) {
93 for (
const auto &s : range) {
98 template<
typename InputIterator>
99 inline void resolve_type(InputIterator first, InputIterator last) {
100 for (
auto it = first; it != last; it++) {
110 template<
typename ProcessingMode>
117 typedef boost::mpl::always<accumulators::impl::deal_share_impl<mode_type>>
impl;
122 template<
typename ProcessingMode,
typename AccumulatorSet>
123 typename boost::mpl::apply<AccumulatorSet, tag::deal_share<ProcessingMode>>::type::result_type
125 return boost::accumulators::extract_result<tag::deal_share<ProcessingMode>>(acc);
internal_accumulator_type acc
Definition: accumulators/deal_share.hpp:105
void operator()(const Args &args)
Definition: accumulators/deal_share.hpp:81
processing_mode_type::internal_accumulator_type internal_accumulator_type
Definition: accumulators/deal_share.hpp:59
void resolve_type(const share_sss< scheme_type > &share, std::nullptr_t=nullptr)
Definition: accumulators/deal_share.hpp:87
void resolve_type(InputIterator first, InputIterator last)
Definition: accumulators/deal_share.hpp:99
result_type result(boost::accumulators::dont_care) const
Definition: accumulators/deal_share.hpp:72
void resolve_type(const InputRange &range, std::nullptr_t)
Definition: accumulators/deal_share.hpp:92
deal_share_impl(const Args &args)
Definition: accumulators/deal_share.hpp:68
processing_mode_type::op_type op_type
Definition: accumulators/deal_share.hpp:58
ProcessingMode processing_mode_type
Definition: accumulators/deal_share.hpp:56
processing_mode_type::result_type result_type
Definition: accumulators/deal_share.hpp:62
processing_mode_type::scheme_type scheme_type
Definition: accumulators/deal_share.hpp:57
Definition: accumulators/deal_share.hpp:52
Definition: accumulators/deal_share.hpp:111
boost::mpl::always< accumulators::impl::deal_share_impl< mode_type > > impl
Definition: accumulators/deal_share.hpp:117
ProcessingMode mode_type
Definition: accumulators/deal_share.hpp:112
Definition: share_sss.hpp:35