Package cu.repsystestbed.algorithms

Examples of cu.repsystestbed.algorithms.ReputationAlgorithm


     * @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) {
        ReputationAlgorithm alg = (ReputationAlgorithm) getAlgorithm();
        //((EigenTrust) alg).setMatrixFilled(false);
        //((EigenTrust) alg).setIterations(((EigenTrust) alg).getIterations() + (forward ? 1 : -1));
        Collection<Agent> fbVertices = feedbackGraph.getVertices();
        ArrayList<Agent> toRemove = new ArrayList<Agent>();
        for (Agent src : fbVertices) {
            for (Agent sink : fbVertices) {
                if (!src.equals(sink)) {
                    double trustScore = -1;
                    try {
                        trustScore = alg.calculateTrustScore(src, sink);
                    } catch (Exception ex) {
                        continue;
                    }
                    ensureAgentExists(src.id, this);
                    ensureAgentExists(sink.id, this);
View Full Code Here


   
    for(Object o : sequence)
    {
      if(o instanceof ReputationAlgorithm)
      {
        ReputationAlgorithm repAlg = (ReputationAlgorithm)o;
        try
        {
         
          if(repGraphs == null) repGraphs = new ArrayList<ReputationGraph>();
          repGraphs.add((ReputationGraph) repAlg.getGraph2Output());
         
        }catch(Exception e)
        {
          logger.error(e.getMessage());
        }
View Full Code Here

TOP

Related Classes of cu.repsystestbed.algorithms.ReputationAlgorithm

Copyright © 2018 www.massapicom. 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.