DiffEq - Modern C++ ODE Integration Library 1.0.0
High-performance C++ library for solving ODEs with async signal processing
Loading...
Searching...
No Matches
AdvancedAsioIntegrationManager< State > Class Template Reference

高级异步积分管理器 - 支持自适应参数优化 More...

Public Member Functions

 AdvancedAsioIntegrationManager (std::unique_ptr< diffeq::core::AbstractIntegrator< State > > integrator, size_t thread_count=std::thread::hardware_concurrency())
 构造函数
 
void set_optimization_parameters (double tolerance, size_t max_iterations)
 设置优化参数
 
template<typename ObjectiveFunction , typename ParameterUpdateFunction >
void optimize_parameters_async (const State &initial_state, const std::vector< double > &initial_params, ObjectiveFunction &&objective, ParameterUpdateFunction &&param_update, std::function< void(const std::vector< double > &, double)> callback=nullptr)
 启动自适应参数优化
 
void run (std::chrono::milliseconds timeout=std::chrono::milliseconds::max())
 运行事件循环
 
const std::vector< std::pair< std::vector< double >, double > > & get_optimization_history () const
 获取优化历史
 
std::vector< double > get_current_parameters () const
 获取当前参数
 

Detailed Description

template<typename State>
class AdvancedAsioIntegrationManager< State >

高级异步积分管理器 - 支持自适应参数优化

这个示例展示了如何构建一个完整的参数优化系统, 其中每个 ODE 计算完成后都会触发参数调整和新的计算。

Definition at line 27 of file advanced_asio_integration.cpp.

Constructor & Destructor Documentation

◆ AdvancedAsioIntegrationManager()

template<typename State >
AdvancedAsioIntegrationManager< State >::AdvancedAsioIntegrationManager ( std::unique_ptr< diffeq::core::AbstractIntegrator< State > >  integrator,
size_t  thread_count = std::thread::hardware_concurrency() 
)
inline

构造函数

Definition at line 52 of file advanced_asio_integration.cpp.

Member Function Documentation

◆ get_current_parameters()

template<typename State >
std::vector< double > AdvancedAsioIntegrationManager< State >::get_current_parameters ( ) const
inline

获取当前参数

Definition at line 115 of file advanced_asio_integration.cpp.

◆ get_optimization_history()

template<typename State >
const std::vector< std::pair< std::vector< double >, double > > & AdvancedAsioIntegrationManager< State >::get_optimization_history ( ) const
inline

获取优化历史

Definition at line 108 of file advanced_asio_integration.cpp.

◆ optimize_parameters_async()

template<typename State >
template<typename ObjectiveFunction , typename ParameterUpdateFunction >
void AdvancedAsioIntegrationManager< State >::optimize_parameters_async ( const State &  initial_state,
const std::vector< double > &  initial_params,
ObjectiveFunction &&  objective,
ParameterUpdateFunction &&  param_update,
std::function< void(const std::vector< double > &, double)>  callback = nullptr 
)
inline

启动自适应参数优化

Definition at line 74 of file advanced_asio_integration.cpp.

◆ run()

template<typename State >
void AdvancedAsioIntegrationManager< State >::run ( std::chrono::milliseconds  timeout = std::chrono::milliseconds::max())
inline

运行事件循环

Definition at line 94 of file advanced_asio_integration.cpp.

◆ set_optimization_parameters()

template<typename State >
void AdvancedAsioIntegrationManager< State >::set_optimization_parameters ( double  tolerance,
size_t  max_iterations 
)
inline

设置优化参数

Definition at line 65 of file advanced_asio_integration.cpp.


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