fpmas 1.6
Public Member Functions | List of all members
fpmas::model::detail::CurrentOutLayer Class Reference

#include <spatial_model.h>

Public Member Functions

 CurrentOutLayer (api::model::Agent *agent, fpmas::graph::LayerId layer_id)
 
bool contains (fpmas::api::model::Agent *agent)
 
void link (fpmas::api::model::Agent *other_agent)
 

Detailed Description

Utility class used to describe agents currently contained in the current outgoing neighbors of an agent, on a given layer.

Constructor & Destructor Documentation

◆ CurrentOutLayer()

fpmas::model::detail::CurrentOutLayer::CurrentOutLayer ( api::model::Agent agent,
fpmas::graph::LayerId  layer_id 
)
inline

CurrentOutLayer constructor.

Parameters
agentroot agent
layer_idid of the layer on which outgoing neighbors of the agent are considered

Member Function Documentation

◆ contains()

bool fpmas::model::detail::CurrentOutLayer::contains ( fpmas::api::model::Agent agent)
inline

Checks if the input agent is contained in the current outgoing neighbors of the root agent on the current layer.

Parameters
agentagent to check
Returns
true iff the agent is contained in the outgoing neighbors on the layer

◆ link()

void fpmas::model::detail::CurrentOutLayer::link ( fpmas::api::model::Agent other_agent)
inline

Builds a link from the root agent to the provided other agent on the current layer. This method allows to automatically update the CurrentOutLayer, while directly calling the link operation does not.

Parameters
other_agentagent to link

The documentation for this class was generated from the following file: