Package cu.repsystestbed.graphs

Examples of cu.repsystestbed.graphs.ReputationEdgeFactory


  {
    BasicConfigurator.configure();
   
    // create the graphs
    FeedbackHistoryGraph feedbackHistoryGraph = new FeedbackHistoryGraph(new FeedbackHistoryEdgeFactory());
    ReputationGraph repGraph = new ReputationGraph(new ReputationEdgeFactory());
    TrustGraph trustGraph = new TrustGraph(new TrustEdgeFactory());
   
    // populate the feedback history graph by parsing the feedbacks from a arff file
    DefaultArffFeedbackGenerator feedbackGen = new DefaultArffFeedbackGenerator();
    List<Feedback> feedbacks = feedbackGen.generateHardcoded("feedbacks.arff");
View Full Code Here


     * Creates a Reputation Graph.
     * @param graphConfig This object contains all of the configurations for this graph
     * @param feedbackGraph The feedbackGraph is needed to find what Agents are currently on it.
     */
    public SimReputationGraph(GraphConfig graphConfig, SimFeedbackGraph feedbackGraph) {
        super(graphConfig, (SimpleDirectedGraph) new ReputationGraph(new ReputationEdgeFactory()));
        this.feedbackGraph = feedbackGraph;
    }
View Full Code Here

  {
    BasicConfigurator.configure();
   
    // create the graphs
    FeedbackHistoryGraph feedbackHistoryGraph = new FeedbackHistoryGraph(new FeedbackHistoryEdgeFactory());
    ReputationGraph repGraph = new ReputationGraph(new ReputationEdgeFactory());
    TrustGraph trustGraph = new TrustGraph(new TrustEdgeFactory());
   
    // populate the feedback history graph by parsing the feedbacks from a arff file
    DefaultArffFeedbackGenerator feedbackGen = new DefaultArffFeedbackGenerator();
    ArrayList<Feedback> feedbacks = (ArrayList<Feedback>) feedbackGen.generateHardcoded("feedbacks.arff");
View Full Code Here

{
  static private Logger logger = Logger.getLogger(ReputationGraphCreator.class);
 
  public static ReputationGraph createGraph(String arffFileName) throws Exception
  {
    ReputationGraph repGraph = new ReputationGraph(new ReputationEdgeFactory());
   
    Util.assertNotNull(arffFileName);
    Util.assertFileExists(arffFileName);
   
    DataSource source;
View Full Code Here

        }
    }
 
  public static void main(String[] args) throws Exception
  {
    ReputationGraph repGraph = new ReputationGraph(new ReputationEdgeFactory());
    Agent a0 = new Agent();
    Agent a1 = new Agent();
    Agent a2 = new Agent();
    Agent a3 = new Agent();
    Agent a4 = new Agent();
View Full Code Here

  {
    if(!(g instanceof FeedbackHistoryGraph))
      throw new Exception("Can only listen to a feedback history graph.");
   
    super.m_graph2Listen = (FeedbackHistoryGraph)g;
    if(m_graph2Output == null) m_graph2Output = new ReputationGraph(new ReputationEdgeFactory());
    super.produceCompleteGraph = false;
   
    //initialize the reputation graph
    Set<TestbedEdge> edges = super.m_graph2Listen.edgeSet();
    for(TestbedEdge e : edges)
View Full Code Here

   
    BasicConfigurator.configure();
   
    //create graphs
    FeedbackHistoryGraph feedbackHistoryGraph = new FeedbackHistoryGraph(new FeedbackHistoryEdgeFactory());
    ReputationGraph repGraph = new ReputationGraph(new ReputationEdgeFactory());
    TrustGraph trustGraph = new TrustGraph(new TrustEdgeFactory());
   
    //swing listeners
    Workflow2 workflow2 = new Workflow2(feedbackHistoryGraph, repGraph, trustGraph);
    workflow2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
View Full Code Here

  public void setGraph2Listen(SimpleDirectedGraph feedbackHistoryGraph) throws Exception
  {

    assertGraph2ListenType(feedbackHistoryGraph);
    this.m_graph2Listen = (FeedbackHistoryGraph)feedbackHistoryGraph;
    if(m_graph2Output == null) m_graph2Output = new ReputationGraph(new ReputationEdgeFactory());
    //initialize the reputation graph
    if(produceCompleteGraph)
    {
      Set<FeedbackHistoryGraphEdge> edges = ((FeedbackHistoryGraph)this.m_graph2Listen).edgeSet();
      for(FeedbackHistoryGraphEdge edge : edges)
View Full Code Here

  public void setGraph2Listen(Graph g) throws Exception
  {
    if(!(g instanceof ReputationGraph)) throw new Exception("Can only listen to Reputation Graph.");
   
    super.m_graph2Listen = (ReputationGraph)g;
    if(m_graph2Output == null) m_graph2Output = new ReputationGraph(new ReputationEdgeFactory());
    if(produceCompleteGraph)
    {
      Set<ReputationEdge> edges = ((ReputationGraph)super.m_graph2Listen).edgeSet(); //should be ok to cast here
      for(ReputationEdge edge : edges)
      {
View Full Code Here

            FeedbackHistoryGraph fhg = new FeedbackHistoryGraph(new FeedbackHistoryEdgeFactory());
            m_workflow.addItem(fhg);
            storage.put("int_fhg_" + r.nextInt(1000), fhg);
            break;
          case RG:
            ReputationGraph rg = new ReputationGraph(new ReputationEdgeFactory());
            m_workflow.addItem(rg);
            storage.put("int_rg_" + r.nextInt(1000), rg);
            break;
          case TG:
            TrustGraph tg = new TrustGraph(new TrustEdgeFactory());
View Full Code Here

TOP

Related Classes of cu.repsystestbed.graphs.ReputationEdgeFactory

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.