annotate annotationCalculatorSrc/BeatAnnotationReader.h @ 56:4394c9490716 tip

minor changes
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Mon, 24 Dec 2012 18:58:39 +0000
parents ba36a1721538
children
rev   line source
andrew@43 1 /*
andrew@43 2 * BeatAnnotationReader.h
andrew@43 3 * annotationResultCalculator
andrew@43 4 *
andrew@43 5 * Created by Andrew on 03/05/2012.
andrew@43 6 * Copyright 2012 QMUL. All rights reserved.
andrew@43 7 *
andrew@43 8 */
andrew@43 9
andrew@43 10 #ifndef BEAT_ANNOTATION_READER
andrew@43 11 #define BEAT_ANNOTATION_READER
andrew@43 12
andrew@43 13 #include "ofMain.h"
andrew@43 14
andrew@43 15 // basic file operations for text file stuff
andrew@43 16 #include <iostream>
andrew@43 17 #include <fstream>
andrew@43 18 using namespace std;
andrew@43 19
andrew@43 20
andrew@43 21 class BeatAnnotationReader{
andrew@43 22 public:
andrew@43 23 typedef std::vector<double> DoubleVector;
andrew@43 24 DoubleVector beatTimes;
andrew@45 25 DoubleVector errors;
andrew@46 26 DoubleVector absoluteErrors;
andrew@43 27
andrew@43 28 typedef std::vector<DoubleVector> DoubleMatrix;
andrew@43 29 DoubleMatrix alignmentTimes;
andrew@43 30
andrew@43 31 void readInBeatsFile(std::string& pathName);
andrew@43 32 void printBeatTimes();
andrew@43 33
andrew@43 34 void readInMultiAlignmentFile(std::string pathName);
andrew@45 35
andrew@45 36
andrew@45 37 // typedef vector<DoubleVector> DoubleMatrix;
andrew@45 38 double calculateMedianError(const DoubleVector& liveBeatTimes, const DoubleVector& groundTruthAlignment);
andrew@45 39 double calculateMedianError(const DoubleVector& liveBeatTimes, const DoubleVector& groundTruthAlignment, const DoubleVector& alignmentLiveTimes, const DoubleVector& alignmentRehearsalTimes);
andrew@45 40
andrew@45 41 //double getAlignmentErrorAtTime(const double& liveTime);
andrew@43 42 };
andrew@43 43 #endif