|
| Graph (std::string name, bool directed, EcM *edgeContentMgr) |
| Creates a Graph with the specified name. More...
|
|
| Graph (const Graph< V, E, Ec, EcM > &graph) |
| Copy constructor for the graph.
|
|
Graph & | operator= (const Graph &graph) |
|
virtual boost::shared_ptr< E > | addEdge (V *source, V *target) |
| Adds an edge between source and target to this Graph. More...
|
|
virtual boost::shared_ptr< E > | addEdge (V *source, V *target, double weight) |
| Adds an edge with the specified weight between source and target to this Graph. More...
|
|
virtual boost::shared_ptr< E > | findEdge (V *source, V *target) |
| Gets the edge between the source and target or 0 if no such edge is found. More...
|
|
virtual void | successors (V *vertex, std::vector< V * > &out) |
| Gets the sucessors of the specified vertex and puts them in out. More...
|
|
virtual void | predecessors (V *vertex, std::vector< V * > &out) |
| Gets the predecessors of the specified vertex and puts them in out. More...
|
|
virtual void | adjacent (V *vertex, std::vector< V * > &out) |
| Gets all the agent adjacent to the specified vertex. More...
|
|
virtual void | removeEdge (V *source, V *target) |
| Removes the edge between source and target from this Graph. More...
|
|
virtual void | removeEdge (const AgentId &source, const AgentId &target) |
| Removes the edge between source and target from this Graph. More...
|
|
virtual int | inDegree (V *vertex) |
| Gets the in-degree of the specified vertex. More...
|
|
virtual int | outDegree (V *vertex) |
| Gets the out-degree of the specified vertex. More...
|
|
int | edgeCount () const |
| Gets the number of edges in this Graph. More...
|
|
int | vertexCount () const |
| Gets the number of vertices in this Graph. More...
|
|
vertex_iterator | verticesBegin () |
| Gets the start of an iterator over all the vertices in this graph. More...
|
|
vertex_iterator | verticesEnd () |
| Gets the end of an iterator over all the vertices in this graph. More...
|
|
void | showEdges () |
|
virtual bool | isMaster (E *e)=0 |
|
virtual bool | keepsAgentsOnSyncProj () |
| Should return true if the Projection implemented can 'keep' some (non-local) agents during a projection information synchronization operation. More...
|
|
virtual bool | sendsSecondaryAgentsOnStatusExchange () |
| Should return true if the Projection implemented will send secondary agents during a status exchange. More...
|
|
virtual void | getInfoExchangePartners (std::set< int > &psToSendTo, std::set< int > &psToReceiveFrom) |
| Gets the set of processes with which this Projection exchanges projection info. More...
|
|
virtual void | getAgentStatusExchangePartners (std::set< int > &psToSendTo, std::set< int > &psToReceiveFrom) |
| Gets the set of processes with which this Projection exchanges agent status info- that is, the set of processes from which agents can move to this one or to which they can move when moving from this one. More...
|
|
virtual void | getProjectionInfo (std::vector< AgentId > &agents, std::vector< ProjectionInfoPacket * > &packets, bool secondaryInfo=false, std::set< AgentId > *secondaryIds=0, int destProc=-1) |
| Convenience wrapper that gets all of the projection information for the agents specified (calls implementation in child class that gets only the information for one agent).
|
|
virtual ProjectionInfoPacket * | getProjectionInfo (AgentId id, bool secondaryInfo=false, std::set< AgentId > *secondaryIds=0, int destProc=-1) |
|
virtual void | updateProjectionInfo (ProjectionInfoPacket *pip, Context< V > *context) |
|
virtual void | getRequiredAgents (std::set< AgentId > &agentsToTest, std::set< AgentId > &agentsRequired, RADIUS radius=Projection< V >::PRIMARY) |
|
virtual void | getAgentsToPush (std::set< AgentId > &agentsToTest, std::map< int, std::set< AgentId > > &agentsToPush) |
| Given a set of agents, gets the agents that this projection implementation must 'push' to other processes. More...
|
|
virtual void | cleanProjectionInfo (std::set< AgentId > &agentsToKeep) |
|
void | clearConflictedEdges () |
|
void | getConflictedEdges (std::set< boost::shared_ptr< E > > &conflictedEdges) |
|
void | updateProjectionInfo (std::vector< ProjectionInfoPacket * > &pips, Context< V > *context) |
| Updates the projection information for the agents in this projection according to the information contained in the vector of information packets passed.
|
|
| Projection (std::string name) |
| Creates a projection with specified name. More...
|
|
const std::string | name () const |
| Gets the name of this projection.
|
|
void | addFilterVal (int type) |
| Adds an entry to the list of agent types that can be added to this projection. More...
|
|
void | removeFilterVal (int type) |
| Removes an entry from the list of agent types that can be added to this projection. More...
|
|
void | clearFilter () |
| Clears the list of agent types that can be added to this projection; the result is that the filter is empty, and any agent can be added.
|
|
bool | agentCanBeAdded (boost::shared_ptr< V > agent) |
| Returns true if the agent can be added to the projection, which will be the case if the filter list is empty or if the agent's type is in the filter list. More...
|
|
virtual void | getRequiredAgents (std::set< AgentId > &agentsToTest, std::set< AgentId > &agentsRequired, RADIUS radius=PRIMARY)=0 |
| Given a set of agents to test, gets the subset that must be kept in order to fulfill the projection's 'contract' to the specified radius. More...
|
|
virtual void | balance () |
|
template<typename V, typename E, typename Ec, typename EcM>
class repast::Graph< V, E, Ec, EcM >
Graph / Network implementation where agents are vertices in the graph.
- Template Parameters
-
V | the type agents in the graph. This type should extend repast::Agent |
E | the edge type of the graph. This type should extend repast::RepastEdge. |
Ec | class of serializable Edge Content |
EcM | Class that is capable of transforming an Edge into Edge Content and vice versa |
template<typename V , typename E , typename Ec , typename EcM >
virtual bool repast::Graph< V, E, Ec, EcM >::keepsAgentsOnSyncProj |
( |
| ) |
|
|
inlinevirtual |
Should return true if the Projection implemented can 'keep' some (non-local) agents during a projection information synchronization operation.
Generally spaces will allow all non-local agents to be deleted, but graphs keep the non-local agents that participate in Master edges.
It is possible to override these. A graph projection can be created that does not permit non-local agents to be 'kept'. This would be an extremely unusual use case, but it is possible.
Note that these are used for optimization. If no projection in a given context keeps any agents, several steps in the synchronization algorithm can be omitted. Of course, omitting these steps when a projection actually retains agents can caused undefined problems.
- Returns
- true if this projection will keep non-local agents during a projection information synchronziation event, false if it will not.
Implements repast::Projection< V >.