// Path: CTBNCToolkit/ICTClassifier.java
// public interface ICTClassifier<TimeType extends Number & Comparable<TimeType>, NodeType extends INode> extends IModel<TimeType,NodeType>{
// 
// 	/**
// 	 * Return the classification node.
// 	 * Null if it is not defined.
// 	 * 
// 	 * @return classification node
// 	 */
// 	public DiscreteNode getClassNode();
// 	
// 	/**
// 	 * Classify a trajectory.
// 	 * 
// 	 * @param algorithm classification algorithm
// 	 * @param trajectory input trajectory
// 	 * @return classification results
// 	 * @throws Exception in case of errors
// 	 */
// 	public IClassificationResult<TimeType> classify(IClassifyAlgorithm<TimeType,NodeType> algorithm, ITrajectory<TimeType> trajectory) throws Exception;
// 	
// 	/**
// 	 * Classify a trajectory.
// 	 * 
// 	 * @param algorithm classification algorithm
// 	 * @param trajectory input trajectory
// 	 * @param samplingInterval sampling interval to define a more granularity output trajectory
// 	 * @return classification results
// 	 * @throws Exception in case of errors
// 	 */
// 	public IClassificationResult<TimeType> classify(IClassifyAlgorithm<TimeType,NodeType> algorithm, ITrajectory<TimeType> trajectory, TimeType samplingInterval) throws Exception;
// 	
// 	/**
// 	 * Classify a trajectory.
// 	 * 
// 	 * @param algorithm classification algorithm
// 	 * @param trajectory input trajectory
// 	 * @param timeStream sequence of time interval in which calculate the probability distribution of the class
// 	 * @return classification results
// 	 * @throws Exception in case of errors
// 	 */
// 	public IClassificationResult<TimeType> classify(IClassifyAlgorithm<TimeType,NodeType> algorithm, ITrajectory<TimeType> trajectory, Vector<TimeType> timeStream) throws Exception;
// }
// 
// Path: CTBNCToolkit/IClassificationResult.java
// public interface IClassificationResult<TimeType extends Number> extends ITrajectory<TimeType>{
// 
// 	/**
// 	 * Set the class name of the trajectory.
// 	 * 
// 	 * @param className the name of the class (a state of the class variable)
// 	 */
// 	public void setClassification(String className);
// 	
// 	/**
// 	 * Return the class of the trajectory.
// 	 * 
// 	 * @return the classification of the trajectory
// 	 */
// 	public String getClassification();
// 	
// 	/**
// 	 * Set the probability distribution for each
// 	 * state of the class node in the given transition
// 	 * time.
// 	 * 
// 	 * @param iTransition index of the transition
// 	 * @param p the probability distribution
// 	 * @param stateToIndex the mapping between the state name and the index for the probability
// 	 * @throws IllegalArgumentException in case of illegal arguments
// 	 */
// 	public void setProbability(int iTransition, double[] p, Map<String,Integer> stateToIndex) throws IllegalArgumentException;
// 	
// 	/**
// 	 * Return the probability distribution at
// 	 * a specific transition.
// 	 *  
// 	 * @param iTransition index of the transition
// 	 * @return probability distribution for each class
// 	 * @throws IllegalArgumentException in case of error
// 	 */
// 	public double[] getPDistribution(int iTransition) throws IllegalArgumentException;
// 	
// 	/**
// 	 * Return the probability distribution of
// 	 * the trajectory.
// 	 *  
// 	 * @return probability distribution for each class given the complete trajectory
// 	 */
// 	public double[] getPDistribution();
// 	
// 	/**
// 	 * Return the probability for the required
// 	 * couple of transition and class state.
// 	 * Null if it is not set.
// 	 * 
// 	 * @param iTransition index of the transition
// 	 * @param classStateName class state who get the probability
// 	 * @return probability of the state at that transition time
// 	 * @throws IllegalArgumentException in case of error
// 	 */
// 	public Double getProbability(int iTransition, String classStateName) throws IllegalArgumentException;
// 	
// 	/**
// 	 * Return the probability for the required
// 	 * class state.
// 	 * Null if it is not set.
// 	 * 
// 	 * @param classStateName class state who get the probability
// 	 * @return probability of the state
// 	 * @throws IllegalArgumentException in case of error
// 	 */
// 	public Double getProbability(String classStateName) throws IllegalArgumentException;
// 	
// 	/**
// 	 * Print the result.
// 	 * 
// 	 * @return string that summarize the result
// 	 */
// 	public String resultToString();
// }


