How do you want the result? Printed lines on standard output? One for
each pair of connected nodes, as you have shown it below "result"? Or
collected in another fact?
-W
On 4 June 2014 10:09, nill <nillx87(a)hotmail.com> wrote:
My structure is composed of 2 classes (Node, Link)
class Node {
List <Link> out;
List <Link> in;
}
class Link {
Source node;
Target node;
}
they are inserted as facts in working memory.
I have to write a rule that will unite for each node joins the links that
have the same destination, and if there is then the inverse must also join
the latter.
eg.
A - link1 -> B
A - link2 -> B
A - link3 -> C
C - link4 -> D
B - link5 -> A
result
A - link1 + link2 +link5 -> B
A - link3 -> C
C - link4 -> D
Can anyone help me?
--
View this message in context:
http://drools.46999.n3.nabble.com/Help-write-rule-drools-tp4029841.html
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users