Algorithms

Encoding algorithms are meant to provide encoding interface similar to STL algorithms' one. More...

+ Collaboration diagram for Algorithms:

Functions

template<typename Decoder , typename SinglePassRange , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
codec::detail::range_codec_impl< codec::detail::value_codec_impl< CodecAccumulator > > nil::crypto3::decode (const SinglePassRange &r)
 Decodes the elements with particular codec defined with Decoder in the range, defined by rng and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements. More...
 
template<typename Decoder , typename SinglePassRange , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< CodecAccumulator >::value, CodecAccumulator >::type & nil::crypto3::decode (const SinglePassRange &rng, CodecAccumulator &acc)
 Decodes the elements with particular codec defined with Decoder in the range, defined by rng and inserts the result to destination range beginning at out. More...
 
template<typename Decoder , typename SinglePassRange , typename OutputIterator >
std::enable_if< detail::is_iterator< OutputIterator >::value, OutputIterator >::type nil::crypto3::decode (const SinglePassRange &rng, OutputIterator out)
 Decodes the elements with particular codec defined with Decoder in the range, defined by rng and inserts the result to destination range beginning at out. More...
 
template<typename Decoder , typename InputIterator , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
codec::detail::range_codec_impl< codec::detail::value_codec_impl< CodecAccumulator > > nil::crypto3::decode (InputIterator first, InputIterator last)
 Decodes the elements with particular codec defined with Decoder in the range, defined by [first, last) and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements. More...
 
template<typename Decoder , typename InputIterator , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< CodecAccumulator >::value, CodecAccumulator >::type & nil::crypto3::decode (InputIterator first, InputIterator last, CodecAccumulator &acc)
 Decodes the elements with particular codec defined with Decoder in the range, defined by rng and inserts the result to destination range beginning at out. More...
 
template<typename Decoder , typename InputIterator , typename OutputIterator >
std::enable_if< detail::is_iterator< OutputIterator >::value, OutputIterator >::type nil::crypto3::decode (InputIterator first, InputIterator last, OutputIterator out)
 Decodes the elements with particular codec defined with Decoder in the range, defined by [first, last), and inserts the result to another range beginning at out. More...
 
template<typename Decoder , typename T , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
codec::detail::range_codec_impl< codec::detail::value_codec_impl< CodecAccumulator > > nil::crypto3::decode (std::initializer_list< T > r)
 Decodes the elements with particular codec defined with Decoder in the range, defined by rng and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements. More...
 
template<typename Decoder , typename T , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< CodecAccumulator >::value, CodecAccumulator >::type & nil::crypto3::decode (std::initializer_list< T > rng, CodecAccumulator &acc)
 Decodes the elements with particular codec defined with Decoder in the range, defined by rng and inserts the result to destination range beginning at out. More...
 
template<typename Decoder , typename T , typename OutputIterator >
std::enable_if< detail::is_iterator< OutputIterator >::value, OutputIterator >::type nil::crypto3::decode (std::initializer_list< T > rng, OutputIterator out)
 Decodes the elements with particular codec defined with Decoder in the range, defined by rng and inserts the result to destination range beginning at out. More...
 
template<typename Encoder , typename SinglePassRange , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
codec::detail::range_codec_impl< codec::detail::value_codec_impl< CodecAccumulator > > nil::crypto3::encode (const SinglePassRange &r)
 Encodes the elements with particular codec defined with Encoder in the range, defined by rng and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements. More...
 
template<typename Encoder , typename SinglePassRange , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< CodecAccumulator >::value, CodecAccumulator >::type & nil::crypto3::encode (const SinglePassRange &rng, CodecAccumulator &acc)
 Encodes the elements with particular codec defined with Encoder in the range, defined by rng and inserts the result to destination range beginning at out. More...
 
template<typename Encoder , typename SinglePassRange , typename OutputIterator >
std::enable_if< detail::is_iterator< OutputIterator >::value, OutputIterator >::type nil::crypto3::encode (const SinglePassRange &rng, OutputIterator out)
 Encodes the elements with particular codec defined with Encoder in the range, defined by rng and inserts the result to destination range beginning at out. More...
 
template<typename Encoder , typename InputIterator , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
codec::detail::range_codec_impl< codec::detail::value_codec_impl< CodecAccumulator > > nil::crypto3::encode (InputIterator first, InputIterator last)
 Encodes the elements with particular codec defined with Encoder in the range, defined by [first, last) and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements. More...
 
template<typename Encoder , typename InputIterator , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< CodecAccumulator >::value, CodecAccumulator >::type & nil::crypto3::encode (InputIterator first, InputIterator last, CodecAccumulator &acc)
 Encodes the elements with particular codec defined with Encoder in the range, defined by [first, last) and returns the result with type satisfying AccumulatorSet requirements. More...
 
