Mercurial > hg > beatroot-vamp
diff Event.h @ 7:3c11becfc81a
Add tempo induction class as well
author | Chris Cannam |
---|---|
date | Tue, 27 Sep 2011 19:05:27 +0100 |
parents | 02d388f98c23 |
children | 0d4048bfadbb |
line wrap: on
line diff
--- a/Event.h Tue Sep 27 18:37:01 2011 +0100 +++ b/Event.h Tue Sep 27 19:05:27 2011 +0100 @@ -23,7 +23,15 @@ double beat; double salience; + Event() : time(0), beat(0), salience(0) { } Event(double t, double b, double s) : time(t), beat(b), salience(s) { } + + bool operator==(const Event &e) { + return (time == e.time && beat == e.beat && salience == e.salience); + } + bool operator!=(const Event &e) { + return !operator==(e); + } }; typedef std::vector<Event> EventList;