<commit_before>#ifndef DIMMWITTED_VARIABLE_H_
#define DIMMWITTED_VARIABLE_H_

#include "common.h"

#include <vector>
#include <unordered_map>

namespace dd {

class Variable;
class RawVariable;

/**
 * A variable in the compiled factor graph.
 */
class Variable {
 public:
  variable_id_t id;  // variable id
  variable_domain_type_t
      domain_type;      // variable domain type, can be DTYPE_BOOLEAN or
                        // DTYPE_MULTINOMIAL
  bool is_evid;         // whether the variable is evidence
  bool is_observation;  // observed variable (fixed)
  size_t cardinality;   // cardinality

  variable_value_t assignment_evid;  // assignment, while keeping evidence
                                     // variables unchanged
  variable_value_t assignment_free;  // assignment, free to change any variable

  size_t n_factors;          // number of factors the variable connects to
  size_t n_start_i_factors;  // id of the first factor
<commit_msg>Makes it compile with g++ 4.8<commit_after>#ifndef DIMMWITTED_VARIABLE_H_
#define DIMMWITTED_VARIABLE_H_

#include "common.h"

#include <memory>
#include <vector>
#include <unordered_map>

namespace dd {

class Variable;
class RawVariable;

/**
 * A variable in the compiled factor graph.
 */
class Variable {
 public:
  variable_id_t id;  // variable id
  variable_domain_type_t
      domain_type;      // variable domain type, can be DTYPE_BOOLEAN or
                        // DTYPE_MULTINOMIAL
  bool is_evid;         // whether the variable is evidence
  bool is_observation;  // observed variable (fixed)
  size_t cardinality;   // cardinality

  variable_value_t assignment_evid;  // assignment, while keeping evidence
                                     // variables unchanged
  variable_value_t assignment_free;  // assignment, free to change any variable

  size_t n_factors;          // number of factors the variable connects to
  size_t n_start_i_factors;  // id of the first factor

{'fraction_non_alphanumeric': 0.0673469387755102, 'fraction_numerical': 0.0010204081632653062, 'mean_word_length': 2.8077669902912623, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5850615', 'n_tokens_mistral': 609, 'n_tokens_neox': 568, 'n_words': 181}