<commit_before>/*
 * =====================================================================================
 *
 *       Filename:  main.cc
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  07/14/2008 07:15:55 PM EDT
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  <NAME> (NV), <EMAIL>
 *        Company:  Georgia Tech Fastlab-ESP Lab
 *
 * =====================================================================================
 */

#include <string>
#include "allnn.h"

using namespace std;
using namespace mlpack;
using namespace allnn;

int main (int argc, char *argv[]) {
  fx_module *fx_root = fx_init(argc, argv, &allnn_doc);
  AllNN allnn;

  arma::mat data_for_tree;

  string input_file = fx_param_str_req(fx_root, "input_file");
  string output_file = fx_param_str(fx_root, "output_file", "output.csv");

  NOTIFY("Loading file %s...", input_file.c_str());
  data::Load(input_file.c_str(), data_for_tree);
  allnn.Init(&data_for_tree, fx_root);
  
  arma::Col<index_t> resulting_neighbors_tree;
  arma::vec resulting_distances_tree;

  NOTIFY("Computing neighbors...");

  allnn.ComputeNeighbors(resulting_distances_tree, resulting_neighbors_tree);

  NOTIFY("Saving results to %s...", output_file.c_str());

  data::Save(output_file.c_str(), resulting_neighbors_tree, resulting_distances_tree); 

  fx_done(fx_root);
}
<commit_msg>Oops, I broke the build again.  The constructor changes have to be propagated to the main method.<commit_after>/*
 * =====================================================================================
 *
 *       Filename:  main.cc
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  07/14/2008 07:15:55 PM EDT
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  <NAME> (NV), <EMAIL>
 *        Company:  Georgia Tech Fastlab-ESP Lab
 *
 * =====================================================================================
 */

#include <string>
#include "allnn.h"

using namespace std;
using namespace mlpack;
using namespace allnn;

int main (int argc, char *argv[]) {
  fx_module *fx_root = fx_init(argc, argv, &allnn_doc);


  arma::mat data_for_tree;

  string input_file = fx_param_str_req(fx_root, "input_file");
  string output_file = fx_param_str(fx_root, "output_file", "output.csv");

  NOTIFY("Loading file %s...", input_file.c_str());
  data::Load(input_file.c_str(), data_for_tree);

  AllNN allnn(data_for_tree, fx_root);
  
  arma::Col<index_t> resulting_neighbors_tree;
  arma::vec resulting_distances_tree;

  NOTIFY("Computing neighbors...");

  allnn.ComputeNeighbors(resulting_distances_tree, resulting_neighbors_tree);

  NOTIFY("Saving results to %s...", output_file.c_str());

  data::Save(output_file.c_str(), resulting_neighbors_tree, resulting_distances_tree); 

  fx_done(fx_root);
}

{'fraction_non_alphanumeric': 0.23740753786544558, 'fraction_numerical': 0.011271574498062698, 'mean_word_length': 4.419847328244275, 'pattern_counts': {'":': 0, '<': 11, '<?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': '6074145', 'n_tokens_mistral': 993, 'n_tokens_neox': 911, 'n_words': 187}