BinManager { public final String[] getResultFeatureNames() { if (hasPostProcessor()) { return getPostProcessFeatureNames(); } else { return getOutputFeatureNames(); } } BinManager();  BinManager(VariableContext variableContext, Aggregator... aggregators);  BinManager(VariableContext variableContext, CellProcessorConfig cellProcessorConfig, Aggregator... aggregators); final VariableContext getVariableContext(); final int getSpatialFeatureCount(); final int getTemporalFeatureCount(); final int getOutputFeatureCount(); final String[] getSpatialFeatureNames(); final String[] getTemporalFeatureNames(); final int getPostProcessFeatureCount(); final String[] getOutputFeatureNames(); final String[] getPostProcessFeatureNames(); final int getResultFeatureCount(); final String[] getResultFeatureNames(); final int getAggregatorCount(); final Aggregator getAggregator(int aggIndex); final Vector getSpatialVector(SpatialBin bin, int aggIndex); final Vector getTemporalVector(TemporalBin bin, int aggIndex); WritableVector createOutputVector(); SpatialBin createSpatialBin(long binIndex); void aggregateSpatialBin(Observation observation, SpatialBin spatialBin); void completeSpatialBin(SpatialBin spatialBin); TemporalBin createTemporalBin(long binIndex); TemporalBin createTemporalBin(long binIndex, Iterable<? extends SpatialBin> spatialBins); void aggregateTemporalBin(SpatialBin inputBin, TemporalBin outputBin); void aggregateTemporalBin(TemporalBin inputBin, TemporalBin outputBin); void completeTemporalBin(TemporalBin temporalBin); TemporalBin createOutputBin(long binIndex); void computeOutput(TemporalBin temporalBin, WritableVector outputVector); boolean hasPostProcessor(); TemporalBin createProcessBin(long binIndex); void postProcess(Vector outputVector, WritableVector postVector); void setBinTracer(BinTracer binTracer); BinTracer getBinTracer();  }
@Test public void testGetResultFeatureNames_withPostProcessor() { final VariableContext variableContext = createVariableContext(); final FeatureSelection.Config ppSelection = new FeatureSelection.Config("out_min"); final BinManager binManager = new BinManager(variableContext, ppSelection, new AggregatorMinMax(variableContext, "e", "out")); final String[] resultFeatureNames = binManager.getResultFeatureNames(); assertEquals(1, resultFeatureNames.length); assertEquals("out_min", resultFeatureNames[0]); }
@Test public void testGetResultFeatureNames_noPostProcessor() { final VariableContext variableContext = createVariableContext(); final BinManager binManager = new BinManager(variableContext, new AggregatorAverage(variableContext, "d", 0.0)); final String[] resultFeatureNames = binManager.getResultFeatureNames(); assertEquals(2, resultFeatureNames.length); assertEquals("d_mean", resultFeatureNames[0]); assertEquals("d_sigma", resultFeatureNames[1]); }