Loading src/PredicateAwesome.h +4 −4 Original line number Diff line number Diff line Loading @@ -29,12 +29,12 @@ namespace PsimagLite { where SimplePredicate is of the form word operator word where operator is in {==, <, >, <=, >=, %} with the expected meaning, and % means divisible by. So l%2 means that the simple predicate is true if l is divisible by 2. where operator is in {==, <, >, <=, >=, %%} with the expected meaning, and %% means divisible by. So l%%2 means that the simple predicate is true if l is divisible by 2. From this rules, the list of items M=2,l%2;l!=0,l>=7,l<11 M=2,l%%2;l!=0,l>=7,l<11 will set M=2 and define a predicate that is true if l is in the set {2, 4, 6, 7, 8, 9, 10, 12, 14, 16, 18 ...} and false otherwise. Loading src/PredicateSimple.h +4 −4 Original line number Diff line number Diff line Loading @@ -7,9 +7,9 @@ /* PSIDOC PredicateSimple PredicateSimple is of the form word operator word where operator is in {==, <, >, <=, >=, %} with the usual meaning, and % means divisible by. So l%2 means that the simple predicate is true if l is divisible by 2. where operator is in {==, <, >, <=, >=, %%} with the usual meaning, and %% means divisible by. So l%%2 means that the simple predicate is true if l is divisible by 2. */ namespace PsimagLite { Loading Loading @@ -70,7 +70,7 @@ private: template<typename T> static bool compareOnOp(T lv, String op, T rv) { // {==, <, >, <=, >=, %} // {==, <, >, <=, >=, %%} // If you add something here, add it also to PredicateSimple.cpp if (op == "==") return (lv == rv); Loading Loading
src/PredicateAwesome.h +4 −4 Original line number Diff line number Diff line Loading @@ -29,12 +29,12 @@ namespace PsimagLite { where SimplePredicate is of the form word operator word where operator is in {==, <, >, <=, >=, %} with the expected meaning, and % means divisible by. So l%2 means that the simple predicate is true if l is divisible by 2. where operator is in {==, <, >, <=, >=, %%} with the expected meaning, and %% means divisible by. So l%%2 means that the simple predicate is true if l is divisible by 2. From this rules, the list of items M=2,l%2;l!=0,l>=7,l<11 M=2,l%%2;l!=0,l>=7,l<11 will set M=2 and define a predicate that is true if l is in the set {2, 4, 6, 7, 8, 9, 10, 12, 14, 16, 18 ...} and false otherwise. Loading
src/PredicateSimple.h +4 −4 Original line number Diff line number Diff line Loading @@ -7,9 +7,9 @@ /* PSIDOC PredicateSimple PredicateSimple is of the form word operator word where operator is in {==, <, >, <=, >=, %} with the usual meaning, and % means divisible by. So l%2 means that the simple predicate is true if l is divisible by 2. where operator is in {==, <, >, <=, >=, %%} with the usual meaning, and %% means divisible by. So l%%2 means that the simple predicate is true if l is divisible by 2. */ namespace PsimagLite { Loading Loading @@ -70,7 +70,7 @@ private: template<typename T> static bool compareOnOp(T lv, String op, T rv) { // {==, <, >, <=, >=, %} // {==, <, >, <=, >=, %%} // If you add something here, add it also to PredicateSimple.cpp if (op == "==") return (lv == rv); Loading