<commit_before>extern crate rand;

use rand::Rng;
use std::env;

#[derive(Debug)]
struct Individual<T> {
    genome: Vec<T>,
}

impl<T> Individual<T> {
    fn new(size: u32) -> Individual<T>
        where T: rand::Rand
    {
        let mut genome: Vec<T> = Vec::new();
        let mut rng = rand::thread_rng();

        for _ in 0..size {
            let value = rng.gen::<T>();
            genome.push(value);
        }

        Individual::<T> { genome: genome }
    }
}

fn main() {
    let populationSize = 10;
    let individual = Individual::<i32>::new(10);
    
    println!("{:?}", individual);
}<commit_msg>Added Population struct; I'm not sure what I'm doing<commit_after>extern crate rand;

use rand::Rng;
use std::env;

// Individual Stuff
#[derive(Debug)]
struct Individual<T> {
    genome: Vec<T>,
}

impl<T> Individual<T> {
    fn new(size: u32) -> Individual<T>
        where T: rand::Rand
    {
        let mut genome: Vec<T> = Vec::new();
        let mut rng = rand::thread_rng();

        for _ in 0..size {
            let value = rng.gen::<T>();
            genome.push(value);
        }

        Individual::<T> { genome: genome }
    }
}

// Population Stuff
struct Population<T> {
    individuals: Vec<Individual<T>>,
}

impl<T> Population<T> {
    fn new(size: u32, genome_size: u32) -> Population<T>
        where T: rand::Rand
    {
        let mut individuals: Vec<Individual<T>> = Vec::new();

        for _ in 0..size {
            individuals.push(Individual::<T>::new(genome_size));
        }

        Population::<T> { individuals: individuals }
    }

    fn genome_size(&self) -> usize {
        self.individuals.len()
    }
}

// Everything else
fn main() {
    let population_size = 100;
    let genome_size = 10;
    let population = Population::<bool>::new(population_size, genome_size);

    println!("{:?}", population.individuals[0]);
    println!("Length: {}", population.genome_size());
}
{'fraction_non_alphanumeric': 0.16399379203310915, 'fraction_numerical': 0.01189860320744956, 'mean_word_length': 2.522768670309654, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 35, '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': '5232065', 'n_tokens_mistral': 685, 'n_tokens_neox': 636, 'n_words': 151}