<commit_before>/*
 * Website:
 *      https://github.com/wo3kie/dojo
 *
 * Author:
 *      <NAME>
 *
 * Compilation:
 *      g++ --std=c++11 variance.cpp -o variance
 *
 * Usage:
 *      $ ./variance
 */

#include <cassert>

#include "./feq.hpp"
#include "./variance.hpp"

int main(){
    assert( feq(3.067, variance<double>( { 7, 6, 8, 4, 2, 7, 6, 7, 6, 5 } ) ) );
}<commit_msg>variance<commit_after>/*
 * Website:
 *      https://github.com/wo3kie/dojo
 *
 * Author:
 *      <NAME>
 *
 * Compilation:
 *      g++ --std=c++11 variance.cpp -o variance -lgsl -lgslcblas -lm
 *
 * Usage:
 *      $ ./variance
 */

#include <cassert>

#include <gsl/gsl_statistics.h>

#include "./feq.hpp"
#include "./variance.hpp"

int main(){
    std::vector<double> array{ 7, 6, 8, 4, 2, 7, 6, 7, 6, 5 };

    assert( feq( 3.0666, variance<double>( array ) ) );
    assert( feq( 3.0666, gsl_stats_variance( &array.front(), 1, array.size() ) ) );
}
{'fraction_non_alphanumeric': 0.2118279569892473, 'fraction_numerical': 0.04408602150537634, 'mean_word_length': 2.5945945945945947, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '1143653', 'n_tokens_mistral': 412, 'n_tokens_neox': 376, 'n_words': 84}