00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MARSYAS_COLLECTION_H
00020 #define MARSYAS_COLLECTION_H
00021
00022 #include <string>
00023 #include <vector>
00024 #include <iostream>
00025 #include <fstream>
00026 #include <sstream>
00027 #include "common_header.h"
00028
00029
00030 namespace Marsyas
00031 {
00040 class marsyas_EXPORT Collection
00041 {
00042 private:
00043 std::vector<std::string> collectionList_;
00044 std::vector<std::string> labelList_;
00045 std::vector<std::string> labelNames_;
00046 std::string name_;
00047 bool hasLabels_;
00048 bool store_labels_;
00049
00050 public:
00051 Collection();
00052 ~Collection();
00053 size_t size();
00054 void setName(std::string name);
00055 std::string entry(unsigned int i);
00056 std::string labelEntry(unsigned int i);
00057 size_t getSize();
00058 mrs_natural getNumLabels();
00059 mrs_string getLabelNames();
00060 mrs_natural labelNum(mrs_string label);
00061 mrs_string labelName(mrs_natural i);
00062 mrs_bool hasLabels();
00063 void add(std::string entry);
00064 void add(std::string entry, std::string label);
00065 std::string name();
00066 void shuffle();
00067 void read(std::string filename);
00068 void write(std::string filename);
00069 void labelAll(std::string label);
00070 std::string toLongString();
00071 void concatenate(std::vector<Collection> cls);
00072 void clear();
00073 void store_labels(mrs_bool store);
00074 mrs_real regression_label(mrs_natural cindex);
00075
00076 marsyas_EXPORT friend std::ostream& operator<<(std::ostream&, const Collection&);
00077 marsyas_EXPORT friend std::istream& operator>>(std::istream&, Collection&);
00078 };
00079
00080 }
00081
00082 #endif