Gromacs
2025.0-dev-20241009-5c23d5f
|
#include <gromacs/analysisdata/dataframe.h>
Value type for representing a single value in analysis data objects.
Default copy constructor and assignment operator are used and work as intended.
Methods in this class do not throw.
Non-const methods are provided for use within the library only; currently it is not possible to access a non-const AnalysisDataValue through the public interface.
Public Member Functions | |
AnalysisDataValue () | |
Constructs an unset value. | |
AnalysisDataValue (real value) | |
Constructs a value object with the given value. More... | |
real & | value () |
Direct access to the value. More... | |
real & | error () |
Direct access to the error estimate. More... | |
real | value () const |
Returns the value for this value. | |
real | error () const |
Returns the error estimate for this value, or zero if not set. | |
bool | isSet () const |
Returns whether this value has been set. More... | |
bool | hasError () const |
Returns whether the error estimate for this value has been set. More... | |
bool | isPresent () const |
Returns whether this value has been marked as present. More... | |
void | clear () |
Clears and unsets this value. | |
void | setValue (real value, bool bPresent=true) |
Sets this value. | |
void | setValue (real value, real error, bool bPresent=true) |
Sets this value and its error estimate. | |
void | setError (real error) |
Set only error estimate for this value. | |
|
inlineexplicit |
Constructs a value object with the given value.
The constructed object is marked as set and present.
|
inline |
Direct access to the error estimate.
Assigning a value to this does not mark the error estimate as set; setValue() must be used for this.
|
inline |
|
inline |
Returns whether this value has been marked as present.
If this method returns false, it is up to the source data to define whether isSet() may return true.
|
inline |
|
inline |
Direct access to the value.
Assigning a value to this does not mark the value as set; setValue() must be used for this.