Examples of connectGems()


Examples of org.openquark.gems.client.GemGraph.connectGems()

        // Create a Value gem to represent a BigInteger (Prelude.Integer) value for the number 1.
        Gem oneGem = new ValueGem(new LiteralValueNode(BigInteger.valueOf(1), calServices.getPreludeTypeConstants().getIntegerType()));
           
        gemGraph.addGem(oneGem);
       
        gemGraph.connectGems(oneGem.getOutputPart(), upFromToGem.getInputPart(0));
       
        gemGraph.connectGems(upFromToGem.getOutputPart(), productGem.getInputPart(0));
       
        gemGraph.connectGems(productGem.getOutputPart(), gemGraph.getTargetCollector().getInputPart(0));
       
View Full Code Here

Examples of org.openquark.gems.client.GemGraph.connectGems()

           
        gemGraph.addGem(oneGem);
       
        gemGraph.connectGems(oneGem.getOutputPart(), upFromToGem.getInputPart(0));
       
        gemGraph.connectGems(upFromToGem.getOutputPart(), productGem.getInputPart(0));
       
        gemGraph.connectGems(productGem.getOutputPart(), gemGraph.getTargetCollector().getInputPart(0));
       
        gemGraph.typeGemGraph(calServices.getTypeCheckInfo(GEM_GRAPH_TYPE_CHECKING_MODULE));
       
View Full Code Here

Examples of org.openquark.gems.client.GemGraph.connectGems()

       
        gemGraph.connectGems(oneGem.getOutputPart(), upFromToGem.getInputPart(0));
       
        gemGraph.connectGems(upFromToGem.getOutputPart(), productGem.getInputPart(0));
       
        gemGraph.connectGems(productGem.getOutputPart(), gemGraph.getTargetCollector().getInputPart(0));
       
        gemGraph.typeGemGraph(calServices.getTypeCheckInfo(GEM_GRAPH_TYPE_CHECKING_MODULE));
       
        return gemGraph;
    }
View Full Code Here

Examples of org.openquark.gems.client.GemGraph.connectGems()

        gemGraph.addGem(sourceDataReflector1);
       
        Gem averageGem = gemFactory.makeFunctionalAgentGem(CAL_Summary.Functions.average);
        gemGraph.addGem(averageGem);
       
        gemGraph.connectGems(sourceDataReflector1.getOutputPart(), averageGem.getInputPart(0));
       
        gemGraph.connectGems(averageGem.getOutputPart(), avgCollector.getInputPart(0));
       
        // Local collector: stdDev
        // Corresponding source: stdDev = Summary.populationStandardDeviation sourceData;
View Full Code Here

Examples of org.openquark.gems.client.GemGraph.connectGems()

        Gem averageGem = gemFactory.makeFunctionalAgentGem(CAL_Summary.Functions.average);
        gemGraph.addGem(averageGem);
       
        gemGraph.connectGems(sourceDataReflector1.getOutputPart(), averageGem.getInputPart(0));
       
        gemGraph.connectGems(averageGem.getOutputPart(), avgCollector.getInputPart(0));
       
        // Local collector: stdDev
        // Corresponding source: stdDev = Summary.populationStandardDeviation sourceData;
        CollectorGem stdDevCollector = new CollectorGem();
        stdDevCollector.setName("stdDev");
View Full Code Here

Examples of org.openquark.gems.client.GemGraph.connectGems()

        gemGraph.addGem(sourceDataReflector2);
       
        Gem populationStdDevGem = gemFactory.makeFunctionalAgentGem(CAL_Summary.Functions.populationStandardDeviation);
        gemGraph.addGem(populationStdDevGem);
       
        gemGraph.connectGems(sourceDataReflector2.getOutputPart(), populationStdDevGem.getInputPart(0));
       
        gemGraph.connectGems(populationStdDevGem.getOutputPart(), stdDevCollector.getInputPart(0));
       
        // Local collector: isPositiveOutlier
        // Corresponding source: isPositiveOutlier x_1 = x_1 - avg >= x_2 * stdDev;
 
View Full Code Here

Examples of org.openquark.gems.client.GemGraph.connectGems()

        Gem populationStdDevGem = gemFactory.makeFunctionalAgentGem(CAL_Summary.Functions.populationStandardDeviation);
        gemGraph.addGem(populationStdDevGem);
       
        gemGraph.connectGems(sourceDataReflector2.getOutputPart(), populationStdDevGem.getInputPart(0));
       
        gemGraph.connectGems(populationStdDevGem.getOutputPart(), stdDevCollector.getInputPart(0));
       
        // Local collector: isPositiveOutlier
        // Corresponding source: isPositiveOutlier x_1 = x_1 - avg >= x_2 * stdDev;
        CollectorGem isPositiveOutlierCollector = new CollectorGem();
        isPositiveOutlierCollector.setName("isPositiveOutlier");
View Full Code Here

Examples of org.openquark.gems.client.GemGraph.connectGems()

        // Retarget the first input of subtract to the isPositiveOutlier collector
        //
        // This means that the first input of subtract is no longer an argument for the overall Gem defined by the
        // GemGraph's target collector, but rather a local argument for the isPositiveOutlier collector.
        gemGraph.retargetInputArgument(subtractGem.getInputPart(0), isPositiveOutlierCollector, -1);
        gemGraph.connectGems(avgReflector.getOutputPart(), subtractGem.getInputPart(1));
       
        Gem multiplyGem = gemFactory.makeFunctionalAgentGem(CAL_Prelude.Functions.multiply);
        gemGraph.addGem(multiplyGem);
       
        ReflectorGem stdDevReflector = new ReflectorGem(stdDevCollector);
View Full Code Here

Examples of org.openquark.gems.client.GemGraph.connectGems()

        ReflectorGem stdDevReflector = new ReflectorGem(stdDevCollector);
        gemGraph.addGem(stdDevReflector);
       
        // Leave the first input of multiply targeting the target collector (it will be an argument of the positiveOutlierDetector gem),
        // but hook up the second input of multiply to the stdDev reflector
        gemGraph.connectGems(stdDevReflector.getOutputPart(), multiplyGem.getInputPart(1));
       
        Gem greaterThanEqualsGem = gemFactory.makeFunctionalAgentGem(CAL_Prelude.Functions.greaterThanEquals);
        gemGraph.addGem(greaterThanEqualsGem);
       
        gemGraph.connectGems(subtractGem.getOutputPart(), greaterThanEqualsGem.getInputPart(0));
View Full Code Here

Examples of org.openquark.gems.client.GemGraph.connectGems()

        gemGraph.connectGems(stdDevReflector.getOutputPart(), multiplyGem.getInputPart(1));
       
        Gem greaterThanEqualsGem = gemFactory.makeFunctionalAgentGem(CAL_Prelude.Functions.greaterThanEquals);
        gemGraph.addGem(greaterThanEqualsGem);
       
        gemGraph.connectGems(subtractGem.getOutputPart(), greaterThanEqualsGem.getInputPart(0));
        gemGraph.connectGems(multiplyGem.getOutputPart(), greaterThanEqualsGem.getInputPart(1));
       
        gemGraph.connectGems(greaterThanEqualsGem.getOutputPart(), isPositiveOutlierCollector.getInputPart(0));
       
        // Update the reflected inputs of the collector because one of the inputs in the gem tree was retargeted
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.