template<typename Encoder , typename InputIterator , typename OutputIterator >
std::enable_if< detail::is_iterator< OutputIterator >::value, OutputIterator >::type nil::crypto3::encode (InputIterator first, InputIterator last, OutputIterator out)
 Encodes the elements with particular codec defined with Encoder in the range, defined by [first, last), and inserts the result to another range beginning at out. More...
 
template<typename Encoder , typename T , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
codec::detail::range_codec_impl< codec::detail::value_codec_impl< CodecAccumulator > > nil::crypto3::encode (std::initializer_list< T > r)
 Encodes the elements with particular codec defined with Encoder in the range, defined by rng and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements. More...
 
template<typename Encoder , typename T , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
std::enable_if< boost::accumulators::detail::is_accumulator_set< CodecAccumulator >::value, CodecAccumulator >::type & nil::crypto3::encode (std::initializer_list< T > rng, CodecAccumulator &acc)
 Encodes the elements with particular codec defined with Encoder in the range, defined by rng and inserts the result to destination range beginning at out. More...
 
template<typename Encoder , typename T , typename OutputIterator >
std::enable_if< detail::is_iterator< OutputIterator >::value, OutputIterator >::type nil::crypto3::encode (std::initializer_list< T > rng, OutputIterator out)
 Encodes the elements with particular codec defined with Encoder in the range, defined by rng and inserts the result to destination range beginning at out. More...
 

Detailed Description

Encoding algorithms are meant to provide encoding interface similar to STL algorithms' one.

Function Documentation

◆ decode() [1/9]

template<typename Decoder , typename SinglePassRange , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
codec::detail::range_codec_impl<codec::detail::value_codec_impl<CodecAccumulator> > nil::crypto3::decode ( const SinglePassRange &  r)

Decodes the elements with particular codec defined with Decoder in the range, defined by rng and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements.

Template Parameters
DecoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
SinglePassRangeMust meet the requirements of SinglePassRange
Parameters
rDefines the range to be processed by decoder.
Returns
Decoded data emplaced in any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements.

◆ decode() [2/9]

template<typename Decoder , typename SinglePassRange , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
std::enable_if<boost::accumulators::detail::is_accumulator_set<CodecAccumulator>::value, CodecAccumulator>::type& nil::crypto3::decode ( const SinglePassRange &  rng,
CodecAccumulator &  acc 
)

Decodes the elements with particular codec defined with Decoder in the range, defined by rng and inserts the result to destination range beginning at out.

Template Parameters
DecoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
SinglePassRangeMust meet the requirements of SinglePassRange
CodecAccumulatorMust meet the requirements of AccumulatorSet.
Parameters
rngDefines the range to be processed by decoder.
accAccumulatorSet defines the destination decoded data would be stored.
Returns
CodecAccumulator AccumulatorSet non-const reference equal to acc.

◆ decode() [3/9]

template<typename Decoder , typename SinglePassRange , typename OutputIterator >
std::enable_if<detail::is_iterator<OutputIterator>::value, OutputIterator>::type nil::crypto3::decode ( const SinglePassRange &  rng,
OutputIterator  out 
)

Decodes the elements with particular codec defined with Decoder in the range, defined by rng and inserts the result to destination range beginning at out.

Template Parameters
DecoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
SinglePassRangeMust meet the requirements of SinglePassRange
CodecAccumulatorMust meet the requirements of AccumulatorSet.
Parameters
rngDefines the range to be processed by decoder.
outDefines the beginning of destination range.
Returns
CodecAccumulator AccumulatorSet non-const reference equal to acc.

◆ decode() [4/9]

template<typename Decoder , typename InputIterator , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
codec::detail::range_codec_impl<codec::detail::value_codec_impl<CodecAccumulator> > nil::crypto3::decode ( InputIterator  first,
InputIterator  last 
)

Decodes the elements with particular codec defined with Decoder in the range, defined by [first, last) and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements.

Template Parameters
DecoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
InputIteratorMust meet the requirements of InputIterator.
CodecAccumulatorMust meet the requirements of AccumulatorSet.
Parameters
firstIterator defines the beginning of the range to be decoded.
lastIterator defines the end of the range to be decoded.
Returns
Decoded data emplaced in any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements.

◆ decode() [5/9]

template<typename Decoder , typename InputIterator , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
std::enable_if<boost::accumulators::detail::is_accumulator_set<CodecAccumulator>::value, CodecAccumulator>::type& nil::crypto3::decode ( InputIterator  first,
InputIterator  last,
CodecAccumulator &  acc 
)

Decodes the elements with particular codec defined with Decoder in the range, defined by rng and inserts the result to destination range beginning at out.

