fpmas-metamodel 1.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
MetaGridCell Class Reference

#include <cell.h>

Inheritance diagram for MetaGridCell:
Inheritance graph
[legend]
Collaboration diagram for MetaGridCell:
Collaboration graph
[legend]

Public Member Functions

 MetaGridCell (DiscretePoint location, float utility, const std::vector< char > &data)
 
 MetaGridCell (DiscretePoint location, float utility, std::size_t cell_size)
 
const fpmas::api::model::AgentNode * cellNode () const override
 
 MetaCell ()=default
 
 MetaCell (float utility, std::size_t cell_size)
 
 MetaCell (float utility, const std::vector< char > &data)
 
- Public Member Functions inherited from MetaCell
 MetaCell ()=default
 
 MetaCell (float utility, std::size_t cell_size)
 
 MetaCell (float utility, const std::vector< char > &data)
 
float getUtility () const
 
const std::vector< char > & getData () const
 
void update_edge_weights ()
 
virtual void read_all_cell ()=0
 
virtual void read_one_cell ()=0
 
virtual void write_all_cell ()=0
 
virtual void write_one_cell ()=0
 
virtual void read_all_write_one_cell ()=0
 
virtual void read_all_write_all_cell ()=0
 
virtual const fpmas::api::model::AgentNode * cellNode () const =0
 

Additional Inherited Members

- Static Public Member Functions inherited from CellSerialization< MetaGridCell >
static void to_json (nlohmann::json &j, const MetaGridCell *cell)
 
static MetaGridCellfrom_json (const nlohmann::json &j)
 
static std::size_t size (const fpmas::io::datapack::ObjectPack &o, const MetaGridCell *cell)
 
static void to_datapack (fpmas::io::datapack::ObjectPack &o, const MetaGridCell *cell)
 
static MetaGridCellfrom_datapack (const fpmas::io::datapack::ObjectPack &o)
 
- Static Public Attributes inherited from MetaCell
static float cell_edge_weight
 

Detailed Description

MetaCell extension of MetaGridModel.

Constructor & Destructor Documentation

◆ MetaGridCell() [1/2]

MetaGridCell::MetaGridCell ( DiscretePoint  location,
float  utility,
const std::vector< char > &  data 
)
inline

MetaGridCell constructor.

Parameters
locationDiscrete location of the cell
utilityUtility of the cell
dataVector of dummy data

◆ MetaGridCell() [2/2]

MetaGridCell::MetaGridCell ( DiscretePoint  location,
float  utility,
std::size_t  cell_size 
)
inline

MetaGridCell constructor.

The vector of dummy data is allocated and default initialized with the specified count of elements.

Parameters
locationDiscrete location of the cell
utilityUtility of the cell
cell_sizeSize of the vector of dummy data

Member Function Documentation

◆ cellNode()

const fpmas::api::model::AgentNode * MetaGridCell::cellNode ( ) const
inlineoverridevirtual

Returns a pointer to the node containing the cell.

Implements MetaCell.

◆ MetaCell() [1/3]

MetaCell::MetaCell ( )
default

Default generated MetaCell constructor, for internal use only.

◆ MetaCell() [2/3]

MetaCell::MetaCell ( float  utility,
std::size_t  cell_size 
)
inline

MetaCell constructor.

The vector of dummy data is allocated and default initialized with the specified count of elements.

Parameters
utilityUtility of the cell
cell_sizeSize of the vector of dummy data

◆ MetaCell() [3/3]

MetaCell::MetaCell ( float  utility,
const std::vector< char > &  data 
)
inline

MetaCell constructor.

Parameters
utilityUtility of the cell
dataVector of dummy data

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