ArffOps.h 791 B

1234567891011121314151617181920212223242526
  1. // ArffOps.h
  2. #ifndef __ARFFOPS_H__
  3. #define __ARFFOPS_H__
  4. #include "Arff.h"
  5. #include <vector>
  6. class ArffOps
  7. {
  8. public:
  9. static void MajorityVote(Arff *pArff, const char *attributeName, vector<unsigned int> attIds);
  10. ///< Add a columns at the end with the provided name and populates it
  11. ///< based on the majority vote of the provided columns (time, x, y excluded)
  12. ///< if they exist. Attribute values of 0 do not contribute in the vote.
  13. static void MajorityVote(Arff *pArff, const char *attributeName);
  14. ///< Overload function. Returns vote considering all columns.
  15. static void MajorityVote(Arff *pArff, const char *attributeName, unsigned int startId, unsigned int endId);
  16. ///< Overload function. Returns vote for given range.
  17. };
  18. #endif /*__ARFFOPS_H__*/