<commit_before>#pragma once

#include <Serializer.h>
#include <DeSerializer.h>

#include <ratio>

class ScaleType{
  protected:
    int32_t mNum = 1;
    uint32_t mDenom = 1;
    public:
      ScaleType() = default;

    template<std::intmax_t num, std::intmax_t denom>
    ScaleType(const std::ratio<num, denom> scale): mNum(num), mDenom(denom){}

    int32_t num() const { return mNum; }
    uint32_t denom() const { return mDenom; }

    bool operator==(const ScaleType& b) const {
      return mNum == b.mNum && mDenom == b.mDenom;
    }

    constexpr static std::size_t size() noexcept {return sizeof(mNum) + sizeof(mDenom);}

    template<typename PB> friend DeSerializer<PB>& operator>>(DeSerializer<PB>&, ScaleType&);
};

template<typename PB>
Serializer<PB>& operator<<(Serializer<PB>& s, const ScaleType& scale){
  return s << scale.num() << scale.denom();
}<commit_msg>ScaleType: Add missing operator!=<commit_after>#pragma once

#include <Serializer.h>
#include <DeSerializer.h>

#include <ratio>

class ScaleType{
  protected:
    int32_t mNum = 1;
    uint32_t mDenom = 1;
    public:
      ScaleType() = default;

    template<std::intmax_t num, std::intmax_t denom>
    ScaleType(const std::ratio<num, denom> scale): mNum(num), mDenom(denom){}

    int32_t num() const { return mNum; }
    uint32_t denom() const { return mDenom; }

    bool operator==(const ScaleType& b) const {
      return mNum == b.mNum && mDenom == b.mDenom;
    }
    bool operator!=(const ScaleType& b) const { return !(*this==b); }

    constexpr static std::size_t size() noexcept {return sizeof(mNum) + sizeof(mDenom);}

    template<typename PB> friend DeSerializer<PB>& operator>>(DeSerializer<PB>&, ScaleType&);
};

template<typename PB>
Serializer<PB>& operator<<(Serializer<PB>& s, const ScaleType& scale){
  return s << scale.num() << scale.denom();
}
{'fraction_non_alphanumeric': 0.1495680345572354, 'fraction_numerical': 0.01079913606911447, 'mean_word_length': 4.279202279202279, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 29, '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': '2928114', 'n_tokens_mistral': 668, 'n_tokens_neox': 633, 'n_words': 162}