All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ScratchEvidence Struct Reference

#include <intmatcher.h>

Public Member Functions

void Clear (const INT_CLASS class_template)
 
void ClearFeatureEvidence (const INT_CLASS class_template)
 
void NormalizeSums (INT_CLASS ClassTemplate, inT16 NumFeatures, inT32 used_features)
 
void UpdateSumOfProtoEvidences (INT_CLASS ClassTemplate, BIT_VECTOR ConfigMask, inT16 NumFeatures)
 

Public Attributes

uinT8 feature_evidence_ [MAX_NUM_CONFIGS]
 
int sum_feature_evidence_ [MAX_NUM_CONFIGS]
 
uinT8 proto_evidence_ [MAX_NUM_PROTOS][MAX_PROTO_INDEX]
 

Detailed Description

Definition at line 69 of file intmatcher.h.

Member Function Documentation

void ScratchEvidence::Clear ( const INT_CLASS  class_template)

Definition at line 708 of file intmatcher.cpp.

708  {
709  memset(sum_feature_evidence_, 0,
710  class_template->NumConfigs * sizeof(sum_feature_evidence_[0]));
711  memset(proto_evidence_, 0,
712  class_template->NumProtos * sizeof(proto_evidence_[0]));
713 }
uinT8 proto_evidence_[MAX_NUM_PROTOS][MAX_PROTO_INDEX]
Definition: intmatcher.h:72
int sum_feature_evidence_[MAX_NUM_CONFIGS]
Definition: intmatcher.h:71
uinT8 NumConfigs
Definition: intproto.h:110
uinT16 NumProtos
Definition: intproto.h:108
void ScratchEvidence::ClearFeatureEvidence ( const INT_CLASS  class_template)

Definition at line 715 of file intmatcher.cpp.

715  {
716  memset(feature_evidence_, 0,
717  class_template->NumConfigs * sizeof(feature_evidence_[0]));
718 }
uinT8 feature_evidence_[MAX_NUM_CONFIGS]
Definition: intmatcher.h:70
uinT8 NumConfigs
Definition: intproto.h:110
void ScratchEvidence::NormalizeSums ( INT_CLASS  ClassTemplate,
inT16  NumFeatures,
inT32  used_features 
)

Normalize Sum of Proto and Feature Evidence by dividing by the sum of the Feature Lengths and the Proto Lengths for each configuration.

Definition at line 1174 of file intmatcher.cpp.

1175  {
1176 
1177  for (int i = 0; i < ClassTemplate->NumConfigs; i++) {
1179  (NumFeatures + ClassTemplate->ConfigLengths[i]);
1180  }
1181 }
uinT16 ConfigLengths[MAX_NUM_CONFIGS]
Definition: intproto.h:113
int sum_feature_evidence_[MAX_NUM_CONFIGS]
Definition: intmatcher.h:71
uinT8 NumConfigs
Definition: intproto.h:110
void ScratchEvidence::UpdateSumOfProtoEvidences ( INT_CLASS  ClassTemplate,
BIT_VECTOR  ConfigMask,
inT16  NumFeatures 
)

Add sum of Proto Evidences into Sum Of Feature Evidence Array

Definition at line 1131 of file intmatcher.cpp.

1132  {
1133 
1134  int *IntPointer;
1135  uinT32 ConfigWord;
1136  int ProtoSetIndex;
1137  uinT16 ProtoNum;
1138  PROTO_SET ProtoSet;
1139  int NumProtos;
1140  uinT16 ActualProtoNum;
1141 
1142  NumProtos = ClassTemplate->NumProtos;
1143 
1144  for (ProtoSetIndex = 0; ProtoSetIndex < ClassTemplate->NumProtoSets;
1145  ProtoSetIndex++) {
1146  ProtoSet = ClassTemplate->ProtoSets[ProtoSetIndex];
1147  ActualProtoNum = (ProtoSetIndex * PROTOS_PER_PROTO_SET);
1148  for (ProtoNum = 0;
1149  ((ProtoNum < PROTOS_PER_PROTO_SET) && (ActualProtoNum < NumProtos));
1150  ProtoNum++, ActualProtoNum++) {
1151  int temp = 0;
1152  for (int i = 0; i < ClassTemplate->ProtoLengths[ActualProtoNum]; i++)
1153  temp += proto_evidence_[ActualProtoNum] [i];
1154 
1155  ConfigWord = ProtoSet->Protos[ProtoNum].Configs[0];
1156  ConfigWord &= *ConfigMask;
1157  IntPointer = sum_feature_evidence_;
1158  while (ConfigWord) {
1159  if (ConfigWord & 1)
1160  *IntPointer += temp;
1161  IntPointer++;
1162  ConfigWord >>= 1;
1163  }
1164  }
1165  }
1166 }
INT_PROTO_STRUCT Protos[PROTOS_PER_PROTO_SET]
Definition: intproto.h:97
uinT8 proto_evidence_[MAX_NUM_PROTOS][MAX_PROTO_INDEX]
Definition: intmatcher.h:72
PROTO_SET ProtoSets[MAX_NUM_PROTO_SETS]
Definition: intproto.h:111
unsigned int uinT32
Definition: host.h:103
int sum_feature_evidence_[MAX_NUM_CONFIGS]
Definition: intmatcher.h:71
uinT8 NumProtoSets
Definition: intproto.h:109
#define PROTOS_PER_PROTO_SET
Definition: intproto.h:48
uinT8 * ProtoLengths
Definition: intproto.h:112
uinT16 NumProtos
Definition: intproto.h:108
uinT32 Configs[WERDS_PER_CONFIG_VEC]
Definition: intproto.h:86
unsigned short uinT16
Definition: host.h:101

Member Data Documentation

uinT8 ScratchEvidence::feature_evidence_[MAX_NUM_CONFIGS]

Definition at line 70 of file intmatcher.h.

uinT8 ScratchEvidence::proto_evidence_[MAX_NUM_PROTOS][MAX_PROTO_INDEX]

Definition at line 72 of file intmatcher.h.

int ScratchEvidence::sum_feature_evidence_[MAX_NUM_CONFIGS]

Definition at line 71 of file intmatcher.h.


The documentation for this struct was generated from the following files: