void DataManager::setup(){ loadDataFile( "QLT_Genome_Data.xml" ); // selectDataStructureById( 4 ); mMainSpeed = 1; mBasePairCount = 0; }
void SimpleDataProvider::loadData(const std::string& fileName) { std::ifstream is(fileName); CHECK(is) << "Fail to open " << fileName; std::string line; while (is) { if (!getline(is, line)) break; LOG(INFO) << "load data file " << line; loadDataFile(line); } LOG(INFO) << "read done, num of instance=" << labels_.size() << " data size=" << data_.size(); }
void DecoderSingleTest::run( BeamSearchDecoder *decoder , FILE *archive_fd ) { clock_t start_time , end_time ; int start_index = 0 ; // The data file hasn't been loaded yet - load it loadDataFile( archive_fd ) ; // Now look at the type of data that was in the file and compare it with the // type expected by the phone set. if ( ((n_emission_probs == 0) && (phone_models->input_vecs_are_features == false)) || ((n_features == 0) && (phone_models->input_vecs_are_features == true)) ) { // We've got feature vectors (or nothing), but the phone_models is expecting // vectors of emission probabilities (or vice versa). error("DecoderSingleTest::run - datafile format does not agree with phone_models\n") ; } if ( (n_features != phone_models->n_features) && (n_emission_probs != phone_models->n_emission_probs) ) { error("DecoderSingleTest::run - input vector size does not agree with phone_models\n") ; } // If the input vectors are features and we are calculating emission probs // using an MLP, we need to initialise the context window of the MLP. if ( (phone_models->input_vecs_are_features == true) && (phone_models->mlp != NULL) ) start_index = phone_models->mlp->initContextWindow( decoder_input ) ; n_frames -= start_index ; // invoke the decoder start_time = clock() ; decoder->decode( decoder_input+start_index , n_frames , &n_actual_words , &actual_words , &actual_words_times ) ; end_time = clock() ; decode_time = (real)(end_time-start_time) / CLOCKS_PER_SEC ; // process the decoding result if ( remove_sent_marks == true ) removeSentMarksFromActual( decoder->vocabulary ) ; if ( output_result == true ) outputText( decoder->vocabulary ) ; // Free up some memory for( int i=0 ; i<(n_frames+start_index) ; i++ ) free( decoder_input[i] ) ; free( decoder_input ) ; decoder_input = NULL ; n_emission_probs = 0 ; n_features = 0 ; }
void loadPrevious() { if((cur_file_ptr)==0) { printf("Reach the front.\n"); return; } clearCur(); cur_file_ptr --; im = cvLoadImage(file_set[cur_file_ptr],1); loadDataFile(file_set[cur_file_ptr]); cur_point_ptr = 0; showImage(); curImage(); }
void loadNext() { if((cur_file_ptr+1)==file_set_cnt) { printf("Reach the last.\n"); return; } clearCur(); cur_file_ptr ++; im = cvLoadImage(file_set[cur_file_ptr],1); loadDataFile(file_set[cur_file_ptr]); cur_point_ptr =0 ; showImage(); curImage(); }
/* Loads data into structs */ void init(world_t * clarkson){ clarkson->allItems = malloc(sizeof(itemList_t)); clarkson->allItems->itemArray = NULL; clarkson->allItems->capacity = 0; clarkson->allItems->size = 0; /* This was a huge block of code, so I put it in load.h */ loadDataFile(clarkson); /* Initialize inventory */ clarkson->inventory = malloc(sizeof(itemList_t)); clarkson->inventory->itemArray = NULL; clarkson->inventory->capacity = 0; clarkson->inventory->size = 0; return; }
void QFRDRSettingsData::intReadData(QDomElement* e) { Q_UNUSED(e); // read data from the project XML file /* if (e) { QDomElement te=e->firstChildElement("mytag"); QString data=te.attribute("data"); } */ // now also load the data file(s) this record is linked to // an error is reported when no file is given! if (files.size()<=0) { setError(tr("there are no files in the %1 record!").arg(getName())); return; } loadDataFile(files[0]); }
void EvalMainWindow::onActionLoadCsvFile() { emit loadDataFile(DataFileLoaderMsgs::LoadableFileTypes::COMMA_SEPARATED_FILE); }
void EvalMainWindow::onActionLoadCsvClipboard() { emit loadDataFile(DataFileLoaderMsgs::LoadableFileTypes::COMMA_SEPARATED_CLIPBOARD); }
void EvalMainWindow::onActionLoadChemStationFile() { emit loadDataFile(DataFileLoaderMsgs::LoadableFileTypes::CHEMSTATION); }