inline InputT find_format_copy_impl2( const InputT& Input, FormatterT Formatter, const FindResultT& FindResult, const FormatResultT& FormatResult) { typedef find_format_store< BOOST_STRING_TYPENAME range_const_iterator<InputT>::type, FormatterT, FormatResultT > store_type; // Create store for the find result store_type M( FindResult, FormatResult, Formatter ); if ( !M ) { // Match not found - return original sequence return InputT( Input ); } InputT Output; // Copy the beginning of the sequence pdalboost::algorithm::detail::insert( Output, ::pdalboost::end(Output), ::pdalboost::begin(Input), M.begin() ); // Copy formatted result pdalboost::algorithm::detail::insert( Output, ::pdalboost::end(Output), M.format_result() ); // Copy the rest of the sequence pdalboost::algorithm::detail::insert( Output, ::pdalboost::end(Output), M.end(), ::pdalboost::end(Input) ); return Output; }
float NormalizeColor(InputT input) { return float(input) / float(InputT(-1)); }