<commit_before>package edu.jhu.gm;

import java.util.Arrays;
import java.util.Iterator;

  /** Ported by hand from libDAI in C++ under the BSD license.
   * 
   *  Tool for looping over the states of several variables.
   *  
   *  The class IndexFor is an important tool for indexing Factor entries.
   *  Its usage can best be explained by an example.
   *  Assume \a indexVars, \a forVars are both VarSet 's.
   *  Then the following code:
   *  \code
   *      IndexFor i( indexVars, forVars );
   *      size_t iter = 0;
   *      for( ; i.valid(); i++, iter++ ) {
   *          cout << "State of forVars: " << calcState( forVars, iter ) << "; ";
   *          cout << "state of indexVars: " << calcState( indexVars, size_t(i) ) << endl;
   *      }
   *  \endcode
   *  loops over all joint states of the variables in \a forVars,
   *  and <tt>(size_t)i</tt> equals the linear index of the corresponding
   *  state of \a indexVars, where the variables in \a indexVars that are<commit_msg>Comment.<commit_after>package edu.jhu.gm;

import java.util.Arrays;
import java.util.Iterator;

  /** Ported by hand from libDAI in C++.
   * Originally released under the BSD license.
   * 
   *  Tool for looping over the states of several variables.
   *  
   *  The class IndexFor is an important tool for indexing Factor entries.
   *  Its usage can best be explained by an example.
   *  Assume \a indexVars, \a forVars are both VarSet 's.
   *  Then the following code:
   *  \code
   *      IndexFor i( indexVars, forVars );
   *      size_t iter = 0;
   *      for( ; i.valid(); i++, iter++ ) {
   *          cout << "State of forVars: " << calcState( forVars, iter ) << "; ";
   *          cout << "state of indexVars: " << calcState( indexVars, size_t(i) ) << endl;
   *      }
   *  \endcode
   *  loops over all joint states of the variables in \a forVars,
   *  and <tt>(size_t)i</tt> equals the linear index of the corresponding
   *  state of \a indexVars, where the variables in \a indexVars that are
{'fraction_non_alphanumeric': 0.11089010442565887, 'fraction_numerical': 0.000994530084535057, 'mean_word_length': 2.4749568221070812, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 7, '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': '6068527', 'n_tokens_mistral': 646, 'n_tokens_neox': 658, 'n_words': 239}