<commit_before>#ifndef INCLUDED_KONTSEVICH_GRAPH_H_
#define INCLUDED_KONTSEVICH_GRAPH_H_

#include <vector>
#include <utility>
#include <cstddef>
#include <iostream>
#include <set>
#include <functional>
#include "util/sort_pairs.hpp"

class KontsevichGraph
{
    size_t d_internal = 0;
    size_t d_external = 0;
    std::vector< std::pair<char, char> > d_targets;
    int d_sign = 1;

    public:
    typedef char Vertex;
    typedef std::pair<Vertex, Vertex> VertexPair;

    KontsevichGraph() = default;
    KontsevichGraph(size_t internal, size_t external, std::vector<VertexPair> targets, int sign = 1, bool normalized = false);
    std::vector<VertexPair> targets() const;
    VertexPair targets(Vertex internal_vertex) const;
    int sign() const;
    int sign(int new_sign);
    size_t internal() const;
    size_t external() const;
    size_t vertices() const;
    std::vector<Vertex> internal_vertices() const;
    std::pair< size_t, std::vector<VertexPair> > abs() const;
    size_t multiplicity() const;
    size_t in_degree(KontsevichGraph::Vertex vertex) const;
    std::vector<size_t> in_degrees() const;
    std::vector<Vertex> neighbors_in(Vertex vertex) const;
    KontsevichGraph mirror_image() const;
    std::string as_sage_expression() const;
    std::string encoding() const;
    std::vector< std::tuple<KontsevichGraph, int, int> > permutations() const;
    void normalize();
    KontsevichGraph& operator*=(const KontsevichGraph& rhs);
    bool operator<(const KontsevichGraph& rhs) const;<commit_msg>KontsevichGraph: make data members protected instead of private<commit_after>#ifndef INCLUDED_KONTSEVICH_GRAPH_H_
#define INCLUDED_KONTSEVICH_GRAPH_H_

#include <vector>
#include <utility>
#include <cstddef>
#include <iostream>
#include <set>
#include <functional>
#include "util/sort_pairs.hpp"

class KontsevichGraph
{
    protected:
    size_t d_internal = 0;
    size_t d_external = 0;
    std::vector< std::pair<char, char> > d_targets;
    int d_sign = 1;

    public:
    typedef char Vertex;
    typedef std::pair<Vertex, Vertex> VertexPair;

    KontsevichGraph() = default;
    KontsevichGraph(size_t internal, size_t external, std::vector<VertexPair> targets, int sign = 1, bool normalized = false);
    std::vector<VertexPair> targets() const;
    VertexPair targets(Vertex internal_vertex) const;
    int sign() const;
    int sign(int new_sign);
    size_t internal() const;
    size_t external() const;
    size_t vertices() const;
    std::vector<Vertex> internal_vertices() const;
    std::pair< size_t, std::vector<VertexPair> > abs() const;
    size_t multiplicity() const;
    size_t in_degree(KontsevichGraph::Vertex vertex) const;
    std::vector<size_t> in_degrees() const;
    std::vector<Vertex> neighbors_in(Vertex vertex) const;
    KontsevichGraph mirror_image() const;
    std::string as_sage_expression() const;
    std::string encoding() const;
    std::vector< std::tuple<KontsevichGraph, int, int> > permutations() const;
    void normalize();
    KontsevichGraph& operator*=(const KontsevichGraph& rhs);
    bool operator<(const KontsevichGraph& rhs) const;
{'fraction_non_alphanumeric': 0.11421238370227783, 'fraction_numerical': 0.0025665704202759063, 'mean_word_length': 4.939047619047619, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 39, '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': '1264037', 'n_tokens_mistral': 1066, 'n_tokens_neox': 1025, 'n_words': 257}