GAMS  1.2.2
ElectionCumulative.h
Go to the documentation of this file.
1 
54 #ifndef _GAMS_ELECTIONS_CUMULATIVE_ELECTION_H_
55 #define _GAMS_ELECTIONS_CUMULATIVE_ELECTION_H_
56 
57 #include <vector>
58 #include <string>
59 #include <map>
60 
61 #include "madara/knowledge/containers/StringVector.h"
62 
63 #include "ElectionBase.h"
64 #include "ElectionFactory.h"
65 
66 namespace gams
67 {
68  namespace elections
69  {
75  {
76  public:
83  ElectionCumulative (const std::string & election_prefix = "",
84  const std::string & agent_prefix = "",
85  madara::knowledge::KnowledgeBase * knowledge = 0);
86 
90  virtual ~ElectionCumulative ();
91 
98  virtual CandidateList get_leaders (int num_leaders = 1);
99 
103  std::string get_leader (void);
104  };
105 
110  {
111  public:
112 
117 
121  virtual ~ElectionCumulativeFactory ();
122 
130  virtual ElectionBase * create (const std::string & election_prefix = "",
131  const std::string & agent_prefix = "",
132  madara::knowledge::KnowledgeBase * knowledge = 0);
133  };
134  }
135 }
136 
137 #endif // _GAMS_ELECTIONS_CUMULATIVE_ELECTION_H_
An election that implements cumulative voting.
Factory for creating plurality elections.
Contains all GAMS-related tools, classes and code.
std::vector< std::string > CandidateList
list of candidates
Definition: ElectionBase.h:73
Copyright (c) 2016 Carnegie Mellon University.
Base class for an auction factory.
#define GAMS_EXPORT
Definition: GamsExport.h:20
Copyright (c) 2016 Carnegie Mellon University.
Base class for an election.
Definition: ElectionBase.h:82