Package com.asakusafw.compiler.flow

Examples of com.asakusafw.compiler.flow.FlowGraphGenerator.toGraph()


        gen.defineOperator("op2", "in", "out", FlowBoundary.SHUFFLE);
        gen.defineOutput("out1");
        gen.connect("in1", "op1").connect("op1", "op2").connect("op2", "out1");
        FlowBlock bin = FlowBlock.fromPorts(
                0,
                gen.toGraph(),
                new ArrayList<FlowElementInput>(gen.inputs()),
                Arrays.asList(gen.output("in1")),
                gen.getAsSet("in1"));
        FlowBlock b1 = FlowBlock.fromPorts(
                0,
View Full Code Here


                new ArrayList<FlowElementInput>(gen.inputs()),
                Arrays.asList(gen.output("in1")),
                gen.getAsSet("in1"));
        FlowBlock b1 = FlowBlock.fromPorts(
                0,
                gen.toGraph(),
                Arrays.asList(gen.input("op1")),
                Arrays.asList(gen.output("op1")),
                gen.getAsSet("op1"));
        FlowBlock b2 = FlowBlock.fromPorts(
                0,
View Full Code Here

                Arrays.asList(gen.input("op1")),
                Arrays.asList(gen.output("op1")),
                gen.getAsSet("op1"));
        FlowBlock b2 = FlowBlock.fromPorts(
                0,
                gen.toGraph(),
                Arrays.asList(gen.input("op2")),
                Arrays.asList(gen.output("op2")),
                gen.getAsSet("op2"));
        FlowBlock bout = FlowBlock.fromPorts(
                0,
View Full Code Here

                Arrays.asList(gen.input("op2")),
                Arrays.asList(gen.output("op2")),
                gen.getAsSet("op2"));
        FlowBlock bout = FlowBlock.fromPorts(
                0,
                gen.toGraph(),
                Arrays.asList(gen.input("out1")),
                new ArrayList<FlowElementOutput>(gen.outputs()),
                gen.getAsSet("out1"));
        FlowBlock.connect(bin.getBlockOutputs().get(0), b1.getBlockInputs().get(0));
        FlowBlock.connect(b1.getBlockOutputs().get(0), b2.getBlockInputs().get(0));
View Full Code Here

        FlowPath a = FlowGraphUtil.getSucceedBoundaryPath(gen.get("a"));
        FlowPath b = FlowGraphUtil.getSucceedBoundaryPath(gen.get("b"));
        FlowPath c = FlowGraphUtil.getSucceedBoundaryPath(gen.get("c"));
        FlowPath in3 = FlowGraphUtil.getSucceedBoundaryPath(gen.get("in3"));
        FlowPath path = a.union(b).union(c).union(in3);
        FlowBlock block = path.createBlock(gen.toGraph(), 0, true, true);

        assertThat(block.getElements(),
            is(gen.getAsSet("a", "b", "c", "d", "e", "f", "op1", "op2", "in3", "out3")));
        Set<FlowElementInput> inputs = input(block.getBlockInputs());
        Set<FlowElementOutput> outputs = output(block.getBlockOutputs());
View Full Code Here

        FlowPath a = FlowGraphUtil.getSucceedBoundaryPath(gen.get("a"));
        FlowPath b = FlowGraphUtil.getSucceedBoundaryPath(gen.get("b"));
        FlowPath c = FlowGraphUtil.getSucceedBoundaryPath(gen.get("c"));
        FlowPath in3 = FlowGraphUtil.getSucceedBoundaryPath(gen.get("in3"));
        FlowPath path = a.union(b).union(c).union(in3);
        FlowBlock block = path.createBlock(gen.toGraph(), 0, false, true);

        assertThat(block.getElements(),
            is(gen.getAsSet("d", "e", "f", "op1", "op2", "out3")));
        Set<FlowElementInput> inputs = input(block.getBlockInputs());
        Set<FlowElementOutput> outputs = output(block.getBlockOutputs());
View Full Code Here

        FlowPath a = FlowGraphUtil.getSucceedBoundaryPath(gen.get("a"));
        FlowPath b = FlowGraphUtil.getSucceedBoundaryPath(gen.get("b"));
        FlowPath c = FlowGraphUtil.getSucceedBoundaryPath(gen.get("c"));
        FlowPath in3 = FlowGraphUtil.getSucceedBoundaryPath(gen.get("in3"));
        FlowPath path = a.union(b).union(c).union(in3);
        FlowBlock block = path.createBlock(gen.toGraph(), 0, true, false);

        assertThat(block.getElements(),
            is(gen.getAsSet("a", "b", "c", "op1", "op2", "in3")));
        Set<FlowElementInput> inputs = input(block.getBlockInputs());
        Set<FlowElementOutput> outputs = output(block.getBlockOutputs());
View Full Code Here

        FlowPath a = FlowGraphUtil.getSucceedBoundaryPath(gen.get("a"));
        FlowPath b = FlowGraphUtil.getSucceedBoundaryPath(gen.get("b"));
        FlowPath c = FlowGraphUtil.getSucceedBoundaryPath(gen.get("c"));
        FlowPath in3 = FlowGraphUtil.getSucceedBoundaryPath(gen.get("in3"));
        FlowPath path = a.union(b).union(c).union(in3);
        FlowBlock block = path.createBlock(gen.toGraph(), 0, false, false);

        assertThat(block.getElements(), is(gen.getAsSet("op1", "op2")));
        Set<FlowElementInput> inputs = input(block.getBlockInputs());
        Set<FlowElementOutput> outputs = output(block.getBlockOutputs());
        assertThat(inputs, is(gen.inputs("op1", "op2")));
View Full Code Here

        gen.defineInput("in");
        gen.defineOutput("out");
        gen.connect("in", "out");
        FlowPath path = FlowGraphUtil.getSucceedBoundaryPath(gen.get("in"));

        FlowBlock b0 = path.createBlock(gen.toGraph(), 0, true, true);
        assertThat(b0.getElements(), is(gen.getAsSet("in", "out")));
        assertThat(input(b0.getBlockInputs()), is(gen.inputs()));
        assertThat(output(b0.getBlockOutputs()), is(gen.outputs()));

        FlowBlock b1 = path.createBlock(gen.toGraph(), 0, false, true);
View Full Code Here

        FlowBlock b0 = path.createBlock(gen.toGraph(), 0, true, true);
        assertThat(b0.getElements(), is(gen.getAsSet("in", "out")));
        assertThat(input(b0.getBlockInputs()), is(gen.inputs()));
        assertThat(output(b0.getBlockOutputs()), is(gen.outputs()));

        FlowBlock b1 = path.createBlock(gen.toGraph(), 0, false, true);
        assertThat(b1.getElements(), is(gen.getAsSet("out")));
        assertThat(input(b1.getBlockInputs()), is(gen.inputs("out")));
        assertThat(output(b1.getBlockOutputs()), is(gen.outputs()));

        FlowBlock b2 = path.createBlock(gen.toGraph(), 0, true, false);
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.