SNAP Library 3.0, User Reference
2016-07-20 17:56:49
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
Predicate - encapsulates comparison operations. More...
#include <table.h>
Public Member Functions | |
TPredicate () | |
Default constructor. More... | |
TPredicate (TPredicateNode *R) | |
Construct predicate with given root node R . More... | |
TPredicate (const TPredicate &Pred) | |
Copy constructor. More... | |
void | GetVariables (TStrV &Variables) |
Get variables in current predicate. More... | |
void | SetIntVal (TStr VarName, TInt VarVal) |
Set int variable value in the predicate or all the children that use it. More... | |
void | SetFltVal (TStr VarName, TFlt VarVal) |
Set flt variable value in the predicate or all the children that use it. More... | |
void | SetStrVal (TStr VarName, TStr VarVal) |
Set str variable value in the predicate or all the children that use it. More... | |
TBool | Eval () |
Return the result of evaluating current predicate. More... | |
TBool | EvalAtomicPredicate (const TAtomicPredicate &Atom) |
Evaluate the give atomic predicate. More... | |
Static Public Member Functions | |
template<class T > | |
static TBool | EvalAtom (T Val1, T Val2, TPredComp Cmp) |
Compare atomic values Val1 and Val2 using predicate Cmp. More... | |
static TBool | EvalStrAtom (const TStr &Val1, const TStr &Val2, TPredComp Cmp) |
Compare atomic string values Val1 and Val2 using predicate Cmp. More... | |
Protected Attributes | |
THash< TStr, TInt > | IntVars |
Int variables in the current predicate tree. More... | |
THash< TStr, TFlt > | FltVars |
Float variables in the current predicate tree. More... | |
THash< TStr, TStr > | StrVars |
String variables in the current predicate tree. More... | |
TPredicateNode * | Root |
Rood node of the current predicate tree. More... | |
|
inline |
Default constructor.
Definition at line 90 of file table.h.
|
inline |
Construct predicate with given root node R
.
Definition at line 92 of file table.h.
|
inline |
Copy constructor.
Definition at line 94 of file table.h.
TBool TPredicate::Eval | ( | ) |
Return the result of evaluating current predicate.
Definition at line 14 of file table.cpp.
TBool TPredicate::EvalAtomicPredicate | ( | const TAtomicPredicate & | Atom | ) |
Evaluate the give atomic predicate.
Definition at line 102 of file table.cpp.
|
inlinestatic |
void TPredicate::GetVariables | ( | TStrV & | Variables | ) |
Get variables in current predicate.
Definition at line 10 of file table.cpp.
Set flt variable value in the predicate or all the children that use it.
Definition at line 100 of file table.h.
Set int variable value in the predicate or all the children that use it.
Definition at line 98 of file table.h.
Set str variable value in the predicate or all the children that use it.
Definition at line 102 of file table.h.
|
protected |