![]() |
fpmas 1.6
|
#include <model.h>
Public Member Functions | |
AgentNodeBuilder (api::model::AgentGroup &group) | |
void | push (api::model::Agent *agent) |
api::model::AgentNode * | buildNode (api::graph::DistributedGraph< AgentPtr > &) override |
std::size_t | nodeCount () override |
![]() | |
virtual std::size_t | nodeCount ()=0 |
virtual DistributedNode< AgentPtr > * | buildNode (DistributedGraph< AgentPtr > &graph)=0 |
An api::graph::NodeBuilder implementation that can be used to easily generate a random model, that can be provided to an api::graph::GraphBuilder implementation.
AgentNodes are built automatically, and can be linked according to the api::graph::GraphBuilder algorithm implementation.
|
inline |
AgentNodeBuilder constructor.
group | group to which agents will be added |
|
inline |
Pushes an agent into the node builder, that will be inserted into the graph with the buildNode() function.
agent | agent to add to the graph |
|
override |
Adds the agent to the specified group, using the api::model::AgentGroup::add() method.
In consequence, a node is automatically built and added to the group's underlying graph.
Such node can be linked automatically as specified by the api::graph::GraphBuilder algorithm implementation.
|
inlineoverridevirtual |
Returns the count of agents left in the AgentNodeBuilder.
Implements fpmas::api::graph::NodeBuilder< AgentPtr >.