<commit_before><commit_msg>Add compare_vectors.cpp<commit_after>// comparator function to sort vectors with qsort
int compare_vectors(const void * a, const void * b)
{
	// this sort so that element 0 is the lowest
	//cout << "\nvector_compare: comparing " << *(double*)a << " and " << *(double*)b << ". Res:  = " << ( *(double*)b - *(double*)a );

	// recast the args
	const Mount *x = *((const Mount **)a);
	const Mount *y = *((const Mount **)b);

	// do the comparison
	if (x->coord_x > y->coord_x)
	  return 1;  //return -1;

	if (x->coord_x == y->coord_x) {
		if (x->coord_y > y->coord_y)
			return 1;
		else
			return -1;
	}


	if (x->coord_x < y->coord_x)
	    return -1;  //return 1;
}
{'fraction_non_alphanumeric': 0.1893063583815029, 'fraction_numerical': 0.010115606936416185, 'mean_word_length': 3.0290697674418605, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 13, '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': '7277129', 'n_tokens_mistral': 275, 'n_tokens_neox': 254, 'n_words': 77}