Exemplo n.º 1
0
    void LSH_DFE::fit(){
        srand(0);
        
        init_data_structure();
        
        prepare();
        lsh_main_function();
        release();

    }
Exemplo n.º 2
0
  void Forwarder::read_seq_directory(const std::string &dirname, const size_t alphabet_size, std::vector<size_t> &nStatesSave, const size_t min_no_eval) {
    std::vector<std::vector<unsigned> > sequences;
    DIR *dir;
    struct dirent *ent;
    std::string suffix = ".seq";

    if ((dir = opendir (dirname.c_str())) != NULL) {
      while ((ent = readdir (dir)) != NULL) {
	std::string filename = ent->d_name;
	if(filename.size() >= suffix.size() && filename.compare(filename.size() - suffix.size(), suffix.size(), suffix) == 0) {
	  std::string path = dirname + "/" + filename;
	  std::vector<unsigned> sequence;
	  zipHMM::readSeq(sequence, path);
	  sequences.push_back(sequence);
	}
      }
      closedir (dir);
    } else {
      /* could not open directory */
      perror ("could not open directory");
    }

    init_data_structure(sequences, alphabet_size, nStatesSave, min_no_eval);
  }
Exemplo n.º 3
0
 void Forwarder::read_seq(const std::string &seq_filename, const size_t alphabet_size, std::vector<size_t> &nStatesSave, const size_t min_no_eval) {
   std::vector<std::vector<unsigned> > sequences;
   sequences.push_back(std::vector<unsigned>());
   readSeq(sequences[0], seq_filename);
   init_data_structure(sequences, alphabet_size, nStatesSave, min_no_eval);
 }