// Path: src/main/java/org/extratrees/data/Array2D.java
// public interface Array2D {
// 	public double get(int row, int col);
// 	public int ncols();
// 	public int nrows();
// 	public Row getRow(int row);
// }


import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
import org.extratrees.data.Array2D;
package org.extratrees;


public class ExtraTrees extends AbstractTrees<BinaryTree, Double> implements Serializable {
	private static final long serialVersionUID = -8164290318411068380L;
	
	transient double[] output;
	transient double[] outputSq;
	
	public ExtraTrees() {
	}
	
	public ExtraTrees(Array2D input, double[] output) {
		this(input, output, null);
	}
	
	/**
	 * @param input    - matrix of inputs, each row is an input vector
	 * @param output   - array of output values (doubles)
	 * @param tasks    - array of task indices from 0 nTasks-1, null if no multi-task learning
	 */
// Path: src/main/java/org/extratrees/data/Array2D.java
// public interface Array2D {
// 	public double get(int row, int col);
// 	public int ncols();
// 	public int nrows();
// 	public Row getRow(int row);
// }


// Path: src/main/java/org/extratrees/ExtraTrees.java
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
import org.extratrees.data.Array2D;

package org.extratrees;


public class ExtraTrees extends AbstractTrees<BinaryTree, Double> implements Serializable {
	private static final long serialVersionUID = -8164290318411068380L;
	
	transient double[] output;
	transient double[] outputSq;
	
	public ExtraTrees() {
	}
	
	public ExtraTrees(Array2D input, double[] output) {
		this(input, output, null);
	}
	
	/**
	 * @param input    - matrix of inputs, each row is an input vector
	 * @param output   - array of output values (doubles)
	 * @param tasks    - array of task indices from 0 nTasks-1, null if no multi-task learning
	 */
	public ExtraTrees(Array2D input, double[] output, int[] tasks) {