oILAB
Loading...
Searching...
No Matches
Ensemble.h
Go to the documentation of this file.
1//
2// Created by Nikhil Chandra Admal on 8/5/24.
3//
4
5#ifndef OILAB_ENSEMBLE_H
6#define OILAB_ENSEMBLE_H
7
8#include <iostream>
9
10namespace gbLAB {
11 template<typename StateType, typename SystemType, typename Derived>
12 class Ensemble {
13 public:
14 const Derived &derived;
15
16 Ensemble() : derived(static_cast<const Derived &>(*this)) {}
17
18 SystemType constructSystem(const StateType &state) const
19 {
20 return derived.constructSystem(state);
21 }
22
23 std::pair<StateType, SystemType> sampleNewState(const StateType &currentState)
24 {
25 return derived.sampleNewState(currentState);
26 }
27 };
28}
29
30#endif //OILAB_ENSEMBLE_H
const Derived & derived
Definition Ensemble.h:14
SystemType constructSystem(const StateType &state) const
Definition Ensemble.h:18
std::pair< StateType, SystemType > sampleNewState(const StateType &currentState)
Definition Ensemble.h:23