stats.h

来自「用data miming技术进行false prediction」· C头文件 代码 · 共 38 行

H
38
字号
#ifndef STATS_H
#define STATS_H

#include <string>
#include <fstream>

using namespace std;

class Stats {
    friend ostream& operator<<(ostream& os, const Stats& rec);

    public:
        Stats(int mTBF, float probability);

        virtual ~Stats() {};

        bool operator<(const Stats& anotherStats) const;

        int getTBF() const;
        float getProbability() const;

        Stats(){};

    private:
        int mTBF;
        float mProbability;

};

inline ostream& operator<<(ostream& os, const Stats& rec) {
    os << rec.getTBF() << " " << rec.getProbability();

    return os;
};

#endif /* STATS_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?