@Test
	public void testMacroGetLearningTime() {
		
		Map<Integer, String> indexToState = new TreeMap<Integer,String>(); indexToState.put(0, "s1"); indexToState.put(1, "s2");  indexToState.put(2, "s3");
		Map<Integer, String> indexToStateAgg = new TreeMap<Integer,String>(); indexToStateAgg.put(2, "s1"); indexToStateAgg.put(0, "s2");  indexToStateAgg.put(1, "s3");
		Map<String, Integer> StateToIndexAgg = new TreeMap<String, Integer>(); StateToIndexAgg.put("s1", 2); StateToIndexAgg.put("s2", 0);  StateToIndexAgg.put("s3", 1);
		
		ClassificationStandardPerformances<Double> performances1 = new ClassificationStandardPerformances<Double>(indexToState);
		performances1.setLearningTime(0.5);
		performances1.addResults(generateDataset1());
		ClassificationStandardPerformances<Double> performances2 = new ClassificationStandardPerformances<Double>(indexToState);
		performances2.setLearningTime(0.75);
		performances2.addResults(generateDataset2());
		ClassificationStandardPerformances<Double> performances3 = new ClassificationStandardPerformances<Double>(indexToState);
		performances3.setLearningTime(1.0);
		performances3.addResults(generateDataset1());
		ClassificationStandardPerformances<Double> performances4 = new ClassificationStandardPerformances<Double>(indexToState);
		performances4.addResults(generateDataset2());
		
		MicroMacroClassificationPerformances<Double,ClassificationStandardPerformances<Double>> aggPerformances = new MicroMacroClassificationPerformances<Double,ClassificationStandardPerformances<Double>>(indexToStateAgg);
		aggPerformances.setMicroFlag(false);
		
		assertTrue( Double.isNaN( aggPerformances.getLearningTime()));
		assertTrue( Double.isNaN( aggPerformances.getVarianceLearningTime()));
		
		aggPerformances.addPerformances(performances1);
		assertTrue( this.doublesEqual( aggPerformances.getLearningTime(), 0.5));
		assertTrue( this.doublesEqual( aggPerformances.getVarianceLearningTime(), 0.0));
		
		aggPerformances.addPerformances(performances2);
		assertTrue( this.doublesEqual( aggPerformances.getLearningTime(), 0.625));
		assertTrue( this.doublesEqual( aggPerformances.getVarianceLearningTime(), Math.pow(0.125,2)));
		
		aggPerformances.addPerformances(performances3);
		assertTrue( this.doublesEqual( aggPerformances.getLearningTime(), 0.75));
		assertTrue( this.doublesEqual( aggPerformances.getVarianceLearningTime(), 2*Math.pow(0.25,2)/3.0));
	
		aggPerformances.addPerformances(performances4);
		assertTrue( Double.isNaN( aggPerformances.getLearningTime()));
		assertTrue( Double.isNaN( aggPerformances.getVarianceLearningTime()));
		
	}