<commit_before>#ifndef PYMATCHING2_SEARCH_GRAPH_H
#define PYMATCHING2_SEARCH_GRAPH_H

#include "pymatching/fill_match/tracker/queued_event_tracker.h"

namespace pm {


    class SearchDetectorNode {
        /// Manages the next "look at me" event for the node
        QueuedEventTracker node_event_tracker;

        /// == Permanent fields used to define the structure of the graph. ==
        std::vector<DetectorNode*> neighbors;       /// The node's neighbors.
        std::vector<weight_int> neighbor_weights;   /// Distance crossed by the edge to each neighbor.
        std::vector<std::vector<size_t>> neighbor_observable_indices;  /// Indices of observables crossed by the edge to each neighbor.
    };
}


#endif //PYMATCHING2_SEARCH_GRAPH_H<commit_msg>Add initial search graph<commit_after>#ifndef PYMATCHING2_SEARCH_GRAPH_H
#define PYMATCHING2_SEARCH_GRAPH_H

#include "pymatching/fill_match/tracker/queued_event_tracker.h"

namespace pm {

    class SearchDetectorNode {
    public:
        SearchDetectorNode()
            : reached_from_source(nullptr),
              index_of_predecessor(SIZE_MAX) {
        }

        /// The SearchDetectorNode that this node was reached from in the Dijkstra search
        SearchDetectorNode* reached_from_source;

        /// `index_of_predecessor` is the index in `neighbors` of the neighboring detector node that this node was
        /// reached from in the Dijkstra search.
        size_t index_of_predecessor;

        /// Manages the next "look at me" event for the node
        QueuedEventTracker node_event_tracker;

        /// == Permanent fields used to define the structure of the graph. ==
        std::vector<DetectorNode*> neighbors;       /// The node's neighbors.
        std::vector<weight_int> neighbor_weights;   /// Distance crossed by the edge to each neighbor.
        std::vector<std::vector<size_t>> neighbor_observable_indices;  /// Indices of observables crossed by the edge to each neighbor.
    };
}


#endif //PYMATCHING2_SEARCH_GRAPH_H
{'fraction_non_alphanumeric': 0.08031730292513634, 'fraction_numerical': 0.002974714923153198, 'mean_word_length': 3.160824742268041, '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': '5209463', 'n_tokens_mistral': 616, 'n_tokens_neox': 582, 'n_words': 165}