<commit_before>#include <gtest/gtest.h>

#include "IsoVector.h"

class IsoVectorTests : public ::testing::Test {
protected:
  CompMapPtr comp;
  IsoVector vec;
  IsoVector zero_vec;

  std::vector<int> isotopes;
  double ratio;
  CompMapPtr add_result, mix_result;
  IsoVector orig_vec, vec_to_add;
  double efficiency;
  CompMapPtr subtract_result, separate_result;
  IsoVector subtract_from_vec, to_subtract_vec;
  

  // this sets up the fixtures
  virtual void SetUp() {
    comp = CompMapPtr(new CompMap(MASS));
    vec = IsoVector(comp);
  };
  
  // this tears down the fixtures
  virtual void TearDown() {
  }

  void LoadMaps() {
    isotopes.push_back(1001),isotopes.push_back(2004);
    
    // add, mix terms
    ratio = 2;
    CompMapPtr comp_to_add = CompMapPtr(new CompMap(MASS));
    (*comp_to_add)[isotopes.at(1)] = 1;
    vec_to_add = IsoVector(comp_to_add);
    CompMapPtr orig_comp = CompMapPtr(new CompMap(MASS));
    (*orig_comp)[isotopes.at(0)] = 1;
    orig_vec = IsoVector(orig_comp);
    // add, mix results
    add_result = CompMapPtr(new CompMap(MASS));
    (*add_result)[isotopes.at(0)] = 1;
    (*add_result)[isotopes.at(1)] = 1;
    add_result->normalize();
    mix_result = CompMapPtr(new CompMap(MASS));
    (*mix_result)[isotopes.at(0)] = 1;
    (*mix_result)[isotopes.at(1)] = 1*ratio;
    mix_result->normalize();    

    // subtract, separate terms
    efficiency = 0.9;
    subtract_from_vec = IsoVector(add_result);
    to_subtract_vec = IsoVector(comp_to_add);
    // subtract, separate results
    subtract_result = orig_comp;
    separate_result = CompMapPtr(new CompMap(MASS));
    (*separate_result)[isotopes.at(0)] = 1;
    (*separate_result)[isotopes.at(1)] = 1-efficiency;
    separate_result->normalize();
  }
};<commit_msg>rolled back isovectortest changes<commit_after>#include <gtest/gtest.h>

#include "IsoVector.h"

class IsoVectorTests : public ::testing::Test {
protected:
  CompMapPtr comp;
  IsoVector vec;
  IsoVector zero_vec;

  std::vector<int> isotopes;
  double ratio;
  CompMapPtr add_result, mix_result;
  IsoVector orig_vec, vec_to_add;
  double efficiency;
  CompMapPtr subtract_result, separate_result;
  IsoVector subtract_from_vec, to_subtract_vec;
  

  // this sets up the fixtures
  virtual void SetUp() {
    comp = CompMapPtr(new CompMap(MASS));
    vec = IsoVector(comp);
  };
  
  // this tears down the fixtures
  virtual void TearDown() {
  }

  void LoadMaps() {
    isotopes.push_back(1001),isotopes.push_back(2004);
    
    // add, mix terms
    ratio = 2;
    CompMapPtr comp_to_add = CompMapPtr(new CompMap(MASS));
    (*comp_to_add)[isotopes.at(isotopes.size()-1)] = 1;
    vec_to_add = IsoVector(comp_to_add);
    CompMapPtr orig_comp = CompMapPtr(new CompMap(MASS));
    (*orig_comp)[isotopes.at(0)] = 1;
    orig_vec = IsoVector(orig_comp);
    // add, mix results
    add_result = CompMapPtr(new CompMap(MASS));
    (*add_result)[isotopes.at(0)] = 1;
    (*add_result)[isotopes.at(isotopes.size()-1)] = 1;
    add_result->normalize();
    mix_result = CompMapPtr(new CompMap(MASS));
    (*mix_result)[isotopes.at(0)] = 1;
    (*mix_result)[isotopes.at(isotopes.size()-1)] = 1*ratio;
    mix_result->normalize();    

    // subtract, separate terms
    efficiency = 0.9;
    subtract_from_vec = IsoVector(add_result);
    to_subtract_vec = IsoVector(comp_to_add);
    // subtract, separate results
    subtract_result = orig_comp;
    separate_result = CompMapPtr(new CompMap(MASS));
    (*separate_result)[isotopes.at(0)] = 1;
    (*separate_result)[isotopes.at(isotopes.size()-1)] = 1-efficiency;
    separate_result->normalize();
  }
};
{'fraction_non_alphanumeric': 0.13443526170798897, 'fraction_numerical': 0.01487603305785124, 'mean_word_length': 3.933423913043478, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '4094666', 'n_tokens_mistral': 1390, 'n_tokens_neox': 1313, 'n_words': 241}