Skip to content

Commit fba8455

Browse files
committed
feat(manager.hpp): create framework for stochastic processes and numerical schemes
1 parent 042887a commit fba8455

8 files changed

Lines changed: 65 additions & 5 deletions

File tree

include/lfmc/manager.hpp

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#pragma once
2+
3+
#include "lfmc/process.hpp"
4+
#include "lfmc/scheme.hpp"
5+
6+
/**
7+
* @file manager.hpp
8+
* @brief Manager class for handling processes and schemes using the Strategy Pattern.
9+
*
10+
* This file defines the `Manager` class, which is responsible for managing
11+
* multiple processes and schemes within the LFMC framework using the Strategy Pattern.
12+
*
13+
* @see Process
14+
* @see Scheme
15+
*/
16+
17+
namespace lfmc {
18+
19+
/**
20+
* @class Manager
21+
* @brief Manages processes and schemes using the Strategy Pattern.
22+
*
23+
* The `Manager` class is responsible for handling multiple processes and schemes,
24+
* allowing for dynamic selection and management of different strategies at runtime.
25+
*/
26+
class Manager {
27+
public:
28+
/// Constructor
29+
Manager() = default;
30+
// Additional methods for managing processes and schemes will be added here
31+
32+
private:
33+
// Internal data structures for managing processes and schemes will be added here
34+
// TODO decide on the appropriate strategy implementation - refer to notes and design patterns
35+
// TODO figure out how processes and schemes will interact with each other and decide
36+
// appropriate pattern
37+
};
38+
39+
} // namespace lfmc

include/lfmc/process.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#pragma once
2+
3+
/** @file process.hpp
4+
* @brief Process class representing a stochastic process.
5+
*
6+
* This file defines the `Process` class and implementations of different stochastic processes.
7+
*/

include/lfmc/scheme.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#pragma once
2+
3+
/* @file scheme.hpp
4+
* @brief Scheme class representing numerical schemes for stochastic processes.
5+
*
6+
* This file defines the `Scheme` class and implementations of different numerical schemes
7+
* used for simulating stochastic processes.
8+
*/

include/lfmc/timer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Timer {
2626
using clock = std::chrono::high_resolution_clock;
2727

2828
public:
29-
/// Constructor initializes and starts the timer.
29+
/// Constructor
3030
Timer() noexcept : start_time_(clock::now()) {}
3131

3232
/// Resets the timer to the current time.

src/CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# Source files for the lfmc library
2-
set(LFMC_SOURCES
3-
lfmc.cpp
4-
timer.cpp
5-
)
2+
# set(LFMC_SOURCES
3+
# lfmc.cpp
4+
# timer.cpp
5+
# )
6+
7+
# Set all .cpp files in src/ as sources
8+
file(GLOB LFMC_SOURCES "*.cpp")
69

710
# Create library
811
add_library(lfmc ${LFMC_SOURCES})

src/manager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "lfmc/manager.hpp"

src/process.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "lfmc/scheme.hpp"

src/scheme.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "lfmc/scheme.hpp"

0 commit comments

Comments
 (0)