Gromacs  2024.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions

#include <gromacs/analysisdata/dataframe.h>

Description

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...
 
realvalue ()
 Direct access to the value. More...
 
realerror ()
 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.
 

Constructor & Destructor Documentation

gmx::AnalysisDataValue::AnalysisDataValue ( real  value)
inlineexplicit

Constructs a value object with the given value.

The constructed object is marked as set and present.

Member Function Documentation

real& gmx::AnalysisDataValue::error ( )
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.

bool gmx::AnalysisDataValue::hasError ( ) const
inline

Returns whether the error estimate for this value has been set.

If this method returns false, but isSet() returns true, error() returns zero.

bool gmx::AnalysisDataValue::isPresent ( ) const
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.

bool gmx::AnalysisDataValue::isSet ( ) const
inline

Returns whether this value has been set.

If this method returns false, the return value of value() and error() are undefined.

real& gmx::AnalysisDataValue::value ( )
inline

Direct access to the value.

Assigning a value to this does not mark the value as set; setValue() must be used for this.


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