<commit_before>/** TwoScale Module:
  
    Tabulation of the twoscale coefficients, and a routine to compute the
    scaling functions (Legendre polyn scaled and shifted to the unit interval).
*/

//use Math;

config const hg_inputfile = "hg_coeffs.dat";

// FIXME: Module-Private Stuff
var hg_MaxK        : int;
var hg_coeff_space : domain(3) = [0..-1, 0..-1, 0..-1];
var hg_coeffs      : [hg_coeff_space] real;
var phi_norm_space : domain(1) = [0..-1];
var phi_norms      : [phi_norm_space] real;
var phi_initialized = false;


/** Read two scale coeffs from the input file.
 */
def hg_readCoeffs(inputfile) {
    var max_k: int;
    var coeffData = new file(inputfile, path='./', mode='r');

    coeffData.open();
    coeffData.read(max_k);
    hg_MaxK = max_k;<commit_msg>Fixed call of file constructor to not use mode of string type.<commit_after>/** TwoScale Module:
  
    Tabulation of the twoscale coefficients, and a routine to compute the
    scaling functions (Legendre polyn scaled and shifted to the unit interval).
*/

//use Math;

config const hg_inputfile = "hg_coeffs.dat";

// FIXME: Module-Private Stuff
var hg_MaxK        : int;
var hg_coeff_space : domain(3) = [0..-1, 0..-1, 0..-1];
var hg_coeffs      : [hg_coeff_space] real;
var phi_norm_space : domain(1) = [0..-1];
var phi_norms      : [phi_norm_space] real;
var phi_initialized = false;


/** Read two scale coeffs from the input file.
 */
def hg_readCoeffs(inputfile) {
    var max_k: int;
    var coeffData = new file(inputfile);

    coeffData.open();
    coeffData.read(max_k);
    hg_MaxK = max_k;
{'fraction_non_alphanumeric': 0.1208860759493671, 'fraction_numerical': 0.012658227848101266, 'mean_word_length': 3.3079019073569484, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6742746', 'n_tokens_mistral': 588, 'n_tokens_neox': 582, 'n_words': 170}