import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import CTBNCToolkit.ICTClassifier;
import CTBNCToolkit.IClassificationResult;
	}
	
	/* (non-Javadoc)
	 * @see CTBNToolkit.performances.IPerformances#setLearningTime(double)
	 */
	@Override
	public void setLearningTime(double time) throws RuntimeException {

		throw new RuntimeException("Method do no implemented in MicroAvgExternalClusteringAggregatePerformances class");	
	}
	
	/* (non-Javadoc)
	 * @see CTBNToolkit.performances.IPerformances#getInferenceTimes()
	 */
	@Override
	public List<Double> getInferenceTimes() {
		
		List<Double> infTimes = new LinkedList<Double>();
		for( int i = 0; i < this.performances.size(); ++i)
			infTimes.addAll( this.performances.get(i).getInferenceTimes());
		
		return infTimes;
	}
	
	/* (non-Javadoc)
	 * @see CTBNToolkit.performances.IPerformances#getResultsTrajectories()
	 */
	@Override
	public List<IClassificationResult<TimeType>> getResultsTrajectories() {
		
// Path: CTBNCToolkit/ICTClassifier.java
// public interface ICTClassifier<TimeType extends Number & Comparable<TimeType>, NodeType extends INode> extends IModel<TimeType,NodeType>{
// 
// 	/**
// 	 * Return the classification node.
// 	 * Null if it is not defined.
// 	 * 
// 	 * @return classification node
// 	 */
// 	public DiscreteNode getClassNode();
// 	
// 	/**
// 	 * Classify a trajectory.
// 	 * 
// 	 * @param algorithm classification algorithm
// 	 * @param trajectory input trajectory
// 	 * @return classification results
// 	 * @throws Exception in case of errors
// 	 */
// 	public IClassificationResult<TimeType> classify(IClassifyAlgorithm<TimeType,NodeType> algorithm, ITrajectory<TimeType> trajectory) throws Exception;
// 	
// 	/**
// 	 * Classify a trajectory.
// 	 * 
// 	 * @param algorithm classification algorithm
// 	 * @param trajectory input trajectory
// 	 * @param samplingInterval sampling interval to define a more granularity output trajectory
// 	 * @return classification results
// 	 * @throws Exception in case of errors
// 	 */
// 	public IClassificationResult<TimeType> classify(IClassifyAlgorithm<TimeType,NodeType> algorithm, ITrajectory<TimeType> trajectory, TimeType samplingInterval) throws Exception;
// 	
// 	/**
// 	 * Classify a trajectory.
// 	 * 
// 	 * @param algorithm classification algorithm
// 	 * @param trajectory input trajectory
// 	 * @param timeStream sequence of time interval in which calculate the probability distribution of the class
// 	 * @return classification results
// 	 * @throws Exception in case of errors
// 	 */
// 	public IClassificationResult<TimeType> classify(IClassifyAlgorithm<TimeType,NodeType> algorithm, ITrajectory<TimeType> trajectory, Vector<TimeType> timeStream) throws Exception;
// }
// 
// Path: CTBNCToolkit/IClassificationResult.java
// public interface IClassificationResult<TimeType extends Number> extends ITrajectory<TimeType>{
// 
// 	/**
// 	 * Set the class name of the trajectory.
// 	 * 
// 	 * @param className the name of the class (a state of the class variable)
// 	 */
// 	public void setClassification(String className);
// 	
// 	/**
// 	 * Return the class of the trajectory.
// 	 * 
// 	 * @return the classification of the trajectory
// 	 */
// 	public String getClassification();
// 	
// 	/**
// 	 * Set the probability distribution for each
// 	 * state of the class node in the given transition
// 	 * time.
// 	 * 
// 	 * @param iTransition index of the transition
// 	 * @param p the probability distribution
// 	 * @param stateToIndex the mapping between the state name and the index for the probability
// 	 * @throws IllegalArgumentException in case of illegal arguments
// 	 */
// 	public void setProbability(int iTransition, double[] p, Map<String,Integer> stateToIndex) throws IllegalArgumentException;
// 	
// 	/**
// 	 * Return the probability distribution at
// 	 * a specific transition.
// 	 *  
// 	 * @param iTransition index of the transition
// 	 * @return probability distribution for each class
// 	 * @throws IllegalArgumentException in case of error
// 	 */
// 	public double[] getPDistribution(int iTransition) throws IllegalArgumentException;
// 	
// 	/**
// 	 * Return the probability distribution of
// 	 * the trajectory.
// 	 *  
// 	 * @return probability distribution for each class given the complete trajectory
// 	 */
// 	public double[] getPDistribution();
// 	
// 	/**
// 	 * Return the probability for the required
// 	 * couple of transition and class state.
// 	 * Null if it is not set.
// 	 * 
// 	 * @param iTransition index of the transition
// 	 * @param classStateName class state who get the probability
// 	 * @return probability of the state at that transition time
// 	 * @throws IllegalArgumentException in case of error
// 	 */
// 	public Double getProbability(int iTransition, String classStateName) throws IllegalArgumentException;
// 	
// 	/**
// 	 * Return the probability for the required
// 	 * class state.
// 	 * Null if it is not set.
// 	 * 
// 	 * @param classStateName class state who get the probability
// 	 * @return probability of the state
// 	 * @throws IllegalArgumentException in case of error
// 	 */
// 	public Double getProbability(String classStateName) throws IllegalArgumentException;
// 	
// 	/**
// 	 * Print the result.
// 	 * 
// 	 * @return string that summarize the result
// 	 */
// 	public String resultToString();
// }


// Path: CTBNCToolkit/performances/MicroAvgExternalClusteringAggregatePerformances.java
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import CTBNCToolkit.ICTClassifier;
import CTBNCToolkit.IClassificationResult;

	}
	
	/* (non-Javadoc)
	 * @see CTBNToolkit.performances.IPerformances#setLearningTime(double)
	 */
	@Override
	public void setLearningTime(double time) throws RuntimeException {

		throw new RuntimeException("Method do no implemented in MicroAvgExternalClusteringAggregatePerformances class");	
	}
	
	/* (non-Javadoc)
	 * @see CTBNToolkit.performances.IPerformances#getInferenceTimes()
	 */
	@Override
	public List<Double> getInferenceTimes() {
		
		List<Double> infTimes = new LinkedList<Double>();
		for( int i = 0; i < this.performances.size(); ++i)
			infTimes.addAll( this.performances.get(i).getInferenceTimes());
		
		return infTimes;
	}
	
	/* (non-Javadoc)
	 * @see CTBNToolkit.performances.IPerformances#getResultsTrajectories()
	 */
	@Override
	public List<IClassificationResult<TimeType>> getResultsTrajectories() {
		
		List<IClassificationResult<TimeType>> resultsTrj = new LinkedList<IClassificationResult<TimeType>>();