<commit_before>package com.nickww.finitefield;

import java.util.ArrayList;
import java.util.List;

public abstract class ChecksumVector
{
	private static final XorChecksumVector xor = new XorChecksumVector();
	private static final DoubleChecksumVector raid6 = new DoubleChecksumVector();
	private static final MatrixChecksumVector[] general = new MatrixChecksumVector[FiniteByteField.MAX_VALUE];
	
	public static ChecksumVector build(int numChecksums)
	{
		if(numChecksums == 1)
			return xor;
		if(numChecksums == 2)
			return raid6;
		
		if(general[numChecksums] == null)
			general[numChecksums] = new MatrixChecksumVector(numChecksums);<commit_msg>Throw exception if user tries to create a non-positive checksum vector <commit_after>package com.nickww.finitefield;

import java.util.ArrayList;
import java.util.List;

public abstract class ChecksumVector
{
	private static final XorChecksumVector xor = new XorChecksumVector();
	private static final DoubleChecksumVector raid6 = new DoubleChecksumVector();
	private static final MatrixChecksumVector[] general = new MatrixChecksumVector[FiniteByteField.MAX_VALUE];
	
	public static ChecksumVector build(int numChecksums)
	{
		if(numChecksums <= 0)
			throw new IllegalArgumentException("Cannot create a checksum vector for 0 or fewer checksums");
		if(numChecksums == 1)
			return xor;
		if(numChecksums == 2)
			return raid6;
		
		if(general[numChecksums] == null)
			general[numChecksums] = new MatrixChecksumVector(numChecksums);
{'fraction_non_alphanumeric': 0.07800941492938802, 'fraction_numerical': 0.006724949562878279, 'mean_word_length': 5.920930232558139, 'pattern_counts': {'":': 0, '<': 4, '<?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': '2010932', 'n_tokens_mistral': 476, 'n_tokens_neox': 454, 'n_words': 122}