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 oILAB {
11template <typename StateType, typename SystemType, typename Derived>
12class Ensemble {
13public:
14 const Derived &derived;
15
16 Ensemble() : derived(static_cast<const Derived &>(*this)) {}
17
18 SystemType constructSystem(const StateType &state) const {
19 return derived.constructSystem(state);
20 }
21
22 std::pair<StateType, SystemType>
23 sampleNewState(const StateType &currentState) {
24 return derived.sampleNewState(currentState);
25 }
26 };
27 } // namespace oILAB
28
29#endif //OILAB_ENSEMBLE_H
const Derived & derived
Definition Ensemble.h:14
std::pair< StateType, SystemType > sampleNewState(const StateType &currentState)
Definition Ensemble.h:23
SystemType constructSystem(const StateType &state) const
Definition Ensemble.h:18