| … | … | @@ -28,9 +28,7 @@ |
| 28 | 28 | (define (incr-cnt edge) |
| 29 | 29 | (SetValue edge (Predicate "count") |
| 30 | 30 | (Plus (Number 0 0 1) |
| 31 | | (Cond (FloatValueOf edge (Predicate "count")) |
| 32 | | (FloatValueOf edge (Predicate "count")) |
| 33 | | (FloatValueOf (Number 0 0 0)))))) |
| 31 | (FloatValueOf edge (Predicate "count") (FloatValueOf (Number 0 0 0)))))) |
| 34 | 32 | |
| 35 | 33 | (define (extract stuff) |
| 36 | 34 | (Filter |
| … | … | @@ -66,11 +64,11 @@ |
| 66 | 64 | |
| 67 | 65 | ; Parses arrive as LinkValues. We want to apply a function to each. |
| 68 | 66 | ; How? Need: |
| 69 | | ; 3) ConcatenateLink like AccumulateLink, but flattens |
| 70 | | ; Is this needed? |
| 71 | 67 | ; 4) IncrementLink just like cog-inc-value! |
| 72 | | ; 5) Support RuleLink so that sttream forking can be done with |
| 73 | | ; multiple targets in the rule. |
| 68 | ; or is it enough to do atomic lock? Make SetValue exec under lock. |
| 69 | ; |
| 70 | ; cog-update-value calls |
| 71 | ; asp->increment_count(h, key, fvp->value())); |
| 74 | 72 | |
| 75 | 73 | ; Works but non-atomic. |
| 76 | 74 | ; Also requires RuleLink to work |