Mercurial > hg > multitrack-audio-matcher
view annotationCalculatorSrc/BeatAnnotationReader.h @ 46:ba36a1721538
Added abs median calculation, match forwards and backwards paths
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Tue, 08 May 2012 23:16:00 +0100 |
parents | d23685b9e766 |
children |
line wrap: on
line source
/* * BeatAnnotationReader.h * annotationResultCalculator * * Created by Andrew on 03/05/2012. * Copyright 2012 QMUL. All rights reserved. * */ #ifndef BEAT_ANNOTATION_READER #define BEAT_ANNOTATION_READER #include "ofMain.h" // basic file operations for text file stuff #include <iostream> #include <fstream> using namespace std; class BeatAnnotationReader{ public: typedef std::vector<double> DoubleVector; DoubleVector beatTimes; DoubleVector errors; DoubleVector absoluteErrors; typedef std::vector<DoubleVector> DoubleMatrix; DoubleMatrix alignmentTimes; void readInBeatsFile(std::string& pathName); void printBeatTimes(); void readInMultiAlignmentFile(std::string pathName); // typedef vector<DoubleVector> DoubleMatrix; double calculateMedianError(const DoubleVector& liveBeatTimes, const DoubleVector& groundTruthAlignment); double calculateMedianError(const DoubleVector& liveBeatTimes, const DoubleVector& groundTruthAlignment, const DoubleVector& alignmentLiveTimes, const DoubleVector& alignmentRehearsalTimes); //double getAlignmentErrorAtTime(const double& liveTime); }; #endif