Beispiel #1
0
void IMM::load(istream &is)
{
  int numModels, numElements;
  BOOM::String str, pStr;
  ContentType contentType;
  
  is >> contentType >> N >> phase >> numModels;
  setContentType(contentType);

  for(int i=0 ; i<numModels ; ++i)
    {
      models->push_back(new BOOM::StringMap<double>(hashTableSize(N)));
      BOOM::StringMap<double> &model=*(*models)[i];
      is >> numElements;
      for(int j=0 ; j<numElements ; ++j)
	{
	  is >> str >> pStr;
	  model.lookup(str.c_str(),str.length())=pStr.asDouble();
	}
    }

  if(getStrand()==FORWARD_STRAND)
    {
      BOOM::String modelType;
      is >> modelType;
      revComp=new IMM(is,REVERSE_STRAND);
      revComp->revComp=this;
    }
Beispiel #2
0
int main(int argc, char *argv[]) {
    FILE *book;
    list *linked_list;
    linked_list = NULL;

    list *hash_table[10000];
    list **hashtable = hash_table; //initialises the hash table.
    for (int i = 0; i < 10000; i++) {
        hash_table[i] = NULL;
    }

    createHashTable(book, hashtable, argv);
    linked_list = createLinkedList(book, linked_list, argv);
    hashTableEffiency(hashtable);
    hashTableSize(hashtable);
    querying(linked_list, hashtable, argv);
    return 0;
}