// Path: java_sentence_completion/src/sparse/Pair.java
// public class Pair<A, B> implements Entry<A, B> {
// 	public final A first;
// 	public final B second;
// 
// 	public Pair(A first, B second) {
// 		this.first = first;
// 		this.second = second;
// 	}
// 
// 	public int hashCode() {
// 		int hashFirst = first != null ? first.hashCode() : 0;
// 		int hashSecond = second != null ? second.hashCode() : 0;
// 
// 		return (hashFirst + hashSecond) * hashSecond + hashFirst;
// 	}
// 
// 	public boolean equals(Object other) {
// 		if (other instanceof Pair<?, ?>) {
// 			Pair<?, ?> otherPair = (Pair<?, ?>) other;
// 			return ((this.first == otherPair.first || (this.first != null
// 					&& otherPair.first != null && this.first
// 						.equals(otherPair.first))) && (this.second == otherPair.second || (this.second != null
// 					&& otherPair.second != null && this.second
// 						.equals(otherPair.second))));
// 		}
// 
// 		return false;
// 	}
// 
// 	public String toString() {
// 		return "(" + first + ", " + second + ")";
// 	}
// 
// 	@Override
// 	public A getKey() {
// 		return first;
// 	}
// 
// 	@Override
// 	public B getValue() {
// 		return second;
// 	}
// 
// 	/**
// 	 * Immutable
// 	 * 
// 	 * @throws UnsupportedOperationException
// 	 *             always
// 	 */
// 	@Override
// 	public B setValue(B value) throws UnsupportedOperationException {
// 		throw new UnsupportedOperationException("Immutable");
// 	}
// 
// }


import sparse.Pair;
import java.util.Map.Entry;
import java.util.Set;
/**
 * Copyright 2011-2012 Bernard Paulus and Cédric Snauwaert
 * 
 * Confabulation_Symbolic is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Confabulation_Symbolic is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Confabulation_Symbolic.  If not, see <http://www.gnu.org/licenses/>.
 */

//
// Auto-generated file from float_/Matrix2Dfloat.java
//
package sparse.int_;



public abstract class Matrix2Dint {

	protected int nlines;
	protected int ncols;

	public Matrix2Dint(int nlines, int ncols) {
		this.nlines = nlines;
		this.ncols = ncols;
	}

	/**
	 * sets element at (l, c) to value
	 * <p>
	 * might throw {@link UnsupportedOperationException} when modifications are
	 * not supported
	 * </p>
	 * 
	 * @param l
	 *            the line number, in [0, nlines[
	 * @param c
	 *            the column number, in [0, ncols[
	 * @param value
	 *            the value to be set
	 */
	public void set(int l, int c, int value) {
		check_bounds(l, c);
		setQuick(l, c, value);
	}

	/**
	 * sets element at (l, c) to value with the fewest checks possible
	 * <p>
	 * see documentation in used subclass before use
	 * </p>
	 * w
	 * <p>
	 * might throw {@link UnsupportedOperationException}
	 * </p>
	 */
// Path: java_sentence_completion/src/sparse/Pair.java
// public class Pair<A, B> implements Entry<A, B> {
// 	public final A first;
// 	public final B second;
// 
// 	public Pair(A first, B second) {
// 		this.first = first;
// 		this.second = second;
// 	}
// 
// 	public int hashCode() {
// 		int hashFirst = first != null ? first.hashCode() : 0;
// 		int hashSecond = second != null ? second.hashCode() : 0;
// 
// 		return (hashFirst + hashSecond) * hashSecond + hashFirst;
// 	}
// 
// 	public boolean equals(Object other) {
// 		if (other instanceof Pair<?, ?>) {
// 			Pair<?, ?> otherPair = (Pair<?, ?>) other;
// 			return ((this.first == otherPair.first || (this.first != null
// 					&& otherPair.first != null && this.first
// 						.equals(otherPair.first))) && (this.second == otherPair.second || (this.second != null
// 					&& otherPair.second != null && this.second
// 						.equals(otherPair.second))));
// 		}
// 
// 		return false;
// 	}
// 
// 	public String toString() {
// 		return "(" + first + ", " + second + ")";
// 	}
// 
// 	@Override
// 	public A getKey() {
// 		return first;
// 	}
// 
// 	@Override
// 	public B getValue() {
// 		return second;
// 	}
// 
// 	/**
// 	 * Immutable
// 	 * 
// 	 * @throws UnsupportedOperationException
// 	 *             always
// 	 */
// 	@Override
// 	public B setValue(B value) throws UnsupportedOperationException {
// 		throw new UnsupportedOperationException("Immutable");
// 	}
// 
// }


// Path: java_sentence_completion/src/sparse/int_/Matrix2Dint.java
import sparse.Pair;
import java.util.Map.Entry;
import java.util.Set;

/**
 * Copyright 2011-2012 Bernard Paulus and Cédric Snauwaert
 * 
 * Confabulation_Symbolic is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Confabulation_Symbolic is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Confabulation_Symbolic.  If not, see <http://www.gnu.org/licenses/>.
 */

//
// Auto-generated file from float_/Matrix2Dfloat.java
//
package sparse.int_;



public abstract class Matrix2Dint {

	protected int nlines;
	protected int ncols;

	public Matrix2Dint(int nlines, int ncols) {
		this.nlines = nlines;
		this.ncols = ncols;
	}

	/**
	 * sets element at (l, c) to value
	 * <p>
	 * might throw {@link UnsupportedOperationException} when modifications are
	 * not supported
	 * </p>
	 * 
	 * @param l
	 *            the line number, in [0, nlines[
	 * @param c
	 *            the column number, in [0, ncols[
	 * @param value
	 *            the value to be set
	 */
	public void set(int l, int c, int value) {
		check_bounds(l, c);
		setQuick(l, c, value);
	}

	/**
	 * sets element at (l, c) to value with the fewest checks possible
	 * <p>
	 * see documentation in used subclass before use
	 * </p>
	 * w
	 * <p>
	 * might throw {@link UnsupportedOperationException}
	 * </p>
	 */
	public abstract void setQuick(int l, int c, int value);