![]() |
fpmas 1.6
|
Namespaces | |
namespace | detail |
Functions | |
std::vector< api::graph::DistributedId > | local_agent_ids (const api::model::AgentGroup &group) |
bool | is_agent_in_group (api::model::Agent *agent, api::model::GroupId group_id) |
bool | is_agent_in_group (api::model::Agent *agent, api::model::AgentGroup &group) |
template<typename AgentType > | |
bool | operator< (const Neighbor< AgentType > &n1, const Neighbor< AgentType > &n2) |
template<typename CellType > | |
std::vector< api::graph::DistributedId > | local_cell_ids (const api::model::SpatialModel< CellType > &model) |
fpmas::api::model implementations.
using fpmas::model::AgentBase = typedef detail::AgentBase<api::model::Agent, AgentType, TypeIdBase> |
Basic AgentBase that can be extended by the user to define an Agent.
AgentType | final Agent type, that must inherit from the current AgentBase. |
TypeIdBase | type used to define the type id of the current AgentBase implementation. |
typedef api::utils::Callback<AgentNode*> fpmas::model::AgentNodeCallback |
Callback specialization that can be extended to define user callbacks.
using fpmas::model::Model = typedef detail::DefaultModel<SyncMode> |
FPMAS default Model.
using fpmas::model::DistributedUniformGraphBuilder = typedef graph::DistributedUniformGraphBuilder<AgentPtr> |
graph::DistributedUniformGraphBuilder AgentPtr specialization.
using fpmas::model::DistributedClusteredGraphBuilder = typedef graph::DistributedClusteredGraphBuilder<AgentPtr> |
graph::DistributedClusteredGraphBuilder AgentPtr specialization.
using fpmas::model::RingGraphBuilder = typedef graph::RingGraphBuilder<AgentPtr> |
graph::RingGraphBuilder AgentPtr specialization.
using fpmas::model::SmallWorldGraphBuilder = typedef graph::SmallWorldGraphBuilder<AgentPtr> |
graph::SmallWorldGraphBuilder AgentPtr specialization.
using fpmas::model::ZoltanLoadBalancing = typedef graph::ZoltanLoadBalancing<AgentPtr> |
graph::ZoltanLoadBalancing AgentPtr specialization.
using fpmas::model::ScheduledLoadBalancing = typedef graph::ScheduledLoadBalancing<AgentPtr> |
graph::ScheduledLoadBalancing AgentPtr specialization.
using fpmas::model::RandomLoadBalancing = typedef graph::RandomLoadBalancing<AgentPtr> |
graph::RandomLoadBalancing AgentPtr specialization.
using fpmas::model::StaticLoadBalancing = typedef graph::StaticLoadBalancing<AgentPtr> |
graph::StaticLoadBalancing AgentPtr specialization.
Model fpmas::io::Breakpoint specialization.
An index mapping grid cell locations to agent indexes.
The count associated to each DiscretePoint represents the count of agents located at this location.
using fpmas::model::GridModel = typedef SpatialModel<SyncMode, CellType, EndCondition> |
Grid specialization of the SpatialModel.
using fpmas::model::MooreGrid = typedef GridConfig<MooreGridBuilder<CellType>, ChebyshevDistance, CellType> |
Moore GridConfig specialization, that might be used where a GridConfig
template parameter is required.
using fpmas::model::MooreRangeConfig = typedef GridRangeConfig<ChebyshevDistance, MooreRangePerimeter<GridConfig> > |
Moore GridRangeConfig specialization, that might be used where a GridRangeConfig
template parameter is required.
The explicit specialization of MooreRangePerimeter corresponding to GridConfig
, i.e. MooreRangePerimeter<GridConfig>
is automatically selected: the type is ill-formed if no such specialization exists.
using fpmas::model::MooreRange = typedef GridRange<GridConfig, MooreRangeConfig<GridConfig> > |
GridRange specialization defining variable size ranges with a Moore shape.
Formally a MooreRange range
centered on p1
is constituted by any point of the Grid p
such that ChebyshevDistance()(p1, p) <= range.getSize()
.
Notice the two following cases:
size==0
, only the current location is included in the range.size<0
, the range is empty.GridConfig
.GridConfig | a type defining the current grid configuration (e.g.: MooreGrid, VonNeumannGrid) |
using fpmas::model::Cell = typedef CellBase<api::model::Cell, CellType, TypeIdBase> |
Basic api::model::Cell implementation that can be extended by the user.
Such a Cell can be used to define a SpatialModel based on an arbitrary graph.
CellType | final Cell type, that must inherit from the current Cell. |
TypeIdBase | type used to define the type id of the current AgentBase implementation. |
using fpmas::model::VonNeumannGrid = typedef GridConfig<VonNeumannGridBuilder<CellType>, ManhattanDistance, CellType> |
VonNeumann GridConfig specialization, that might be used where a GridConfig
template parameter is required.
using fpmas::model::VonNeumannRangeConfig = typedef GridRangeConfig<ManhattanDistance, VonNeumannRangePerimeter<GridConfig> > |
VonNeumann GridRangeConfig specialization, that might be used where a GridRangeConfig
template parameter is required.
The explicit specialization of VonNeumannRangePerimeter corresponding to GridConfig
, i.e. VonNeumannRangePerimeter<GridConfig>
is automatically selected: the type is ill-formed if no such specialization exists.
using fpmas::model::VonNeumannRange = typedef GridRange<GridConfig, VonNeumannRangeConfig<GridConfig> > |
GridRange specialization defining variable size ranges with a VonNeumann shape.
Formally a VonNeumannRange range
centered on p1
is constituted by any point of the Grid p
such that ManhattanDistance()(p1, p) <= range.getSize()
.
Notice the two following cases:
size==0
, only the current location is included in the range.size<0
, the range is empty.GridConfig
.GridConfig | a type defining the current grid configuration (e.g.: MooreGrid, VonNeumannGrid) |
std::vector< api::graph::DistributedId > fpmas::model::local_agent_ids | ( | const api::model::AgentGroup & | group | ) |
Returns a vector containing the ids of LOCAL agents contained in the specified group.
group | AgentGroup to consider |
bool fpmas::model::is_agent_in_group | ( | api::model::Agent * | agent, |
api::model::GroupId | group_id | ||
) |
Checks if agent
is currently in the AgentGroup represented by group_id
.
bool fpmas::model::is_agent_in_group | ( | api::model::Agent * | agent, |
api::model::AgentGroup & | group | ||
) |
Checks if agent
is currently in group
.
bool fpmas::model::operator< | ( | const Neighbor< AgentType > & | n1, |
const Neighbor< AgentType > & | n2 | ||
) |
Default Neighbor comparison operator.
This can only compare agents using the operator<
, contrary to the generic CompareNeighbors implementation.
However, this definition might be useful to use external sorting algorithm or any other method requiring a Neighbor comparison using the operator<
.
mobility_field.sort()
can be used directly to produce the same behavior. std::vector< api::graph::DistributedId > fpmas::model::local_cell_ids | ( | const api::model::SpatialModel< CellType > & | model | ) |
Returns a vector containing the ids of LOCAL Cells in the specified model.
model | SpatialModel to consider |