Examples of TrustAlgorithm


Examples of cu.repsystestbed.algorithms.TrustAlgorithm

     * @param event The TrustLogEvent that is being processed
     * @param forward Whether or not the graph is being played forward
     */
    @Override
    public void graphEvent(TrustLogEvent event, boolean forward) {
        TrustAlgorithm alg = (TrustAlgorithm) getAlgorithm();
        Collection<Agent> vertices = forward ? alg.getReputationGraph().vertexSet() : getVertices();
        for (Agent src : vertices) {
            for (Agent sink : vertices) {
                try {
                    if (!src.equals(sink)) {
                        if (alg.trusts(src, sink)) { //Ensure an edge exists between the two agents that trust eachother
                            ensureAgentExists(src.id, this);
                            ensureAgentExists(sink.id, this);
                            ensureEdgeExists(src, sink, this);
                        } else {
                            throw new IllegalArgumentException(); //Remove the edge
View Full Code Here

Examples of cu.repsystestbed.algorithms.TrustAlgorithm

                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

Examples of cu.repsystestbed.algorithms.TrustAlgorithm

  {
    for(Object o : sequence)
    {
      if(o instanceof TrustAlgorithm)
      {
        TrustAlgorithm trustAlg = (TrustAlgorithm) o;
        return (TrustGraph) trustAlg.getGraph2Output();
      }
     
      //TODO get rid of this evaluation algorithm design
      if(o instanceof EvaluationAlgorithm)
      {
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.