Package net.fortytwo.ripple.model

Examples of net.fortytwo.ripple.model.RippleList.push()


            RippleValue head = stack.getFirst();
            final RippleList rest = stack.getRest();

            final Sink<RippleValue> pushSink = new Sink<RippleValue>() {
                public void put(final RippleValue v) throws RippleException {
                    solutions.put(rest.push(v));
                }
            };

            Sink<Statement> stSink = new Sink<Statement>() {
                public void put(final Statement st) throws RippleException {
View Full Code Here


// TODO: check for undefined values
        double d = Math.tan(a);
        result = mc.valueOf(d);

        solutions.put(
                stack.push(result));
    }

    @Override
    public StackMapping getInverse() throws RippleException {
        return MathLibrary.getAtanValue();
View Full Code Here

        Sink<RippleList> listSink = new Sink<RippleList>() {
            public void put(final RippleList list) throws RippleException {
                boolean result = list.isNil();
                solutions.put(
                        rest.push(mc.valueOf(result)));
            }
        };

        mc.toList(l, listSink);
    }
View Full Code Here

        stack = stack.getRest();

        result = mc.valueOf((int) Math.ceil(a.doubleValue()));

        solutions.put(
                stack.push(result));
    }
}
View Full Code Here

                    RippleValue subj = mc.canonicalValue(new RDFValue(st.getSubject()));
                    RippleValue pred = mc.canonicalValue(new RDFValue(st.getPredicate()));
                    RippleValue ctx = (null == context) ? mc.list() : mc.canonicalValue(new RDFValue(context));

                    solutions.put(rest.push(subj).push(pred).push(obj).push(ctx));
                }
            };

            mc.getStatements(null, null, obj.toRDF(mc), stSink);
        } else {
View Full Code Here

                    // Note: this may or may not be worth the extra CPU cycles.
                    ((RippleSesameValue) subject).setStack(stack);
                }

                stack = stack.push(modelConnection.canonicalValue(
                        new RDFValue(valueFactory.nativize(predicate)))).push(Operator.OP);
                //System.out.println("\t\tstack (new) = " + stack);

                CloseableIteration<RippleList, RippleException> solutions
                        = new LazyEvaluatingIterator(stack, modelConnection);
View Full Code Here

                    // Note: this may or may not be worth the extra CPU cycles.
                    ((RippleSesameValue) object).setStack(stack);
                }

                stack = stack.push(modelConnection.canonicalValue(new RDFValue(predicate)))
                        .push(ControlLibrary.getInverseValue())
                        .push(Operator.OP)
                        .push(Operator.OP);
                //System.out.println("stack = " + stack);
View Full Code Here

        stack = stack.getRest();

        result = mc.valueOf(Math.exp(a.doubleValue()));

        solutions.put(
                stack.push(result));
    }

    @Override
    public StackMapping getInverse() throws RippleException {
        return MathLibrary.getLogValue();
View Full Code Here

        // in a deadlock.  The LinkedDataSail already does this sort of
        // buffering, which is why it does not deadlock w.r.t. its base
        // Sail.
        mc.commit();

        solutions.put(stack.push(subj));
    }
}
View Full Code Here

        stack = stack.getRest();
        x = stack.getFirst();
        stack = stack.getRest();

        solutions.put(
                stack.push(y).push(x).push(z));
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.