Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F87521942
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
Sun, Oct 13, 04:25
Size
1 KB
Mime Type
text/x-c++
Expires
Tue, Oct 15, 04:25 (2 d)
Engine
blob
Format
Raw Data
Handle
21542450
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