use of nars.subterm.TermVector2 in project narchy by automenta.
the class AnonTest method testMixedAnonVector.
@Test
public void testMixedAnonVector() {
Term[] x = { $.varDep(1), $.varIndep(2), $.varQuery(3), Anom.the(4) };
Random rng = new XoRoShiRo128PlusRandom(1);
for (int i = 0; i < 4; i++) {
ArrayUtils.shuffle(x, rng);
assertEqual(new UnitSubterm(x[0]), new AnonVector(x[0]));
assertEqual(new TermVector2(x[0], x[1]), new AnonVector(x[0], x[1]));
assertEqual(new ArrayTermVector(x), new AnonVector(x));
}
}
use of nars.subterm.TermVector2 in project narchy by automenta.
the class AnonTest method testAnomVector.
@Test
public void testAnomVector() {
Term[] x = { Anom.the(3), Anom.the(1), Anom.the(2) };
assertEqual(new UnitSubterm(x[0]), new AnonVector(x[0]));
assertEqual(new TermVector2(x[0], x[1]), new AnonVector(x[0], x[1]));
assertEqual(new ArrayTermVector(x), new AnonVector(x));
}
Aggregations