operator: rel-kets
description:
rel-kets[op]
return all relevant kets that have op specified
if op is * then return everything that has a literal operator specified for it
NB: rel-kets[op] does not return kets that are only specified on the right hand side of a learn rule
rel-kets[op1,op2, ..., opn]
return all relevant kets that have op1, ... , opn specified
rel-kets[op1, ... , opn] sp
return all relevant kets, in the given superposition, that have op1, ... , opn specified
examples:
load fred-sam-friends.sw
rel-kets[friends]
|Fred> + |Sam>
age |Sam> => |47>
rel-kets[friends, age]
|Sam>
load family.sw
rel-kets[*]
|context> + |sally> + |erica> + |trude> + |peter> + |tom> + |sara> + |sam> + |ruth> + |mike> + |gina> + |mary> + |mark>
load family-relations.sw
such-that[is-a-female] rel-kets[*]
|sally> + |erica> + |trude> + |sara> + |ruth> + |gina> + |mary>
such-that[is-an-uncle] rel-kets[*]
|peter>
such-that[have-a-sister] rel-kets[*]
|sally> + |erica>
such-that[have-a-sister, is-a-teenager] rel-kets[*]
|sally>
such-that[have-a-brother] rel-kets[*]
|peter> + |tom>
such-that[have-a-wife] rel-kets[*]
|tom> + |sam> + |mike> + |mark>
see also:
such-that
TODO:
fix sequence behaviour
maybe implement all-kets which returns even kets that are only specified on the right of a learn rule
Home