Thank you, it's working well now. It was easy to get rid of the double
underscores, because all of my rules are generated by code. (I'm describing
data transformations graphically in UML diagrams).
The id slots were actually created to distinguish between otherwise identical
facts when loadin
Hi,I'm having a problem when I batch two different .clp files that require the
same third .clp file.
File1.clp
Some defclasses
File2.clp
require file1Some rules using file1 defclasses
File3.clp
require file 1
Some other rules using file1 defclasses
rete.batch(file2);
rete.batch(file3);
Yes, I had noticed that.
Thank you all.
By the way, is it heavy to have such a test in a rule's LHS?
Let me be more specific. I am trying to make a kind of "refraction"
across multiple rules. The point is to prevent two rules from firing on
the same facts. For this I use a special ordered fact "r
Given the precondition (as Henrique wrote) that the lists are sets you
don't have to consider the general case.
-W
Szymon Klarman wrote:
Yes but this function won't do the job in general. Consider:
list1 = (1 1 2),
list2 = (2 2 3),
(union$ list1 list2) = (1 2 3)
Better to check whether inter
Yes but this function won't do the job in general. Consider:
list1 = (1 1 2),
list2 = (2 2 3),
(union$ list1 list2) = (1 2 3)
Better to check whether intersection of the two lists have the same length
as their union.
all best,
Szymon
- Original Message -
From: "Wolfgang Laun" <[EMAIL
You can apply (=) to more than 2 arguments.
(= (length$ ?list1) (length$ ?list2) (length$ (union$ ?list1 ?list2)))
kr
Wolfgang
Henrique Lopes Cardoso wrote:
Hi,
I was trying to test equality for lists seen as sets (elements with any
order).
Is there any direct function, or any solution simpl
Hi,
I was trying to test equality for lists seen as sets (elements with any
order).
Is there any direct function, or any solution simpler than this:
(bind ?list1 (list 1 2 3))
(bind ?list2 (list 3 2 1))
(and (= (length$ ?list1) (length$ ?list2)) (= (length$ (union$ ?list1
?list2)) (length$ ?lis