Template Parameters
DecoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
SinglePassRangeMust meet the requirements of SinglePassRange
OutputIteratorMust meet the requirements of OutputIterator.
Parameters
rngDefines the range to be processed by decoder.
accAccumulatorSet defines the destination decoded data would be stored.
Returns
Output iterator to the element in the destination range, one past the last element inserted.

◆ decode() [6/9]

template<typename Decoder , typename InputIterator , typename OutputIterator >
std::enable_if<detail::is_iterator<OutputIterator>::value, OutputIterator>::type nil::crypto3::decode ( InputIterator  first,
InputIterator  last,
OutputIterator  out 
)

Decodes the elements with particular codec defined with Decoder in the range, defined by [first, last), and inserts the result to another range beginning at out.

Template Parameters
DecoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
InputIteratorMust meet the requirements of InputIterator.
OutputIteratorMust meet the requirements of OutputIterator.
Parameters
firstIterator defines the beginning of the range to be decoded.
lastIterator defines the end of the range to be decoded.
outIterator defines the beginning of the destination range.
Returns
Output iterator to the element in the destination range, one past the last element inserted.

◆ decode() [7/9]

template<typename Decoder , typename T , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
codec::detail::range_codec_impl<codec::detail::value_codec_impl<CodecAccumulator> > nil::crypto3::decode ( std::initializer_list< T >  r)

Decodes the elements with particular codec defined with Decoder in the range, defined by rng and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements.

Template Parameters
DecoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
TDecoded initializer list value type.
Parameters
rDefines the range to be processed by decoder.
Returns
Decoded data emplaced in any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements.

◆ decode() [8/9]

template<typename Decoder , typename T , typename CodecAccumulator = typename codec::accumulator_set<typename Decoder::stream_decoder_type>>
std::enable_if<boost::accumulators::detail::is_accumulator_set<CodecAccumulator>::value, CodecAccumulator>::type& nil::crypto3::decode ( std::initializer_list< T >  rng,
CodecAccumulator &  acc 
)

Decodes the elements with particular codec defined with Decoder in the range, defined by rng and inserts the result to destination range beginning at out.

Template Parameters
DecoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
TDecoded initializer list value type.
CodecAccumulatorMust meet the requirements of AccumulatorSet.
Parameters
rngDefines the range to be processed by decoder.
accAccumulatorSet defines the destination decoded data would be stored.
Returns
CodecAccumulator AccumulatorSet non-const reference equal to acc.

◆ decode() [9/9]

template<typename Decoder , typename T , typename OutputIterator >
std::enable_if<detail::is_iterator<OutputIterator>::value, OutputIterator>::type nil::crypto3::decode ( std::initializer_list< T >  rng,
OutputIterator  out 
)

Decodes the elements with particular codec defined with Decoder in the range, defined by rng and inserts the result to destination range beginning at out.

Template Parameters
DecoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
TDecoded initializer list value type.
CodecAccumulatorMust meet the requirements of AccumulatorSet.
Parameters
rngDefines the range to be processed by decoder.
outDefines the beginning of destination range.
Returns
CodecAccumulator AccumulatorSet non-const reference equal to acc.

◆ encode() [1/9]

template<typename Encoder , typename SinglePassRange , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
codec::detail::range_codec_impl<codec::detail::value_codec_impl<CodecAccumulator> > nil::crypto3::encode ( const SinglePassRange &  r)

Encodes the elements with particular codec defined with Encoder in the range, defined by rng and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements.

Template Parameters
EncoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
SinglePassRangeMust meet the requirements of SinglePassRange
Parameters
rDefines the range to be processed by encoder.
Returns
Encoded data emplaced in any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements.

◆ encode() [2/9]

template<typename Encoder , typename SinglePassRange , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
std::enable_if<boost::accumulators::detail::is_accumulator_set<CodecAccumulator>::value, CodecAccumulator>::type& nil::crypto3::encode ( const SinglePassRange &  rng,
CodecAccumulator &  acc 
)

Encodes the elements with particular codec defined with Encoder in the range, defined by rng and inserts the result to destination range beginning at out.

Template Parameters
EncoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
SinglePassRangeMust meet the requirements of SinglePassRange
CodecAccumulatorMust meet the requirements of AccumulatorSet.
Parameters
rngDefines the range to be processed by encoder.
accAccumulatorSet defines the destination encoded data would be stored.
Returns
CodecAccumulator AccumulatorSet non-const reference equal to acc.

◆ encode() [3/9]

template<typename Encoder , typename SinglePassRange , typename OutputIterator >
std::enable_if<detail::is_iterator<OutputIterator>::value, OutputIterator>::type nil::crypto3::encode ( const SinglePassRange &  rng,
OutputIterator  out 
)

Encodes the elements with particular codec defined with Encoder in the range, defined by rng and inserts the result to destination range beginning at out.

