This is the part of my program, it works correctly but now I want catch
the final facts (last row)and put it in a vector.
I read the manual but I didn't find the solution(I didn't understand the
use of store and fetch!!)
Rete r=new Rete();
for(int i=0;i<2*DimensioneRs;i++){
System.out.print(VettoreRisultati[(i)]);
System.out.println();
}
r.reset();
for(int ii=0;ii<2*DimensioneRs-1;ii=ii+2){
ValueVector slot=new ValueVector();
Fact f=new Fact("CD",r);
slot.add(new Value(VettoreRisultati[ii],RU.ATOM));
slot.add(new Value(VettoreRisultati[ii+1],RU.ATOM));
f.setSlotValue("__data",new Value(slot,RU.LIST));
r.assert (f);
}
r.executeCommand("(batch jess/scriptlib.clp)");
r.executeCommand(
"(defrule TogliDoppi "+
"?fact0 <- (CD X ?y) "+
"?fact1 <- (CD ?x X) "+
"?fact2 <- (CD ?x ?y)"+
"=>"+
"(retract ?fact0)"+
"(retract ?fact1)"+
"(printout t 'genere e artista ignoto matcha con' ?x ?y crlf))");
r.executeCommand("(watch all)");
r.run();
r.executeCommand("(facts)")
}
}
R.
---------------------------------------------------------------------
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]
---------------------------------------------------------------------