MCPcopy Create free account
hub / github.com/biometrics/openbr / storeModel

Function storeModel

openbr/plugins/classification/liblinear.cpp:15–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13{
14
15static void storeModel(const model &m, QDataStream &stream)
16{
17 // Create local file
18 QTemporaryFile tempFile;
19 tempFile.open();
20 tempFile.close();
21
22 // Save MLP to local file
23 save_model(qPrintable(tempFile.fileName()),&m);
24
25 // Copy local file contents to stream
26 tempFile.open();
27 QByteArray data = tempFile.readAll();
28 tempFile.close();
29 stream << data;
30}
31
32static void loadModel(model &m, QDataStream &stream)
33{

Callers 6

storeFunction · 0.85
BR_PROPERTYMethod · 0.85
storeMethod · 0.85
storeMethod · 0.85
storeMethod · 0.85
BR_PROPERTYMethod · 0.85

Calls 2

openMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected