<commit_before>#include "../../sdp_read.hxx"
#include "../../Timers.hxx"
#include "../../sdp_convert.hxx"

#include <boost/filesystem.hpp>
#include <algorithm>

std::vector<Polynomial> bilinear_basis(const Damped_Rational &damped_rational,
                                       const size_t &half_max_degree);

std::vector<Boost_Float> sample_points(const size_t &num_points);

void write_output(const boost::filesystem::path &output_dir,
                  const std::vector<std::string> &command_arguments,
                  const std::vector<El::BigFloat> &objectives,
                  const std::vector<El::BigFloat> &normalization,
                  const std::vector<Positive_Matrix_With_Prefactor> &matrices,
                  Timers &timers)
{
  auto &objectives_timer(timers.add_and_start("write_output.objectives"));

  auto max_normalization(normalization.begin());
  for(auto n(normalization.begin()); n!=normalization.end(); ++n)
    {
      if(Abs(*n)>Abs(*max_normalization))
        {
          max_normalization=n;
        }
    }
  size_t max_index(std::distance(normalization.begin(), max_normalization));

  El::BigFloat objective_const(objectives.at(max_index)
                               / normalization.at(max_index));
  std::vector<El::BigFloat> dual_objective_b;
  dual_objective_b.reserve(normalization.size() - 1);
  for(size_t index = 0; index < normalization.size(); ++index)
    {<commit_msg>Reformat<commit_after>#include "../../sdp_read.hxx"
#include "../../Timers.hxx"
#include "../../sdp_convert.hxx"

#include <boost/filesystem.hpp>
#include <algorithm>

std::vector<Polynomial> bilinear_basis(const Damped_Rational &damped_rational,
                                       const size_t &half_max_degree);

std::vector<Boost_Float> sample_points(const size_t &num_points);

void write_output(const boost::filesystem::path &output_dir,
                  const std::vector<std::string> &command_arguments,
                  const std::vector<El::BigFloat> &objectives,
                  const std::vector<El::BigFloat> &normalization,
                  const std::vector<Positive_Matrix_With_Prefactor> &matrices,
                  Timers &timers)
{
  auto &objectives_timer(timers.add_and_start("write_output.objectives"));

  auto max_normalization(normalization.begin());
  for(auto n(normalization.begin()); n != normalization.end(); ++n)
    {
      if(Abs(*n) > Abs(*max_normalization))
        {
          max_normalization = n;
        }
    }
  size_t max_index(std::distance(normalization.begin(), max_normalization));

  El::BigFloat objective_const(objectives.at(max_index)
                               / normalization.at(max_index));
  std::vector<El::BigFloat> dual_objective_b;
  dual_objective_b.reserve(normalization.size() - 1);
  for(size_t index = 0; index < normalization.size(); ++index)
    {
{'fraction_non_alphanumeric': 0.13739922888187872, 'fraction_numerical': 0.0014020329477742728, 'mean_word_length': 3.203240058910162, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5820849', 'n_tokens_mistral': 899, 'n_tokens_neox': 871, 'n_words': 133}