Package cu.repsystestbed.graphs

Examples of cu.repsystestbed.graphs.ReputationGraph.addObserver()


    trustAlg.setGraph2Output(trustGraph);
    trustAlg.setGraph2Listen(repGraph);

   
    //add rank based trust alg as an observer to the reputation graph
    repGraph.addObserver(trustAlg);
   
    //parse the feedbacks from the arff file
    DefaultArffFeedbackGenerator feedbackGen = new DefaultArffFeedbackGenerator();
    ArrayList<Feedback> feedbacks = (ArrayList<Feedback>) feedbackGen.generateHardcoded("feedbacks.arff");
   
View Full Code Here


   
    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

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.