Gromacs
5.1.4
|
#include <gromacs/analysisdata/dataframe.h>
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 AnalysisDataFrameHeader & | header () 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. | |
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.
[in] | header | Header for the frame. |
[in] | values | Values for each column. |
[in] | pointSets | Point 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.
[in] | header | Header for the frame. |
[in] | values | Values for each column. |
[in] | pointSets | Point set data. |
gmx::AnalysisDataFrameRef::AnalysisDataFrameRef | ( | const AnalysisDataFrameRef & | frame, |
int | firstColumn, | ||
int | columnCount | ||
) |
Constructs a frame reference to a subset of columns.
[in] | frame | Frame to use as source. |
[in] | firstColumn | First column index to include. |
[in] | columnCount | Number 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.
|
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.
|
inline |
Convenience method for accessing error for a column value in simple data.
[in] | i | Zero-based column index relative to firstColumn(). Should be >= 0 and < columnCount(). |
Currently, this method returns zero if the source data does not specify errors.
|
inline |
Returns zero-based index of the frame.
The return value is >= 0 for valid frames. Should not be called for invalid frames.
|
inline |
Returns whether the object refers to a valid frame.
If returns false, return values of other methods are not specified.
|
inline |
Returns point set reference for a given point set.
Should not be called for invalid frames.
|
inline |
Returns the number of point sets for this frame.
Returns zero for an invalid frame.
|
inline |
Convenience method for accessing present status for a column in simple data.
[in] | i | Zero-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.
|
inline |
Returns the x coordinate for the frame.
Should not be called for invalid frames.
|
inline |
Convenience method for accessing a column value in simple data.
[in] | i | Zero-based column index relative to firstColumn(). Should be >= 0 and < columnCount(). |