Examples of ReputationAlgorithmType2


Examples of cu.repsystestbed.algorithms.ReputationAlgorithmType2

                trustGraphs.add(graphConfig);
            } else if (graphConfig.isFeedbackGraph()) { // add the Feedback Graph
                graphs.add(new SimFeedbackGraph(graphConfig));
            } else if (graphConfig.isReputationGraph()) { //Add a Reputation Graph
                graphs.add(new SimReputationGraph(graphConfig, (SimFeedbackGraph) graphs.get(0)));
                ReputationAlgorithmType2 alg = (ReputationAlgorithmType2) graphConfig.getAlgorithm(); //get the algorithm and add it to the inner jGraphT graph
                try
        {
          alg.setGraph2Listen((FeedbackHistoryGraph) getInnerGraph(graphConfig.getBaseIndex(), graphs));
        } catch (Exception e)
        {
          ChatterBox.criticalError("SimGraphPair", "<init>", "Error setting algorithm to listen to feedback history graph. " + e);
        }
            } else {
                ChatterBox.criticalError("SimGraphPair", "<init>", "Unsupported graph type");
            }
        }
        for (GraphConfig graphConfig : trustGraphs) { //Now add the Tryst Graphs
            graphs.add(new SimTrustGraph(graphConfig));
            TrustAlgorithm alg = (TrustAlgorithm) graphConfig.getAlgorithm(); //get the algorithm and add it to the inner jGraphT graph
            alg.setReputationGraph((ReputationGraph) getInnerGraph(graphConfig.getBaseIndex(), graphs));
        }
        return graphs;
    }
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.