Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82304671
perfs_handler.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Sep 10, 16:21
Size
1 KB
Mime Type
text/x-c++
Expires
Thu, Sep 12, 16:21 (2 d)
Engine
blob
Format
Raw Data
Handle
20680309
Attached To
rSPECMICP SpecMiCP / ReactMiCP
perfs_handler.hpp
View Options
/*-------------------------------------------------------
- Module : utils
- File : perfs_handler.hpp
- Author : Fabien Georget
Copyright (c) 2014, Fabien Georget, Princeton University
---------------------------------------------------------*/
#ifndef SPECMICP_UTILS_PERFSHANDLER_HPP
#define SPECMICP_UTILS_PERFSHANDLER_HPP
namespace
specmicp
{
//! \brief Handle a performance struct for the algorithms
//!
//! Like options handler but for the performance
template
<
class
PerformanceStruct
>
class
PerformanceHandler
{
public
:
//! \brief Return the performance (read-only)
const
PerformanceStruct
&
get_perfs
()
const
{
return
m_perfs
;}
//! \brief Reset the performance
void
reset_perfs
()
{
m_perfs
=
PerformanceStruct
();}
//! \brief Return a reference to the performance
PerformanceStruct
&
get_perfs
()
{
return
m_perfs
;}
protected
:
//! \brief Swap the performance with another
void
swap
(
PerformanceStruct
&
other
)
{
std
::
swap
(
m_perfs
,
other
);}
private
:
PerformanceStruct
m_perfs
;
};
}
// end namespace specmicp
#endif
// SPECMICP_UTILS_PERFSHANDLER_HPP
Event Timeline
Log In to Comment