<commit_before>package com.john;

/**
 * Gene Class for the Genetic Algorithm used for Learning
 */
public class Gene {

    float [] gene;

    Gene(int size){
        gene = new float[size];
    }

}<commit_msg>Added Copy Method for Weights to Gene Array<commit_after>package com.john;

/**
 * Gene Class for the Genetic Algorithm used for Learning
 */
public class Gene {

    float [] gene;

    Gene(int size){
        gene = new float[size];
        for( int i = 0; i < size; i++){
            gene[i] = 0.0f;
        }
    }
    
    /*
    Return Length of Gene
     */
    int getSize(){
        return gene.length;
    }

    /*
    Copy Weight Matrix (2-Dimensional) to
    Gene Data Structure (1-Dimensional Array)
     */
    void copyWeightMatrix(float [][] weight, int rows, int cols){
        for (int i = 0; i < rows; i++){
            for (int j = 0; j < cols; j++){
                gene[(i*cols)+j] = weight[i][j];
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.12953367875647667, 'fraction_numerical': 0.007253886010362694, 'mean_word_length': 1.8328445747800586, 'pattern_counts': {'":': 0, '<': 6, '<?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': '6622103', 'n_tokens_mistral': 315, 'n_tokens_neox': 296, 'n_words': 99}