MCPcopy Create free account
hub / github.com/creatale/node-dv / WriteFeature

Function WriteFeature

deps/tesseract/classify/ocrfeatures.cpp:191–199  ·  view source on GitHub ↗

* Appends a textual representation of Feature to str. * This representation is simply a list of the N parameters * of the feature, terminated with a newline. It is assumed * that the ExtraPenalty field can be reconstructed from the * parameters of the feature. It is also assumed that the * feature type information is specified or assumed elsewhere. * @param Feature feature to write out to

Source from the content-addressed store, hash-verified

189 * @note History: Wed May 23 09:28:18 1990, DSJ, Created.
190 */
191void WriteFeature(FEATURE Feature, STRING* str) {
192 for (int i = 0; i < Feature->Type->NumParams; i++) {
193#ifndef WIN32
194 assert(!isnan(Feature->Params[i]));
195#endif
196 str->add_str_double(" ", Feature->Params[i]);
197 }
198 *str += "\n";
199} /* WriteFeature */
200
201/**
202 * Write a textual representation of FeatureSet to File.

Callers 1

WriteFeatureSetFunction · 0.85

Calls 2

isnanFunction · 0.85
add_str_doubleMethod · 0.80

Tested by

no test coverage detected