Gromacs  2016.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::AnalysisDataFrameRef Class Reference

#include <gromacs/analysisdata/dataframe.h>

Description

Value type wrapper for non-mutable access to a data frame.

Default copy constructor and assignment operator are used and work as intended. Typically new objects of this type are only constructed internally by the library and in classes that are derived from AbstractAnalysisData.

Methods in this class do not throw, but may contain asserts for incorrect usage.

Note that it is not possible to change the contents of an initialized object, except by assigning a new object to replace it completely.

Public Member Functions

 AnalysisDataFrameRef ()
 Constructs an invalid frame reference. More...
 
 AnalysisDataFrameRef (const AnalysisDataFrameHeader &header, const AnalysisDataValuesRef &values, const AnalysisDataPointSetInfosRef &pointSets)
 Constructs a frame reference from given values. More...
 
 AnalysisDataFrameRef (const AnalysisDataFrameHeader &header, const std::vector< AnalysisDataValue > &values, const std::vector< AnalysisDataPointSetInfo > &pointSets)
 Constructs a frame reference from given values. More...
 
 AnalysisDataFrameRef (const AnalysisDataFrameRef &frame, int firstColumn, int columnCount)
 Constructs a frame reference to a subset of columns. More...
 
bool isValid () const
 Returns whether the object refers to a valid frame. More...
 
const AnalysisDataFrameHeaderheader () const
 Returns the header for this frame.
 
int frameIndex () const
 Returns zero-based index of the frame. More...
 
real x () const
 Returns the x coordinate for the frame. More...
 
real dx () const
 Returns error in the x coordinate for the frame (if applicable). More...
 
int pointSetCount () const
 Returns the number of point sets for this frame. More...
 
AnalysisDataPointSetRef pointSet (int index) const
 Returns point set reference for a given point set. More...
 
real y (int i) const
 Convenience method for accessing a column value in simple data. More...
 
real dy (int i) const
 Convenience method for accessing error for a column value in simple data. More...
 
bool present (int i) const
 Convenience method for accessing present status for a column in simple data. More...
 
bool allPresent () const
 Returns true if all points in this frame are present.
 

Constructor & Destructor Documentation

gmx::AnalysisDataFrameRef::AnalysisDataFrameRef ( )

Constructs an invalid frame reference.

Return values of other methods than isValid() are unspecified for the constructed object.

gmx::AnalysisDataFrameRef::AnalysisDataFrameRef ( const AnalysisDataFrameHeader header,
const AnalysisDataValuesRef values,
const AnalysisDataPointSetInfosRef &  pointSets 
)

Constructs a frame reference from given values.

Parameters
[in]headerHeader for the frame.
[in]valuesValues for each column.
[in]pointSetsPoint set data.
gmx::AnalysisDataFrameRef::AnalysisDataFrameRef ( const AnalysisDataFrameHeader header,
const std::vector< AnalysisDataValue > &  values,
const std::vector< AnalysisDataPointSetInfo > &  pointSets 
)

Constructs a frame reference from given values.

Parameters
[in]headerHeader for the frame.
[in]valuesValues for each column.
[in]pointSetsPoint set data.
gmx::AnalysisDataFrameRef::AnalysisDataFrameRef ( const AnalysisDataFrameRef frame,
int  firstColumn,
int  columnCount 
)

Constructs a frame reference to a subset of columns.

Parameters
[in]frameFrame to use as source.
[in]firstColumnFirst column index to include.
[in]columnCountNumber of columns to include.

Creates a frame reference that contains columnCount columns starting from firstColumn from frame, or a subset if all requested columns are not present in frame.

Mainly intended for internal use.

Member Function Documentation

real gmx::AnalysisDataFrameRef::dx ( ) const
inline

Returns error in the x coordinate for the frame (if applicable).

All data do not provide error estimates. Typically returns zero in those cases.

Should not be called for invalid frames.

real gmx::AnalysisDataFrameRef::dy ( int  i) const
inline

Convenience method for accessing error for a column value in simple data.

Parameters
[in]iZero-based column index relative to firstColumn(). Should be >= 0 and < columnCount().

Currently, this method returns zero if the source data does not specify errors.

int gmx::AnalysisDataFrameRef::frameIndex ( ) const
inline

Returns zero-based index of the frame.

The return value is >= 0 for valid frames. Should not be called for invalid frames.

bool gmx::AnalysisDataFrameRef::isValid ( ) const
inline

Returns whether the object refers to a valid frame.

If returns false, return values of other methods are not specified.

AnalysisDataPointSetRef gmx::AnalysisDataFrameRef::pointSet ( int  index) const
inline

Returns point set reference for a given point set.

Should not be called for invalid frames.

int gmx::AnalysisDataFrameRef::pointSetCount ( ) const
inline

Returns the number of point sets for this frame.

Returns zero for an invalid frame.

bool gmx::AnalysisDataFrameRef::present ( int  i) const
inline

Convenience method for accessing present status for a column in simple data.

Parameters
[in]iZero-based column index relative to firstColumn(). Should be >= 0 and < columnCount().

If present(i) returns false, it is depends on the source data whether y(i) and/or dy(i) are defined.

real gmx::AnalysisDataFrameRef::x ( ) const
inline

Returns the x coordinate for the frame.

Should not be called for invalid frames.

real gmx::AnalysisDataFrameRef::y ( int  i) const
inline

Convenience method for accessing a column value in simple data.

Parameters
[in]iZero-based column index relative to firstColumn(). Should be >= 0 and < columnCount().

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