BioDynaMo  v1.05.119-a4ff3934
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
bdm::RandomizedRm< TBaseRm > Class Template Reference

#include <randomized_rm.h>

Inheritance diagram for bdm::RandomizedRm< TBaseRm >:
[legend]
Collaboration diagram for bdm::RandomizedRm< TBaseRm >:
[legend]

Public Member Functions

 RandomizedRm (TRootIOCtor *r)
 
 RandomizedRm (bool auto_randomize=true)
 
virtual ~RandomizedRm ()
 
void RandomizeAgentsOrder ()
 
void EndOfIteration () override
 

Protected Member Functions

 BDM_CLASS_DEF_NV (RandomizedRm, 1)
 

Protected Attributes

bool auto_randomize_ = true
 

Detailed Description

template<typename TBaseRm>
class bdm::RandomizedRm< TBaseRm >

A specialized implementation of ResourceManager that randomly shuffles the order of agents to enable looping over agents randomly. By default, the random reordering happens at the end of every iterations (during the teardown operation), but this can be turned off by initializing the auto_randomize_ variable with false. To manually trigger the random reordering of agents, you can call the RandomizeAgentsOrder function.

Definition at line 33 of file randomized_rm.h.

Constructor & Destructor Documentation

◆ RandomizedRm() [1/2]

template<typename TBaseRm >
bdm::RandomizedRm< TBaseRm >::RandomizedRm ( TRootIOCtor *  r)
inlineexplicit

Definition at line 35 of file randomized_rm.h.

◆ RandomizedRm() [2/2]

template<typename TBaseRm >
bdm::RandomizedRm< TBaseRm >::RandomizedRm ( bool  auto_randomize = true)

Definition at line 51 of file randomized_rm.h.

◆ ~RandomizedRm()

template<typename TBaseRm >
bdm::RandomizedRm< TBaseRm >::~RandomizedRm ( )
virtualdefault

Member Function Documentation

◆ BDM_CLASS_DEF_NV()

template<typename TBaseRm >
bdm::RandomizedRm< TBaseRm >::BDM_CLASS_DEF_NV ( RandomizedRm< TBaseRm >  ,
 
)
protected

◆ EndOfIteration()

template<typename TBaseRm >
void bdm::RandomizedRm< TBaseRm >::EndOfIteration
override

Definition at line 95 of file randomized_rm.h.

◆ RandomizeAgentsOrder()

template<typename TBaseRm >
void bdm::RandomizedRm< TBaseRm >::RandomizeAgentsOrder

Definition at line 72 of file randomized_rm.h.

Member Data Documentation

◆ auto_randomize_

template<typename TBaseRm >
bool bdm::RandomizedRm< TBaseRm >::auto_randomize_ = true
protected

Definition at line 45 of file randomized_rm.h.


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