Revision 34:3fb9c657d86b NoteHypothesis.h

View differences:

NoteHypothesis.h
52 52
        Estimate() : freq(0), time(), confidence(0) { }
53 53
        Estimate(double _f, RealTime _t, double _c) :
54 54
            freq(_f), time(_t), confidence(_c) { }
55
        bool operator==(const Estimate &e) const {
56
            return e.freq == freq && e.time == time && e.confidence == confidence;
57
        }
55 58
	double freq;
56 59
	RealTime time;
57 60
	double confidence;
......
82 85
        Note() : freq(0), time(), duration() { }
83 86
        Note(double _f, RealTime _t, RealTime _d) :
84 87
            freq(_f), time(_t), duration(_d) { }
88
        bool operator==(const Note &e) const {
89
            return e.freq == freq && e.time == time && e.duration == duration;
90
        }
85 91
	double freq;
86 92
	RealTime time;
87 93
	RealTime duration;
88 94
    };
89 95
    
90 96
    /**
97
     * Return the mean frequency of the accepted estimates
98
     */
99
    double getMeanFrequency() const;
100

  
101
    /**
91 102
     * Return a single note roughly matching this hypothesis
92 103
     */
93 104
    Note getAveragedNote() const;
......
96 107
    bool isWithinTolerance(Estimate) const;
97 108
    bool isOutOfDateFor(Estimate) const;
98 109
    bool isSatisfied() const;
99
    double getMeanFrequency() const;
100 110
    
101 111
    State m_state;
102 112
    Estimates m_pending;

Also available in: Unified diff