Template Parameters
EncoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
SinglePassRangeMust meet the requirements of SinglePassRange
OutputIteratorMust meet the requirements of OutputIterator.
Parameters
rngDefines the range to be processed by encoder.
outDefines the beginning of destination range.
Returns
Output iterator to the element in the destination range, one past the last element inserted.

◆ encode() [4/9]

template<typename Encoder , typename InputIterator , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
codec::detail::range_codec_impl<codec::detail::value_codec_impl<CodecAccumulator> > nil::crypto3::encode ( InputIterator  first,
InputIterator  last 
)

Encodes the elements with particular codec defined with Encoder in the range, defined by [first, last) and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements.

Template Parameters
EncoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
InputIteratorMust meet the requirements of InputIterator.
CodecAccumulatorMust meet the requirements of AccumulatorSet.
Parameters
firstIterator defines the beginning of the range to be encoded.
lastIterator defines the end of the range to be encoded.
Returns
Encoded data emplaced in any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements.

◆ encode() [5/9]

template<typename Encoder , typename InputIterator , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
std::enable_if<boost::accumulators::detail::is_accumulator_set<CodecAccumulator>::value, CodecAccumulator>::type& nil::crypto3::encode ( InputIterator  first,
InputIterator  last,
CodecAccumulator &  acc 
)

Encodes the elements with particular codec defined with Encoder in the range, defined by [first, last) and returns the result with type satisfying AccumulatorSet requirements.

Template Parameters
EncoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
InputIteratorMust meet the requirements of InputIterator.
CodecAccumulatorMust meet the requirements of AccumulatorSet.
Parameters
firstIterator defines the beginning of the range to be encoded.
lastIterator defines the end of the range to be encoded.
accAccumulatorSet defines the place encoded data would be stored.
Returns
CodecAccumulator AccumulatorSet non-const reference equal to acc.

◆ encode() [6/9]

template<typename Encoder , typename InputIterator , typename OutputIterator >
std::enable_if<detail::is_iterator<OutputIterator>::value, OutputIterator>::type nil::crypto3::encode ( InputIterator  first,
InputIterator  last,
OutputIterator  out 
)

Encodes the elements with particular codec defined with Encoder in the range, defined by [first, last), and inserts the result to another range beginning at out.

Template Parameters
EncoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
InputIteratorMust meet the requirements of InputIterator.
OutputIteratorMust meet the requirements of OutputIterator.
Parameters
firstIterator defines the beginning of the range to be encoded.
lastIterator defines the end of the range to be encoded.
outIterator defines the beginning of the destination range.
Returns
Output iterator to the element in the destination range, one past the last element inserted.

◆ encode() [7/9]

template<typename Encoder , typename T , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
codec::detail::range_codec_impl<codec::detail::value_codec_impl<CodecAccumulator> > nil::crypto3::encode ( std::initializer_list< T >  r)

Encodes the elements with particular codec defined with Encoder in the range, defined by rng and returns the result with any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements.

Template Parameters
EncoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
TEncoded initializer list value type.
Parameters
rDefines the range to be processed by encoder.
Returns
Encoded data emplaced in any type convertible to the type satisfying SequenceContainer with the value type satisfying Integral concept requirements.

◆ encode() [8/9]

template<typename Encoder , typename T , typename CodecAccumulator = typename codec::accumulator_set<typename Encoder::stream_encoder_type>>
std::enable_if<boost::accumulators::detail::is_accumulator_set<CodecAccumulator>::value, CodecAccumulator>::type& nil::crypto3::encode ( std::initializer_list< T >  rng,
CodecAccumulator &  acc 
)

Encodes the elements with particular codec defined with Encoder in the range, defined by rng and inserts the result to destination range beginning at out.

Template Parameters
EncoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
TEncoded initializer list value type.
CodecAccumulatorMust meet the requirements of AccumulatorSet.
Parameters
rngDefines the range to be processed by encoder.
accAccumulatorSet defines the destination encoded data would be stored.
Returns
CodecAccumulator AccumulatorSet non-const reference equal to acc.

◆ encode() [9/9]

template<typename Encoder , typename T , typename OutputIterator >
std::enable_if<detail::is_iterator<OutputIterator>::value, OutputIterator>::type nil::crypto3::encode ( std::initializer_list< T >  rng,
OutputIterator  out 
)

Encodes the elements with particular codec defined with Encoder in the range, defined by rng and inserts the result to destination range beginning at out.

Template Parameters
EncoderMust meet the requirements of Codec which determines the particular algorithm to be used with range given.
TEncoded initializer list value type.
OutputIteratorMust meet the requirements of OutputIterator.
Parameters
rngDefines the range to be processed by encoder.
outDefines the beginning of destination range.
Returns
Output iterator to the element in the destination range, one past the last element inserted.