<commit_before>#include "convergence/final_checker_or_n.h"

#include "data/moment_types.h"
#include "convergence/moments/single_moment_checker_i.h"

namespace bart {

namespace convergence {

template <typename CompareType, typename CheckerType>
Status FinalCheckerOrN<CompareType, CheckerType>::CheckFinalConvergence(
    CompareType& current_iteration,
    CompareType& previous_iteration
    ) {
  return convergence_status_;
}

template class FinalCheckerOrN<data::MomentVector,
                               convergence::moments::SingleMomentCheckerI>;


} // namespace convergence

} // namespace bart<commit_msg>added implementation of CheckFinalConvergence for SingleMomentCheckers<commit_after>#include "convergence/final_checker_or_n.h"

#include "data/moment_types.h"
#include "convergence/moments/single_moment_checker_i.h"

namespace bart {

namespace convergence {

template <>
Status FinalCheckerOrN<data::MomentVector ,
                       moments::SingleMomentCheckerI>::CheckFinalConvergence(
                           data::MomentVector & current_iteration,
                           data::MomentVector & previous_iteration) {

  convergence_status_.is_complete =
      checker_ptr_->CheckIfConverged(current_iteration, previous_iteration);

  convergence_status_.delta = checker_ptr_->delta();

  ++convergence_status_.iteration_number;

  if (convergence_status_.iteration_number ==
      convergence_status_.max_iterations)

    convergence_status_.is_complete = true;

  return convergence_status_;
}

template class FinalCheckerOrN<data::MomentVector,
                               moments::SingleMomentCheckerI>;


} // namespace convergence

} // namespace bart
{'fraction_non_alphanumeric': 0.0820543093270366, 'fraction_numerical': 0.0, 'mean_word_length': 4.120845921450151, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '394905', 'n_tokens_mistral': 492, 'n_tokens_neox': 475, 'n_words': 75}