use of jcog.pri.Prioritized in project narchy by automenta.
the class Abbreviation method accept.
@Override
public void accept(NAR nar, Task task) {
Term taskTerm = task.term();
if ((!(taskTerm instanceof Compound)) || taskTerm.vars() > 0)
return;
Prioritized b = task;
input(b, bag.bag::put, (Compound) taskTerm, 1f, nar);
}
use of jcog.pri.Prioritized in project narchy by automenta.
the class PriMergeTest method testMerge.
private static Prioritized testMerge(Priority x, Prioritized y, @NotNull PriMerge m, float ouPri, float expectedOverflow) {
x = x.clonePri();
Prioritized x0 = x.clonePri();
float overflow = m.merge(x, y);
System.out.println(x0 + " <-merge<- " + y + " x " + "\t\texpect:" + new Pri(ouPri) + " ?? actual:" + x);
assertEquals(ouPri, x.pri(), tol);
if (expectedOverflow > 0)
assertEquals(expectedOverflow, overflow, 0.01f);
return x;
}
Aggregations