Package net.fortytwo.ripple.model

Examples of net.fortytwo.ripple.model.Operator


                          final ModelConnection mc) throws RippleException {

            RippleList stack = arg;
            StackMapping d = new WhileDecider(stack, program, criterion);

            solutions.put(stack.push(criterion).push(new Operator(d)));
        }
View Full Code Here


                    RippleList inverted = list.invert();
                    RippleValue f = inverted.getFirst();

                    for (Operator operator : operators) {
                        StackMapping inner = new InnerMapping(mc.list(), inverted.getRest(), operator);
                        solutions.put(rest.push(f).push(mappingVal).push(Operator.OP).push(new Operator(inner)));
                    }
                }
            }
        };
View Full Code Here

            } else {
                // The stack to operate on
                RippleList restStack = stack.push(invertedListHead.getFirst()).push(operator);

                StackMapping restMapping = new InnerMapping(newListRest, invertedListHead.getRest(), operator);
                solutions.put(restStack.push(new Operator(restMapping)));
            }
        }
View Full Code Here

                      final Sink<RippleList> solutions,
                      final ModelConnection mc) throws RippleException {

        solutions.put(
                arg.push(
                        new Operator(
                                new DistinctInner())));
    }
View Full Code Here

        n = mc.toNumericValue(stack.getFirst()).intValue();
        stack = stack.getRest();

        solutions.put(
                stack.push(new Operator(new NaryId(n))));
    }
View Full Code Here

        lim = mc.toNumericValue(stack.getFirst()).intValue();
        stack = stack.getRest();

        solutions.put(
                stack.push(
                        new Operator(
                                new LimitInner((long) lim))));
    }
View Full Code Here

        RippleValue criterion = stack.getFirst();
        stack = stack.getRest();

        StackMapping inner = new IfteInner(stack, trueProg, falseProg);
        RippleList newStack = stack.push(criterion).push(Operator.OP)
                .push(new Operator(inner));

        solutions.put(newStack);
    }
View Full Code Here

        for (Operator programOp : programOps) {
            for (Operator criterionOp : criterionOps) {
                StackMapping a = new WhileApplicator(programOp, criterionOp);

                solutions.put(stack.push(new Operator(a)));
            }
        }
    }
View Full Code Here

                if (ops.isNil()) {
                    outputSink.put(stack);
                    return;
                } else {
                    Closure c = new Closure(ops.getFirst().getMapping(), first);
                    stack = stack.getRest().push(new Operator(c));
                    ops = ops.getRest();
                }
            } else {
                StackMapping f = first.getMapping();
View Full Code Here

TOP

Related Classes of net.fortytwo.ripple.model.Operator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.