26 #ifndef CRYPTO3_ACCUMULATORS_PUBKEY_SSS_VERIFY_SHARE_HPP
27 #define CRYPTO3_ACCUMULATORS_PUBKEY_SSS_VERIFY_SHARE_HPP
34 #include <boost/concept_check.hpp>
36 #include <boost/accumulators/framework/accumulator_base.hpp>
37 #include <boost/accumulators/framework/parameters/sample.hpp>
48 namespace accumulators {
50 template<
typename ProcessingMode,
typename =
void>
53 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 verified_public_share(args[boost::accumulators::sample]), seen_coeffs(0) {
72 auto i = verified_public_share.get_index();
73 processing_mode_type::init_accumulator(acc, i);
80 template<
typename Args>
82 resolve_type(args[boost::accumulators::sample],
83 args[::nil::crypto3::accumulators::iterator_last |
nullptr]);
87 return processing_mode_type::process(acc, verified_public_share);
91 inline void resolve_type(
const typename scheme_type::public_coeff_type &public_coeff,
92 std::nullptr_t =
nullptr) {
93 processing_mode_type::update(acc, seen_coeffs, public_coeff);
97 template<
typename InputRange>
98 inline void resolve_type(
const InputRange &range, std::nullptr_t) {
99 for (
const auto &pc : range) {
104 template<
typename InputIterator>
106 for (
auto it = first; it != last; it++) {
118 template<
typename ProcessingMode>
125 typedef boost::mpl::always<accumulators::impl::verify_share_impl<mode_type>>
impl;
130 template<
typename ProcessingMode,
typename AccumulatorSet>
131 typename boost::mpl::apply<AccumulatorSet, tag::verify_share<ProcessingMode>>::type::result_type
133 return boost::accumulators::extract_result<tag::verify_share<ProcessingMode>>(acc);
result_type result(boost::accumulators::dont_care) const
Definition: accumulators/verify_share.hpp:86
void resolve_type(InputIterator first, InputIterator last)
Definition: accumulators/verify_share.hpp:105
void resolve_type(const InputRange &range, std::nullptr_t)
Definition: accumulators/verify_share.hpp:98
internal_accumulator_type acc
Definition: accumulators/verify_share.hpp:113
std::size_t seen_coeffs
Definition: accumulators/verify_share.hpp:111
verify_share_impl(const Args &args)
Definition: accumulators/verify_share.hpp:68
processing_mode_type::scheme_type scheme_type
Definition: accumulators/verify_share.hpp:57
processing_mode_type::op_type op_type
Definition: accumulators/verify_share.hpp:58
void resolve_type(const typename scheme_type::public_coeff_type &public_coeff, std::nullptr_t=nullptr)
Definition: accumulators/verify_share.hpp:91
public_share_sss< scheme_type > verified_public_share
Definition: accumulators/verify_share.hpp:112
processing_mode_type::result_type result_type
Definition: accumulators/verify_share.hpp:62
processing_mode_type::internal_accumulator_type internal_accumulator_type
Definition: accumulators/verify_share.hpp:59
void operator()(const Args &args)
Definition: accumulators/verify_share.hpp:81
ProcessingMode processing_mode_type
Definition: accumulators/verify_share.hpp:56
Definition: accumulators/verify_share.hpp:51
Definition: accumulators/verify_share.hpp:119
boost::mpl::always< accumulators::impl::verify_share_impl< mode_type > > impl
Definition: accumulators/verify_share.hpp:125
ProcessingMode mode_type
Definition: accumulators/verify_share.hpp:120