Package cu.repsystestbed.algorithms.examples

Examples of cu.repsystestbed.algorithms.examples.RankbasedTrustAlg


      feedbackHistoryGraph.addFeedback(f);
    }
   
    // create the algorithms
    EigenTrust repAlg = (EigenTrust) ReputationAlgorithm.getInstance("cu.repsystestbed.algorithms.examples.EigenTrust");
    RankbasedTrustAlg trustAlg = (RankbasedTrustAlg) TrustAlgorithm.getInstance("cu.repsystestbed.algorithms.examples.RankbasedTrustAlg");
   
    // create the work flow and add the items
    Workflow workflow = new Workflow();
    workflow.addItem(feedbackHistoryGraph);
    workflow.addItem(repAlg);
View Full Code Here


    // add the feedbacks to the feedback history graph
    feedbackHistoryGraph.addFeedbacks(feedbacks, true);
   
    // create the algorithms
    EigenTrust repAlg = (EigenTrust) ReputationAlgorithm.getInstance("cu.repsystestbed.algorithms.examples.EigenTrust");
    RankbasedTrustAlg trustAlg = (RankbasedTrustAlg) TrustAlgorithm.getInstance("cu.repsystestbed.algorithms.examples.RankbasedTrustAlg");
   
    // create the work flow and add the items
    Workflow workflow = new Workflow();
    workflow.addItem(feedbackHistoryGraph);
    workflow.addItem(repAlg);
View Full Code Here

   
    //add eigentrust as an observer to the feedback history graph
    feedbackHistoryGraph.addObserver(repAlg);
   
    //rank based trust alg needs to use the reputation graph
    RankbasedTrustAlg trustAlg = (RankbasedTrustAlg) TrustAlgorithm.getInstance("cu.repsystestbed.algorithms.examples.RankbasedTrustAlg");
    trustAlg.setRatio(0.7);
    //must be called in this sequence otherwise setReputationGraph() will create a new trust graph
    trustAlg.setGraph2Output(trustGraph);
    trustAlg.setGraph2Listen(repGraph);

   
    //add rank based trust alg as an observer to the reputation graph
    repGraph.addObserver(trustAlg);
   
View Full Code Here

    feedbackHistoryGraph.notifyObservers(false);
   
    ReputationGraph repGraph = (ReputationGraph) repAlg.getGraph2Output();
    //TODO display the reputation graph.
   
    RankbasedTrustAlg trustAlg = (RankbasedTrustAlg) TrustAlgorithm.getInstance("cu.repsystestbed.algorithms.RankbasedTrustAlg");
    trustAlg.setRatio(0.7);
    trustAlg.setGraph2Listen(repGraph);
   
    repGraph.addObserver(trustAlg);
   
    repGraph.notifyObservers(null);
   
    TrustGraph trustGraph = (TrustGraph) trustAlg.getGraph2Output();
    //TODO display the trust graph.
   

   
   
View Full Code Here

    Hashtable<String, Object> storage = new Hashtable<String, Object>();
    storage.put("fhg", new FeedbackHistoryGraph(new FeedbackHistoryEdgeFactory()));
    storage.put("et", new EigenTrust());
    storage.put("rg", new ReputationGraph(new ReputationEdgeFactory()));
    storage.put("as", new Appleseed());
    storage.put("rk", new RankbasedTrustAlg());
    storage.put("tg", new TrustGraph(new TrustEdgeFactory()));
   
    WorkflowParser2 parser = new WorkflowParser2("rg>as>rg", storage);
    System.out.println(parser);
View Full Code Here

TOP

Related Classes of cu.repsystestbed.algorithms.examples.RankbasedTrustAlg

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.