<commit_before>/**
 * 
 */
package ca.eandb.jmist.framework.loader.openexr.attribute;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;



/**
 * @author brad
 *
 */
public final class Channel implements Attribute {

	private final String name;
	
	private final PixelType pixelType;
	
	private final byte pLinear;
	
	private final int xSampling;
	
	private final int ySampling;
	
	public Channel(String name, PixelType pixelType, byte pLinear, int xSampling, int ySampling) {
		this.name = name;
		this.pixelType = pixelType;
		this.pLinear = pLinear;
		this.xSampling = xSampling;
		this.ySampling = ySampling;
		if (pLinear != 1 && pLinear != 0) {
			throw new IllegalArgumentException("pLinear must be 0 or 1");
		}
	}
	
	/**
	 * @return the name
	 */
	public final String getName() {
		return name;
	}

	/**
	 * @return the pixelType
	 */
	public final PixelType getPixelType() {
		return pixelType;
	}

	/**<commit_msg>Added some convenience constructors.<commit_after>/**
 * 
 */
package ca.eandb.jmist.framework.loader.openexr.attribute;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;



/**
 * @author brad
 *
 */
public final class Channel implements Attribute {

	private final String name;
	
	private final PixelType pixelType;
	
	private final byte pLinear;
	
	private final int xSampling;
	
	private final int ySampling;
	
	public Channel(String name, PixelType pixelType) {
		this(name, pixelType, (byte) 0, 1, 1);
	}
	
	public Channel(String name, PixelType pixelType, int xSampling, int ySampling) {
		this(name, pixelType, (byte) 0, xSampling, ySampling);
	}
	
	public Channel(String name, PixelType pixelType, byte pLinear, int xSampling, int ySampling) {
		this.name = name;
		this.pixelType = pixelType;
		this.pLinear = pLinear;
		this.xSampling = xSampling;
		this.ySampling = ySampling;
		if (pLinear != 1 && pLinear != 0) {
			throw new IllegalArgumentException("pLinear must be 0 or 1");
		}
	}
	
	/**
	 * @return the name
	 */
	public final String getName() {
		return name;
	}

	/**
	 * @return the pixelType
	 */
	public final PixelType getPixelType() {
		return pixelType;
	}

	/**
{'fraction_non_alphanumeric': 0.10978410656867249, 'fraction_numerical': 0.005512172714745062, 'mean_word_length': 3.624203821656051, 'pattern_counts': {'":': 0, '<': 3, '<?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': '258164', 'n_tokens_mistral': 789, 'n_tokens_neox': 694, 'n_words': 207}