Browse Source

git-svn-id: https://svn.microneil.com/svn/SNFMulti/trunk@63 dc71a809-1921-45c4-985c-09c81d0142d9

wx
madscientist 9 years ago
parent
commit
9081edfe1f
1 changed files with 14 additions and 3 deletions
  1. 14
    3
      SNFMulti.cpp

+ 14
- 3
SNFMulti.cpp View File



//// Version Info //// Version Info


const char* SNF_ENGINE_VERSION = "SNFMulti Engine Version 3.1.3 Build: " __DATE__ " " __TIME__;
const char* SNF_ENGINE_VERSION = "SNFMulti Engine Version 3.1.4 Build: " __DATE__ " " __TIME__;


//// Script Caller Methods //// Script Caller Methods


while(NULL!=ResultCursor) { // While we have records to process... while(NULL!=ResultCursor) { // While we have records to process...
captureMatchRecord(TmpSNFMatch, ResultCursor); // grab the next record and evaluate it. captureMatchRecord(TmpSNFMatch, ResultCursor); // grab the next record and evaluate it.
bool isPanickedRule = MyCFGPacket.isRulePanic(TmpSNFMatch.ruleid);
bool isVotingCandidate = (false == isPanickedRule);
// Mitigate short-match rulebase events to prevent false positives.
const size_t minimumPatternLength = 5; // Establish a minimum match length.
size_t matchSpan = (TmpSNFMatch.endex - TmpSNFMatch.index); // Determine the length of this match.
bool isShortMatchEvent = (minimumPatternLength > matchSpan); // Identify short-match events.
bool isPanickedRule = ( // In addition to rule IDs that are
MyCFGPacket.isRulePanic(TmpSNFMatch.ruleid) || // in the rule-panic list also treat
isShortMatchEvent // short match events as panic rules.
);
bool isVotingCandidate = (false == isPanickedRule); // Panic rules can't vote.
bool isWhiteRule = ( bool isWhiteRule = (
MyCFGPacket.Config()->TrainingWhiteRuleHandler.isListed(TmpSNFMatch.ruleid) || MyCFGPacket.Config()->TrainingWhiteRuleHandler.isListed(TmpSNFMatch.ruleid) ||
0 == TmpSNFMatch.symbol 0 == TmpSNFMatch.symbol

Loading…
Cancel
Save