// Path: src/main/java/de/mpii/gsm/taxonomy/Taxonomy.java
// public interface Taxonomy {
// 	
// 	public void load(String fileName) throws Exception;
// 	
// 	public void load(Configuration conf, String taxonomyURI) throws IOException, ClassNotFoundException;
// 	
// 	public void load(int[] p);
// 	
// 	/**
// 	 * @param child Item from the taxonomy
// 	 * @return parent id
// 	 */
// 	public int getParent(int item);
// 	
// 	/**
// 	 * @param child Item from the taxonomy
// 	 * @return true/false
// 	 */
// 	public boolean hasParent(int item);
// 	
// 	/**
// 	 * @param child
// 	 * @return
// 	 */
// 	public int getDepth(int item);
// 	
// 	
// 	/**
// 	 * @param item
// 	 * @return
// 	 */
// 	public int getRoot(int item);
// 	
// 	
// 	/**
// 	 * @param item1
// 	 * @param item2
// 	 * @return
// 	 */
// 	public int getCommonParent(int item1, int item2);
// 	
// 	public boolean isParent(int parent, int child);
// 	
// 	public boolean isGeneralizationOf(int item1, int item2);
// 
// 
// 	public int maxDepth();
// 	
// 	public int[] getParents();
// 
// }


import java.io.IOException;
import de.mpii.gsm.taxonomy.Taxonomy;
package de.mpii.gsm.lash.encoders;




public abstract class BaseGapEncoder {

	// -- variables
	// ---------------------------------------------------------------------------------
	/** the maximum gap allowed within a subsequence */
	protected int gamma;

	/** the maximum length of frequent subsequences */
	protected int lambda;

	/**
	 * left reachability is measured as the minimum number of hops to reach a
	 * pivot at the left from current item
	 */
	protected int[] leftHops;

	/**
	 * right reachability is measured as the minimum number of hops to reach a
	 * pivot at the right from current item
	 */
	protected int[] rightHops;

	/** auxiliary variables for computing distances */
	protected int lastPdist = -1; // distance of last reachable item from the
	// pivot
	protected int lastHops = -1; // number of hops to reach that item
	protected int prevPdist = -1; // distance from pivot of last reachable item
	// with smaller
	// distance

	/** minimum allowed length */
	protected final int MINIMUM_LENGTH = 2;

	/** whether unreachable items are removed */
	protected boolean removeUnreachable = true;

	/**
	 * whether gaps will be compressed (multiple consecutive gaps grouped
	 * together, leading and trailing gaps removed)
	 */
	protected boolean compressGaps = true;
	
	
	/**
	 * Taxonomy
	 */
// Path: src/main/java/de/mpii/gsm/taxonomy/Taxonomy.java
// public interface Taxonomy {
// 	
// 	public void load(String fileName) throws Exception;
// 	
// 	public void load(Configuration conf, String taxonomyURI) throws IOException, ClassNotFoundException;
// 	
// 	public void load(int[] p);
// 	
// 	/**
// 	 * @param child Item from the taxonomy
// 	 * @return parent id
// 	 */
// 	public int getParent(int item);
// 	
// 	/**
// 	 * @param child Item from the taxonomy
// 	 * @return true/false
// 	 */
// 	public boolean hasParent(int item);
// 	
// 	/**
// 	 * @param child
// 	 * @return
// 	 */
// 	public int getDepth(int item);
// 	
// 	
// 	/**
// 	 * @param item
// 	 * @return
// 	 */
// 	public int getRoot(int item);
// 	
// 	
// 	/**
// 	 * @param item1
// 	 * @param item2
// 	 * @return
// 	 */
// 	public int getCommonParent(int item1, int item2);
// 	
// 	public boolean isParent(int parent, int child);
// 	
// 	public boolean isGeneralizationOf(int item1, int item2);
// 
// 
// 	public int maxDepth();
// 	
// 	public int[] getParents();
// 
// }


// Path: src/main/java/de/mpii/gsm/lash/encoders/BaseGapEncoder.java
import java.io.IOException;
import de.mpii.gsm.taxonomy.Taxonomy;

package de.mpii.gsm.lash.encoders;




public abstract class BaseGapEncoder {

	// -- variables
	// ---------------------------------------------------------------------------------
	/** the maximum gap allowed within a subsequence */
	protected int gamma;

	/** the maximum length of frequent subsequences */
	protected int lambda;

	/**
	 * left reachability is measured as the minimum number of hops to reach a
	 * pivot at the left from current item
	 */
	protected int[] leftHops;

	/**
	 * right reachability is measured as the minimum number of hops to reach a
	 * pivot at the right from current item
	 */
	protected int[] rightHops;

	/** auxiliary variables for computing distances */
	protected int lastPdist = -1; // distance of last reachable item from the
	// pivot
	protected int lastHops = -1; // number of hops to reach that item
	protected int prevPdist = -1; // distance from pivot of last reachable item
	// with smaller
	// distance

	/** minimum allowed length */
	protected final int MINIMUM_LENGTH = 2;

	/** whether unreachable items are removed */
	protected boolean removeUnreachable = true;

	/**
	 * whether gaps will be compressed (multiple consecutive gaps grouped
	 * together, leading and trailing gaps removed)
	 */
	protected boolean compressGaps = true;
	
	
	/**
	 * Taxonomy
	 */
	Taxonomy taxonomy;