| … | … | @@ -7,12 +7,19 @@ |
| 7 | 7 | ; |
| 8 | 8 | (use-modules (opencog) (opencog exec)) |
| 9 | 9 | |
| 10 | | (cog-set-value! (Anchor "location") (Predicate "vetor-pairs") |
| 10 | (cog-set-value! (Anchor "location") (Predicate "vector-pairs") |
| 11 | 11 | (LinkValue |
| 12 | 12 | (FloatValue 1 2 3 4 5) |
| 13 | 13 | (FloatValue 1 1 1 2 2))) |
| 14 | 14 | |
| 15 | 15 | (define pair-location |
| 16 | | (FloatValueOf (Anchor "location") (Predicate "vetor-pairs"))) |
| 16 | (FloatValueOf (Anchor "location") (Predicate "vector-pairs"))) |
| 17 | 17 | |
| 18 | 18 | (cog-execute! (Plus pair-location)) |
| 19 | |
| 20 | (cog-execute! (ElementOf (Number 0) pair-location))) |
| 21 | (cog-execute! (ElementOf (Number 1) pair-location))) |
| 22 | |
| 23 | (cog-execute! (Plus |
| 24 | (ElementOf (Number 0) pair-location) |
| 25 | (ElementOf (Number 1) pair-location))) |