<commit_before>package de.domisum.exziff.map.floatmap;

import de.domisum.exziff.map.FloatMap;
import org.apache.commons.lang3.Validate;

public class FloatMapInMemoryArray implements FloatMap
{

	private final float[][] floats;


	// INIT
	public FloatMapInMemoryArray(float[][] floats)
	{
		if(floats.length < 1 || floats[0].length < 1)
			throw new IllegalArgumentException("The map has to have a size of at least 1 in each direction");

		this.floats = floats;
	}

	public FloatMapInMemoryArray(int width, int height)
	{
		this(new float[height][width]);
	}


	// GETTERS
	@Override public int getWidth()
	{
		return this.floats[0].length;
	}

	@Override public int getHeight()
	{
		return this.floats.length;
	}

	@Override public float get(int x, int y)
	{
		Validate.inclusiveBetween(0, getWidth()-1, x, "x was "+x+", should be in [0;"+(getWidth()-1)+"]");
		Validate.inclusiveBetween(0, getHeight()-1, y, "y was "+y+", should be in [0;"+(getHeight()-1)+"]");

		return this.floats[y][x];
	}<commit_msg>Changed raw constructor visibility to private (FloatMapInMemoryArray)<commit_after>package de.domisum.exziff.map.floatmap;

import de.domisum.exziff.map.FloatMap;
import org.apache.commons.lang3.Validate;

public class FloatMapInMemoryArray implements FloatMap
{

	private final float[][] floats;


	// INIT
	private FloatMapInMemoryArray(float[][] floats)
	{
		if(floats.length < 1 || floats[0].length < 1)
			throw new IllegalArgumentException("The map has to have a size of at least 1 in each direction");

		this.floats = floats;
	}

	public FloatMapInMemoryArray(int width, int height)
	{
		this(new float[height][width]);
	}


	// GETTERS
	@Override public int getWidth()
	{
		return this.floats[0].length;
	}

	@Override public int getHeight()
	{
		return this.floats.length;
	}

	@Override public float get(int x, int y)
	{
		Validate.inclusiveBetween(0, getWidth()-1, x, "x was "+x+", should be in [0;"+(getWidth()-1)+"]");
		Validate.inclusiveBetween(0, getHeight()-1, y, "y was "+y+", should be in [0;"+(getHeight()-1)+"]");

		return this.floats[y][x];
	}
{'fraction_non_alphanumeric': 0.14925373134328357, 'fraction_numerical': 0.013480982185844969, 'mean_word_length': 4.5119363395225465, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1220555', 'n_tokens_mistral': 795, 'n_tokens_neox': 726, 'n_words': 186}