/**
* DummyAgg
* Created for the ISMIR 2006 jAudio release
* stub aggregator for testing purposes
*/
package org.vocvark.Aggregators;
import org.vocvark.AudioFeatures.FeatureExtractor;
import org.vocvark.AudioFeatures.FeatureExtractorBaseImpl;
import org.vocvark.DataTypes.FeatureDefinition;
/**
* <h2>DummyAgg</h2>
* Dummy aggregator for testing aggregator loading.
*
* @author Daniel McEnnis
*/
public class DummyAgg extends AggregatorBaseImpl implements Aggregator {
public int[] featureIndex = null;
public FeatureExtractor[] featureName = null;
public FeatureExtractorBaseImpl[] presetFeature = null;
public double[][][] data = null;
public DummyAgg() {
presetFeature = null;
}
public DummyAgg(FeatureExtractorBaseImpl[] f) {
presetFeature = f;
}
@Override
public void aggregate(double[][][] values) {
data = values;
}
@Override
public Aggregator clone() {
return new DummyAgg();
}
@Override
public FeatureDefinition getFeatureDefinition() {
return definition;
}
@Override
public void init(int[] featureIndecis) throws Exception {
featureIndex = featureIndecis;
}
@Override
public void setSource(FeatureExtractor feature) {
definition = new FeatureDefinition(
feature.getFeatureDefinition().name + "/DUMMY", feature
.getFeatureDefinition().name
+ "/DUMMY",
feature.getFeatureDefinition().is_sequential, feature
.getFeatureDefinition().dimensions);
}
@Override
public String[] getFeaturesToApply() {
String[] ret = new String[presetFeature.length];
for (int i = 0; i < ret.length; ++i) {
ret[i] = presetFeature[i].getFeatureDefinition().name;
}
return ret;
}
}