use of nars.term.Compound in project narchy by automenta.
the class SubtermsTest method testUnionReusesInstance.
@Test
public void testUnionReusesInstance() throws Narsese.NarseseException {
Compound container = $("{a,b}");
Compound contained = $("{a}");
assertSame(Terms.union(container.op(), container, contained), container);
assertSame(Terms.union(contained.op(), contained, container), container);
assertSame(Terms.union(container.op(), container, container), container);
}
use of nars.term.Compound in project narchy by automenta.
the class SubtermsTest method testIntersectReusesInstance.
@Test
public void testIntersectReusesInstance() throws Narsese.NarseseException {
Compound x = $("{x,y}");
Compound y = $("{x,y}");
assertSame(Terms.intersect(x.op(), x, y), x);
}
use of nars.term.Compound in project narchy by automenta.
the class SubtermsTest method testSomething.
@Test
public void testSomething() throws Narsese.NarseseException {
Compound x = $("{e,f}");
Compound y = $("{e,d}");
System.out.println(Terms.intersect(x.op(), x, y));
System.out.println(Op.difference(x.op(), x, y));
System.out.println(Terms.union(x.op(), x, y));
}
use of nars.term.Compound in project narchy by automenta.
the class RevisionTest method testIntermpolation0b.
@Test
public void testIntermpolation0b() throws Narsese.NarseseException {
Compound a = $.$("(a &&+3 (b &&+3 c))");
Compound b = $.$("(a &&+1 (b &&+1 c))");
permuteChoose(a, b, "[((a &&+1 b) &&+1 c), ((a &&+1 b) &&+5 c), ((a &&+3 b) &&+3 c), ((a &&+2 c) &&+1 b)]");
}
use of nars.term.Compound in project narchy by automenta.
the class RevisionTest method testIntermpolationOrderMixDternal2.
@Test
public void testIntermpolationOrderMixDternal2() throws Narsese.NarseseException {
Compound a = $.$("(a &&+1 (b &&+1 (c &&+1 d)))");
Compound b = $.$("(a &&+1 (b &&+1 (c&&d)))");
permuteChoose(a, b, "[((a &&+1 b) &&+1 (c&&d))]");
}
Aggregations