use of org.matheclipse.core.patternmatching.FlatOrderlessStepVisitor in project symja_android_library by axkr.
the class CombinatoricTestCase method testRosenIterator.
public void testRosenIterator() {
IAST lhsPatternAST = F.Plus(F.x_, F.y_, F.z_);
IAST lhsEvalAST = F.Plus(F.a, F.b, F.c, F.d);
PatternMatcher patternMatcher = new PatternMatcher(lhsPatternAST);
IPatternMap patternMap = patternMatcher.createPatternMap();
// StackMatcher stackMatcher = patternMatcher.new StackMatcher(EvalEngine.get());
FlatOrderlessStepVisitor visitor = new FlatOrderlessStepVisitor(F.Plus, lhsPatternAST, lhsEvalAST, patternMatcher, patternMap);
MultisetPartitionsIterator iter = new MultisetPartitionsIterator(visitor, lhsPatternAST.argSize());
boolean b = false;
while (!b) {
b = iter.execute();
if (!b) {
System.out.println(iter.toString());
iter.initPatternMap();
}
}
assertEquals(true, b);
}
Aggregations