Jess 7.0 will have the accumulate feature, but how about some way of
accumulating by adding nodes to a tree? (If you look, you'll see that any
kind of general purpose tree class is conspicuously missing from java.util.)
For example, I'm doing some computations where I am accumulating sets of
nodes (fact-ids representing partial solutions to a scheduling problem)
after every engine cycle.  Actually, the structure is a "forest" something
like this:

                   <node1-1>                                      <node1-2>
                      |                                                       |
                  +---+--------+
+------------+------------+
                  |            |                         |            |
|
               <node2-1>   <node2-2>                 <node2-3>    <node2-4>
<node2-5>                     ...
                  |            |                         |
|
       +----------+-+          +-----------+             +------------+
+------------+
       |            |          |           |             |            |
|            |
    <node3-1>   <node3-2>  <node3-3>   <node3-4>     <node3-5>    <node3-6>
<node3-7>    <node3-8>

                      ...                                      ...

In my case, the solutions that Jess will eventually find are the depth-first
traversals of the trees,
e.g, solution = {<node1-1>,<node2-1>,<node3-1>,...}
Given how ubiquitous trees are in computing, is there any utility in having
Jess support a ready-made structure for accumulating (placing!?) output
(pattern bindings, function returns, etc.) as nodes in a tree?  Of course,
there are a thousand ways that I or any other user can roll our own (using
linked lists for example), but maybe someone else has a similar need, too.

Cheers,

Jason
------------------------

Jason Morris
Morris Technical Solutions
[EMAIL PROTECTED]
www.morristechnicalsolutions.com
fax/phone: 503.692.1088

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to