void Matricies::loadMatricies(string filename){ cout << "load matricies start\n"; string transFileName = filename + ".trans2"; string emissionFileName = filename + ".emit2"; ifstream transFile(transFileName.c_str()); ifstream emitFile(emissionFileName.c_str()); string name1, name2; double c; int index = 0; while (transFile >> name1 >> name2 >> c) { transition[index++] = c; } index = 0; while (emitFile >> name1 >> name2 >> c) { emission[index++] = c; } transFile.close(); emitFile.close(); cout << "load matricies end\n"; }
/** * Return a File object. */ void PhoneGapFile::actionGetFileMetadata(JSONMessage& message) { String callbackID = message.getParam("PhoneGapCallBackId"); String fullPath = message.getArgsField("fullPath"); char sizeBuf[64]; sprintf(sizeBuf, "%i", FileGetSize(fullPath)); String file = emitFile( FileGetName(fullPath), fullPath, FileGetMimeType(fullPath), FileGetDate(fullPath), sizeBuf); // Note that _castDate also casts a File object. callSuccess( callbackID, file, "window.localFileSystem._castDate"); }