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

Function ConvertConfig

deps/tesseract/classify/intproto.cpp:487–501  ·  view source on GitHub ↗

* This operation updates the config vectors of all protos * in Class to indicate that the protos with 1's in Config * belong to a new configuration identified by ConfigId. * It is assumed that the length of the Config bit vector is * equal to the number of protos in Class. * @param Config config to be added to class * @param ConfigId id to be used for new config * @param Class class t

Source from the content-addressed store, hash-verified

485 * @note History: Mon Feb 11 14:57:31 1991, DSJ, Created.
486 */
487void ConvertConfig(BIT_VECTOR Config, int ConfigId, INT_CLASS Class) {
488 int ProtoId;
489 INT_PROTO Proto;
490 int TotalLength;
491
492 for (ProtoId = 0, TotalLength = 0;
493 ProtoId < Class->NumProtos; ProtoId++) {
494 if (test_bit(Config, ProtoId)) {
495 Proto = ProtoForProtoId(Class, ProtoId);
496 SET_BIT(Proto->Configs, ConfigId);
497 TotalLength += Class->ProtoLengths[ProtoId];
498 }
499 }
500 Class->ConfigLengths[ConfigId] = TotalLength;
501} /* ConvertConfig */
502
503
504namespace tesseract {

Callers 3

InitAdaptedClassMethod · 0.85
CreateIntTemplatesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected