annotate Event.h @ 37:1f175ae200a6 tip

Update RDF
author Chris Cannam
date Wed, 25 Jun 2014 13:48:49 +0100
parents 0d4048bfadbb
children
rev   line source
Chris@6 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@6 2
Chris@6 3 /*
Chris@6 4 Vamp feature extraction plugin for the BeatRoot beat tracker.
Chris@6 5
Chris@6 6 Centre for Digital Music, Queen Mary, University of London.
Chris@6 7 This file copyright 2011 Simon Dixon, Chris Cannam and QMUL.
Chris@6 8
Chris@6 9 This program is free software; you can redistribute it and/or
Chris@6 10 modify it under the terms of the GNU General Public License as
Chris@6 11 published by the Free Software Foundation; either version 2 of the
Chris@6 12 License, or (at your option) any later version. See the file
Chris@6 13 COPYING included with this distribution for more information.
Chris@6 14 */
Chris@6 15
Chris@6 16 #ifndef _EVENT_H_
Chris@6 17 #define _EVENT_H_
Chris@6 18
Chris@13 19 #include <list>
Chris@6 20
Chris@6 21 struct Event {
Chris@6 22 double time;
Chris@6 23 double beat;
Chris@6 24 double salience;
Chris@6 25
Chris@7 26 Event() : time(0), beat(0), salience(0) { }
Chris@6 27 Event(double t, double b, double s) : time(t), beat(b), salience(s) { }
Chris@7 28
Chris@7 29 bool operator==(const Event &e) {
Chris@7 30 return (time == e.time && beat == e.beat && salience == e.salience);
Chris@7 31 }
Chris@7 32 bool operator!=(const Event &e) {
Chris@7 33 return !operator==(e);
Chris@7 34 }
Chris@6 35 };
Chris@6 36
Chris@13 37 typedef std::list<Event> EventList;
Chris@6 38
Chris@6 39 #endif
Chris@6 40