Examples of addGem()


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

       
        // Local collector: isPositiveOutlier
        // Corresponding source: isPositiveOutlier x_1 = x_1 - avg >= x_2 * stdDev;
        CollectorGem isPositiveOutlierCollector = new CollectorGem();
        isPositiveOutlierCollector.setName("isPositiveOutlier");
        gemGraph.addGem(isPositiveOutlierCollector);
       
        Gem subtractGem = gemFactory.makeFunctionalAgentGem(CAL_Prelude.Functions.subtract);
        gemGraph.addGem(subtractGem);
       
        ReflectorGem avgReflector = new ReflectorGem(avgCollector);
View Full Code Here

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

        CollectorGem isPositiveOutlierCollector = new CollectorGem();
        isPositiveOutlierCollector.setName("isPositiveOutlier");
        gemGraph.addGem(isPositiveOutlierCollector);
       
        Gem subtractGem = gemFactory.makeFunctionalAgentGem(CAL_Prelude.Functions.subtract);
        gemGraph.addGem(subtractGem);
       
        ReflectorGem avgReflector = new ReflectorGem(avgCollector);
        gemGraph.addGem(avgReflector);
       
        // Retarget the first input of subtract to the isPositiveOutlier collector
View Full Code Here

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

       
        Gem subtractGem = gemFactory.makeFunctionalAgentGem(CAL_Prelude.Functions.subtract);
        gemGraph.addGem(subtractGem);
       
        ReflectorGem avgReflector = new ReflectorGem(avgCollector);
        gemGraph.addGem(avgReflector);
       
        // 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.
View Full Code Here

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

        // 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);
        gemGraph.addGem(stdDevReflector);
       
        // Leave the first input of multiply targeting the target collector (it will be an argument of the positiveOutlierDetector gem),
View Full Code Here

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

       
        Gem multiplyGem = gemFactory.makeFunctionalAgentGem(CAL_Prelude.Functions.multiply);
        gemGraph.addGem(multiplyGem);
       
        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));
       
View Full Code Here

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

        // 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));
        gemGraph.connectGems(multiplyGem.getOutputPart(), greaterThanEqualsGem.getInputPart(1));
       
        gemGraph.connectGems(greaterThanEqualsGem.getOutputPart(), isPositiveOutlierCollector.getInputPart(0));
View Full Code Here

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

        // Update the reflected inputs of the collector because one of the inputs in the gem tree was retargeted
        isPositiveOutlierCollector.updateReflectedInputs();
       
        // Construct the gem tree connected to the target collector
        ReflectorGem isPositiveOutlierReflector = new ReflectorGem(isPositiveOutlierCollector);
        gemGraph.addGem(isPositiveOutlierReflector);

        isPositiveOutlierReflector.getInputPart(0).setBurnt(true);
       
        ReflectorGem sourceDataReflector3 = new ReflectorGem(sourceDataCollector);
        gemGraph.addGem(sourceDataReflector3);
View Full Code Here

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

        gemGraph.addGem(isPositiveOutlierReflector);

        isPositiveOutlierReflector.getInputPart(0).setBurnt(true);
       
        ReflectorGem sourceDataReflector3 = new ReflectorGem(sourceDataCollector);
        gemGraph.addGem(sourceDataReflector3);
       
        Gem filterGem = gemFactory.makeFunctionalAgentGem(CAL_List.Functions.filter);
        gemGraph.addGem(filterGem);
       
        gemGraph.connectGems(isPositiveOutlierReflector.getOutputPart(), filterGem.getInputPart(0));
View Full Code Here

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

       
        ReflectorGem sourceDataReflector3 = new ReflectorGem(sourceDataCollector);
        gemGraph.addGem(sourceDataReflector3);
       
        Gem filterGem = gemFactory.makeFunctionalAgentGem(CAL_List.Functions.filter);
        gemGraph.addGem(filterGem);
       
        gemGraph.connectGems(isPositiveOutlierReflector.getOutputPart(), filterGem.getInputPart(0));
        gemGraph.connectGems(sourceDataReflector3.getOutputPart(), filterGem.getInputPart(1));
       
        gemGraph.connectGems(filterGem.getOutputPart(), gemGraph.getTargetCollector().getInputPart(0));
View Full Code Here

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

        gemGraph.getTargetCollector().setName("demoMap");
       
        // Two collectors forming the two arguments of the demoMap gem.
        CollectorGem mapFunctionCollector = new CollectorGem();
        mapFunctionCollector.setName("mapFunction");
        gemGraph.addGem(mapFunctionCollector);
       
        CollectorGem listCollector = new CollectorGem();
        listCollector.setName("list");
        gemGraph.addGem(listCollector);
       
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.