BioDynaMo  v1.05.120-25dc9790
Public Member Functions | List of all members
bdm::experimental::Reducer< TResult > Struct Template Referenceabstract

#include <reduce.h>

Inheritance diagram for bdm::experimental::Reducer< TResult >:
[legend]
Collaboration diagram for bdm::experimental::Reducer< TResult >:
[legend]

Public Member Functions

 ~Reducer () override=default
 
virtual TResult GetResult ()=0
 
virtual void Reset ()=0
 Resets the internal state between calculations. More...
 
virtual ReducerNewCopy () const =0
 
- Public Member Functions inherited from bdm::Functor< void, Agent * >
virtual ~Functor ()=default
 
virtual void operator() (TArgs... args)=0
 

Detailed Description

template<typename TResult>
struct bdm::experimental::Reducer< TResult >

An interface for any type of implementation that wishes to calculate a reduction over all agents (e.g. counting, averaging, finding minimum and maximum values, etc.).
The benefit of this interface is that multiple reduction operations can be combined to avoid iterating over all agents multiple times.

Definition at line 38 of file reduce.h.

Constructor & Destructor Documentation

◆ ~Reducer()

template<typename TResult >
bdm::experimental::Reducer< TResult >::~Reducer ( )
overridedefault

Member Function Documentation

◆ GetResult()

template<typename TResult >
virtual TResult bdm::experimental::Reducer< TResult >::GetResult ( )
pure virtual

◆ NewCopy()

template<typename TResult >
virtual Reducer* bdm::experimental::Reducer< TResult >::NewCopy ( ) const
pure virtual

◆ Reset()

template<typename TResult >
virtual void bdm::experimental::Reducer< TResult >::Reset ( )
pure virtual

Resets the internal state between calculations.

Implemented in bdm::experimental::Counter< TResult >, and bdm::experimental::GenericReducer< T, TResult >.


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