#include "meanvarestim.h" #include "toimanager.h" #include "slinparbuff.h" MeanVarEstimator::MeanVarEstimator(int n) { nsamples = n; } void MeanVarEstimator::init() { declareInput("signal"); declareOutput("mean"); declareOutput("variance"); name = "MeanEstimator"; neededHistory = nsamples; } void MeanVarEstimator::run() { int snb = getMinIn(); int sne = getMaxIn(); cout << "MeanVarEstimator -- " << snb << " to " << sne << endl; bool hasMean = checkOutputTOIIndex(0); bool hasVar = checkOutputTOIIndex(1); if (snb>sne) { cout<<"MeanVarEstimator::run() - Bad sample interval"<