<commit_before>/*
 * Traits.hpp
 *
 *  Copyright (C) 2012 <NAME>
 *
 */

#ifndef __LIBIPACA_INCLUDE_IPACA_TRAITS_HPP__
#define __LIBIPACA_INCLUDE_IPACA_TRAITS_HPP__

#include <ipaca/config.hpp>
#include <ipaca/Stoichiometry.hpp>
#include <ipaca/Types.hpp>
#include <ipaca/Error.hpp>

namespace ipaca {

namespace detail {

// default convenience implementations
detail::Element getHydrogens(const Size n);
Bool isHydrogen(const detail::Element&);
Double getElectronMass();

}

template<typename StoichiometryType, typename SpectrumType>
struct Traits
{
    typedef typename StoichiometryType::converter stoichiometry_converter;
    typedef typename SpectrumType::converter spectrum_converter;
    static detail::Element getHydrogens(const Size n);
    static Bool isHydrogen(const detail::Element&);
    static Double getElectronMass();
};

/** Adjust the stoichiometry according to charge and charge type.
 * This adjusts the stoichiometry to reflect the changes induced by adding
 * charges and allows \c libipaca to keep all charge calculations out of the<commit_msg>fixed import for std::find_if<commit_after>/*
 * Traits.hpp
 *
 *  Copyright (C) 2012 <NAME>
 *
 */

#ifndef __LIBIPACA_INCLUDE_IPACA_TRAITS_HPP__
#define __LIBIPACA_INCLUDE_IPACA_TRAITS_HPP__

#include <ipaca/config.hpp>
#include <ipaca/Stoichiometry.hpp>
#include <ipaca/Types.hpp>
#include <ipaca/Error.hpp>

#include <algorithm>

namespace ipaca {

namespace detail {

// default convenience implementations
detail::Element getHydrogens(const Size n);
Bool isHydrogen(const detail::Element&);
Double getElectronMass();

}

template<typename StoichiometryType, typename SpectrumType>
struct Traits
{
    typedef typename StoichiometryType::converter stoichiometry_converter;
    typedef typename SpectrumType::converter spectrum_converter;
    static detail::Element getHydrogens(const Size n);
    static Bool isHydrogen(const detail::Element&);
    static Double getElectronMass();
};

/** Adjust the stoichiometry according to charge and charge type.
 * This adjusts the stoichiometry to reflect the changes induced by adding
 * charges and allows \c libipaca to keep all charge calculations out of the
{'fraction_non_alphanumeric': 0.08494031221303948, 'fraction_numerical': 0.0036730945821854912, 'mean_word_length': 5.746130030959752, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, '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': '3677176', 'n_tokens_mistral': 691, 'n_tokens_neox': 628, 'n_words': 190}