Examples of FlowGraph


Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

    public void insertIdentities_nothing() {
        gen.defineInput("in");
        gen.defineOperator("op", "in", "out");
        gen.defineOutput("out");
        gen.connect("in", "op.in").connect("op.out", "out");
        FlowGraph graph = gen.toGraph();
        getPlanner().insertIdentities(graph);

        assertThat(FlowGraphUtil.collectElements(graph),
                is(gen.getAsSet("in", "op", "out")));
    }
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        gen.defineInput("in");
        gen.defineOperator("op1", "in", "out", FlowBoundary.SHUFFLE);
        gen.defineOperator("op2", "in", "out");
        gen.defineOutput("out");
        gen.connect("in", "op1").connect("op1", "op2").connect("op2", "out");
        FlowGraph graph = gen.toGraph();
        getPlanner().insertIdentities(graph);

        assertThat(FlowGraphUtil.collectElements(graph),
                not(gen.getAsSet("in", "op1", "op2", "out")));
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        gen.defineInput("in");
        gen.defineOperator("op1", "in", "out", FlowBoundary.STAGE);
        gen.defineOperator("op2", "in", "out");
        gen.defineOutput("out");
        gen.connect("in", "op1").connect("op1", "op2").connect("op2", "out");
        FlowGraph graph = gen.toGraph();
        getPlanner().insertIdentities(graph);

        assertThat(FlowGraphUtil.collectElements(graph),
                not(gen.getAsSet("in", "op1", "op2", "out")));
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        gen.defineInput("in");
        gen.defineOperator("op1", "in", "out");
        gen.defineOperator("op2", "in", "out", FlowBoundary.SHUFFLE);
        gen.defineOutput("out");
        gen.connect("in", "op1").connect("op1", "op2").connect("op2", "out");
        FlowGraph graph = gen.toGraph();
        getPlanner().insertIdentities(graph);

        assertThat(FlowGraphUtil.collectElements(graph),
                is(gen.getAsSet("in", "op1", "op2", "out")));
    }
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        gen.defineInput("in");
        gen.defineOperator("op", "in", "out");
        gen.defineOutput("out");
        gen.connect("in", "op.in").connect("op.out", "out");

        FlowGraph graph = gen.toGraph();
        getPlanner().splitIdentities(graph);

        assertThat(FlowGraphUtil.collectElements(graph),
                is(gen.getAsSet("in", "op", "out")));
    }
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        gen.defineOutput("out1");
        gen.defineOutput("out2");
        gen.connect("in1", "id").connect("id", "out1");
        gen.connect("in2", "id").connect("id", "out2");

        FlowGraph graph = gen.toGraph();
        getPlanner().splitIdentities(graph);

        Set<FlowElement> succ1 = FlowGraphUtil.getSuccessors(gen.get("in1"));
        Set<FlowElement> succ2 = FlowGraphUtil.getSuccessors(gen.get("in2"));
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        gen.defineOutput("out1");
        gen.defineOutput("out2");
        gen.connect("in1", "id1").connect("id1", "out1");
        gen.connect("in1", "id2").connect("id2", "out2");

        FlowGraph graph = gen.toGraph();
        getPlanner().splitIdentities(graph);

        assertThat(FlowGraphUtil.collectElements(graph),
                is(gen.getAsSet("in1", "id1", "id2", "out1", "out2")));
    }
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        gen.defineOperator("op1", "in", "out");
        gen.defineOperator("op2", "in", "out");
        gen.defineOutput("out");
        gen.connect("in", "op1").connect("op1", "op2").connect("op2", "out");

        FlowGraph graph = gen.toGraph();
        getPlanner().reduceIdentities(graph);

        assertThat(FlowGraphUtil.collectElements(graph),
                is(gen.getAsSet("in", "op1", "op2", "out")));
        assertThat(succ(gen.get("in")), is(gen.get("op1")));
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        gen.defineOperator("op1", "in", "out");
        gen.definePseud("id");
        gen.defineOutput("out");
        gen.connect("in", "op1").connect("op1", "id").connect("id", "out");

        FlowGraph graph = gen.toGraph();
        getPlanner().reduceIdentities(graph);

        assertThat(FlowGraphUtil.collectElements(graph),
                is(gen.getAsSet("in", "op1", "out")));
View Full Code Here

Examples of com.asakusafw.vocabulary.flow.graph.FlowGraph

        gen.definePseud("id");
        gen.defineOperator("op1", "in", "out");
        gen.defineOutput("out");
        gen.connect("in", "id").connect("id", "op1").connect("op1", "out");

        FlowGraph graph = gen.toGraph();
        getPlanner().reduceIdentities(graph);

        assertThat(FlowGraphUtil.collectElements(graph),
                is(gen.getAsSet("in", "op1", "out")));
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.