Mercurial > hg > multitrack-audio-matcher
view annotationCalculatorSrc/Histogram.h @ 49:8df911733fdc
Added new histogram functions - absolute error graphs like Match paper
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Tue, 22 May 2012 22:53:44 +0100 |
parents | 5359e2c0b0fb |
children |
line wrap: on
line source
/* * Histogram.h * annotationResultCalculator * * Created by Andrew on 08/05/2012. * Copyright 2012 QMUL. All rights reserved. * */ #ifndef HISTOGRAM #define HISTOGRAM #include "ofMain.h" class Histogram{ public: Histogram(); typedef std::vector<double> DoubleVector; typedef std::vector<int> IntVector; IntVector histogram; void createHistogram(const int& binWidthIn, const int& numberofBinsIn); void createAbsoluteHistogram(const int& binWidthIn, const int& numberofBinsIn); void createAbsoluteHistogramForMatchData(); void processDataIntoHistogram(const DoubleVector& data); void plotHistogram(); void plotHistogram(const double& maxHeight); void setBinPoints(); void setBinPointsToMatchRange(); int numberofBins; int binWidth; double minimumBinValue, maximumBinValue; DoubleVector binPoints; double maximum; int numberOutsideRange; int getY(const int& y); int screenHeight; void labelHistogram(); void printHistogramPercentages(); }; #endif