Class QAccelPlot::HeatmapSeries¶
ClassList > QAccelPlot > HeatmapSeries
A hardware-accelerated QML item that draws a grid of values as colored cells. More...
#include <HeatmapSeries.hpp>
Inherits the following classes: QAccelPlot::ColormappedSeries
Inheritance diagram¶
flowchart TB
classQAccelPlot_1_1HeatmapSeries["QAccelPlot::HeatmapSeries"]
classQAccelPlot_1_1ColormappedSeries["QAccelPlot::ColormappedSeries"]
classQAccelPlot_1_1ColormappedSeries --> classQAccelPlot_1_1HeatmapSeries
click classQAccelPlot_1_1ColormappedSeries "../classQAccelPlot_1_1ColormappedSeries/" "Open QAccelPlot::ColormappedSeries"
classQAccelPlot_1_1PlotSeries["QAccelPlot::PlotSeries"]
classQAccelPlot_1_1PlotSeries --> classQAccelPlot_1_1ColormappedSeries
click classQAccelPlot_1_1PlotSeries "../classQAccelPlot_1_1PlotSeries/" "Open QAccelPlot::PlotSeries"
external_base_classQAccelPlot_1_1PlotSeries_1["QQuickItem"]
external_base_classQAccelPlot_1_1PlotSeries_1 --> classQAccelPlot_1_1PlotSeries
Public Types¶
| Type | Name |
|---|---|
| enum | Spacing How the cells of one dimension are spaced between its grid edges. |
Public Types inherited from QAccelPlot::PlotSeries¶
| Type | Name |
|---|---|
| enum | LegendSymbol Supported default legend symbols. |
Public Properties¶
| Type | Name |
|---|---|
| property int | columns Number of cells per row. Changing it keeps the values and recomputes rows . Default: 0. |
| property int | rows Read-only: number of complete rows of columns values. |
| property qreal | xMax Right edge of the last column in data coordinates. Unset (NaN) means columns . Default: unset. |
| property qreal | xMin Left edge of column 0 in data coordinates. Unset (NaN) means 0. Default: unset. |
| property Spacing | xSpacing How the columns are spaced between xMin andxMax . Default:Linear . |
| property qreal | yMax Top edge of the last row in data coordinates. Unset (NaN) means rows . Default: unset. |
| property qreal | yMin Bottom edge of row 0 in data coordinates. Unset (NaN) means 0. Default: unset. |
| property Spacing | ySpacing How the rows are spaced between yMin andyMax . Default:Linear . |
Public Properties inherited from QAccelPlot::ColormappedSeries¶
See QAccelPlot::ColormappedSeries
| Type | Name |
|---|---|
| property Colormap * | colormap Maps values to colors. What a series draws without one is described by the series. |
| property qreal | dataValueMax Read-only: upper bound of the value range, taken from Colormap::max when it is set and from the data otherwise. |
| property qreal | dataValueMin Read-only: lower bound of the value range, taken from Colormap::min when it is set and from the data otherwise.ColorBar labels its ticks from this anddataValueMax . |
Public Properties inherited from QAccelPlot::PlotSeries¶
| Type | Name |
|---|---|
| property int | count Read-only: number of records stored, including invalid ones. |
| property quint64 | dataRevision Revision incremented by every accepted change of the series' records. |
| property bool | hoverEnabled Whether the series reacts to the mouse cursor. Default: true . |
| property bool | hovered Read-only: true while the mouse cursor is over the series. |
| property SeriesInspection * | inspection Read-only constant: data queries for this series. |
| property LegendSymbol | legendSymbol Symbol style requested from the default legend. |
| property QString | name Identifying name used by the default legend. |
| property QRectF | plotRect Plot area in parent-item coordinates, assigned by PlotView . |
| property Axis * | xAxis Horizontal axis used for data-to-pixel coordinate mapping. |
| property Axis * | yAxis Vertical axis used for data-to-pixel coordinate mapping. |
Public Signals¶
| Type | Name |
|---|---|
| signal void | columnsChanged Emitted when the columns property changes. |
| signal void | rowsChanged Emitted when the rows property changes. |
| signal void | xMaxChanged Emitted when the xMax property changes. |
| signal void | xMinChanged Emitted when the xMin property changes. |
| signal void | xSpacingChanged Emitted when the xSpacing property changes. |
| signal void | yMaxChanged Emitted when the yMax property changes. |
| signal void | yMinChanged Emitted when the yMin property changes. |
| signal void | ySpacingChanged Emitted when the ySpacing property changes. |
Public Signals inherited from QAccelPlot::ColormappedSeries¶
See QAccelPlot::ColormappedSeries
| Type | Name |
|---|---|
| signal void | colormapChanged Emitted when the colormap property changes. |
| signal void | valueRangeChanged Emitted when dataValueMin ordataValueMax changes. |
Public Signals inherited from QAccelPlot::PlotSeries¶
| Type | Name |
|---|---|
| signal void | countChanged Emitted when the number of records changes. |
| signal void | dataRevisionChanged Emitted when the dataRevision property changes. |
| signal void | hoverEnabledChanged Emitted when the hoverEnabled property changes. |
| signal void | hoveredChanged Emitted when the hovered property changes. |
| signal void | legendEntryChanged Emitted when the result of legendEntry() orlegendEntries() changes. |
| signal void | legendSymbolChanged |
| signal void | nameChanged |
| signal void | plotRectChanged |
| signal void | xAxisChanged |
| signal void | yAxisChanged |
Public Functions¶
| Type | Name |
|---|---|
| HeatmapSeries (QQuickItem * parent=nullptr) Constructs a HeatmapSeries with the given__parent . |
|
| virtual Q_INVOKABLE void | clearData () override Removes all values and keeps columns . |
| int | columns () const Returns the number of cells per row. |
| virtual int | count () override const Returns the number of cells, columns ×rows . |
| void | postValues (std::vector< float > && values, int columns, int rows) Thread-safe: queues setValues _(_values _,_columns _,_rows ) to the item's thread. |
| int | rows () const Returns the number of complete rows. |
| void | setColumns (int columns) Sets the number of cells per row to columns . Negative values are clamped to 0. |
| Q_INVOKABLE void | setValues (const QList< qreal > & values, int columns) Replaces the grid with values _, row by row,_columns per row. |
| void | setValues (std::vector< float > && values, int columns, int rows) Replaces the grid with columns by__rows values moved from__values , row by row. |
| void | setXMax (qreal value) Sets the right grid edge to value . NaN unsets it. |
| void | setXMin (qreal value) Sets the left grid edge to value . NaN unsets it. |
| void | setXSpacing (Spacing spacing) Sets how the columns are spaced to spacing . |
| void | setYMax (qreal value) Sets the top grid edge to value . NaN unsets it. |
| void | setYMin (qreal value) Sets the bottom grid edge to value . NaN unsets it. |
| void | setYSpacing (Spacing spacing) Sets how the rows are spaced to spacing . |
| Q_INVOKABLE qreal | valueAt (int row, int column) const Returns the value of the cell at row and__column , or NaN when it is outside the grid. |
| qreal | xMax () const Returns the right grid edge, or NaN when unset. |
| qreal | xMin () const Returns the left grid edge, or NaN when unset. |
| Spacing | xSpacing () const Returns how the columns are spaced. |
| qreal | yMax () const Returns the top grid edge, or NaN when unset. |
| qreal | yMin () const Returns the bottom grid edge, or NaN when unset. |
| Spacing | ySpacing () const Returns how the rows are spaced. |
Public Functions inherited from QAccelPlot::ColormappedSeries¶
See QAccelPlot::ColormappedSeries
| Type | Name |
|---|---|
| Colormap * | colormap () const Returns the colormap, or nullptr when none is assigned. |
| qreal | dataValueMax () const Returns the resolved upper bound of the value range. |
| qreal | dataValueMin () const Returns the resolved lower bound of the value range. |
| void | setColormap (Colormap * colormap) Sets the colormap to colormap . |
Public Functions inherited from QAccelPlot::PlotSeries¶
| Type | Name |
|---|---|
| PlotSeries (QQuickItem * parent=nullptr) |
|
| virtual void | clearData () Removes all data points from the series. |
| virtual int | count () const Returns the number of records stored. The default is the number of stored data points. |
| quint64 | dataRevision () const Returns the current data revision. |
| bool | hoverEnabled () const Returns whether the series reacts to the mouse cursor. |
| bool | hovered () const Returns whether the mouse cursor is over the series. |
| SeriesInspection * | inspection () const Returns the data queries for this series; created on first use and owned by the series. |
| virtual QList< LegendEntry > | legendEntries () const Returns the legend rows of the series. Default: the legendEntry() , if any. |
| virtual std::optional< LegendEntry > | legendEntry () const Returns how a legend draws the series, or std::nullopt for no legend entry. Default: no entry. |
| LegendSymbol | legendSymbol () const |
| QString | name () const |
| QRectF | plotRect () const |
| void | postData (std::vector< double > && data, int count) Queues a moved double buffer for assignment on the series' thread. |
| void | postData (std::vector< float > && data, int count) Queues a moved float buffer for assignment on the series' thread. |
| void | setData (const double * data, int count) Replaces the series data with count data points copied from an interleaved double array. |
| void | setData (std::vector< double > && data, int count) Replaces the series data by moving an interleaved double buffer. |
| void | setData (const double * data, int count, const DataBounds & bounds) Like setData _(_data _,_count ), with the data extents given as__bounds instead of scanned for. |
| void | setData (std::vector< double > && data, int count, const DataBounds & bounds) Like setData _(_data _,_count ), with the data extents given as__bounds instead of scanned for. |
| void | setDataF (const float * data, int count) Replaces the series data with count data points copied from an interleaved float array. |
| void | setDataF (std::vector< float > && data, int count) Replaces the series data by moving an interleaved float buffer. |
| void | setDataF (const float * data, int count, const DataBounds & bounds) Like setDataF _(_data _,_count ), with the data extents given as__bounds instead of scanned for. |
| void | setDataF (std::vector< float > && data, int count, const DataBounds & bounds) Like setDataF _(_data _,_count ), with the data extents given as__bounds instead of scanned for. |
| void | setHoverEnabled (bool enabled) Sets whether the series reacts to the mouse cursor to enabled . |
| void | setLegendSymbol (LegendSymbol symbol) |
| void | setName (const QString & name) |
| void | setPlotRect (const QRectF & rect) Updates the series geometry to exactly cover rect . |
| void | setXAxis (Axis * axis) |
| void | setYAxis (Axis * axis) |
| Axis * | xAxis () const |
| std::optional< DataExtent > | xDataRange () const Returns the extent this series reports to its horizontal axis, or std::nullopt when it has none. |
| Axis * | yAxis () const |
| std::optional< DataExtent > | yDataRange () const Returns the extent this series reports to its vertical axis, or std::nullopt when it has none. |
| ~PlotSeries () override |
Protected Types inherited from QAccelPlot::PlotSeries¶
| Type | Name |
|---|---|
| enum | CapacityOverflow What a series draws when its records outgrow its GPU capacity. |
| enum | DataChange How the records changed in a data update. |
Protected Attributes inherited from QAccelPlot::PlotSeries¶
| Type | Name |
|---|---|
| bool | overRenderCapacity_ = {false}Whether the record count of the last updateRenderCapacity() exceededrenderCapacity_ . |
| int | renderCapacity_ = {std::numeric\_limits<int>::max()}Records the GPU buffers hold, as of the last updateRenderCapacity() ; the largestint before the first. |
Protected Functions¶
| Type | Name |
|---|---|
| virtual void | applyDataPoints (DataPointInput && input) override Stores the cell values passed to the PlotSeries setters, keepingcolumns . |
| virtual DataRanges | computeDataRanges () override const Returns the grid edges in each dimension; on a log axis from the first cell edge above zero. |
| virtual int | dataPointValueCount () override const Returns 1: the PlotSeries setters take one value per cell. |
| virtual InspectionDataPoint | inspectionDataPointAt (const QPointF & position) override const Returns the cell drawn at the series-local position as a data point at its center. |
| virtual InspectionRecord | inspectionRecord (int index) override const Returns the cell record at index . |
| virtual InspectionRecord | inspectionRecordAt (const QPointF & position) override const Returns the record of the cell drawn at the series-local position . |
| virtual void | onAxisScaleChanged () override Repaints, because the mapping from pixels to cells depends on the axis scale. |
| virtual bool | positionInspectionSupported () override const Returns true: cells are matched by position. |
| virtual bool | recordInspectionSupported () override const Returns true: cells are inspected as records. |
| virtual std::optional< ValueSpan > | scanValueRange () override const Returns the span of the finite cell values. |
Protected Functions inherited from QAccelPlot::ColormappedSeries¶
See QAccelPlot::ColormappedSeries
| Type | Name |
|---|---|
| ColormappedSeries (DataPointStore::Layout layout, DataPointWording wording, QQuickItem * parent) Creates a series whose data points have layout _;_wording names them in warnings. |
|
| const std::vector< GradientStopData > & | colorStops () const Returns the ramp stops of the colormap, empty without one. |
| virtual std::optional< ValueSpan > | scanValueRange () const Returns the span of the finite values, or std::nullopt when there is none. Default: none. |
| void | updateValueRange () Resolves the value range again. Call after every change of the values. |
Protected Functions inherited from QAccelPlot::PlotSeries¶
| Type | Name |
|---|---|
| PlotSeries (DataPointStore::Layout layout, DataPointWording wording, QQuickItem * parent) Creates a series whose data points have layout _;_wording names them in warnings. |
|
| void | appendDataPoint (const double * coordinates) Appends one double data point and widens the data ranges by its valid coordinates. |
| virtual void | applyDataPoints (DataPointInput && input) Applies data points passed to setData() orsetDataF() . |
| virtual DataRanges | computeDataRanges () const Scans the records for their extents. The default implementation scans the data points. |
| virtual int | dataPointValueCount () const Returns the number of values per data point that setData() andsetDataF() take. |
| DataPointStore & | dataPoints () Returns the data points of the series. |
| const DataPointStore & | dataPoints () const Returns the data points of the series. |
| bool | event (QEvent * event) override Withholds hover events from a series beneath another series under the cursor. |
| void | extendXDataRange (qreal x) Widens the X extent to include x and notifies the bound axes. |
| void | extendYDataRange (qreal y) Widens the Y extent to include y . A non-finite__y leaves the extent unchanged. |
| virtual bool | inspectionAvailable () const Returns false while the records are ambiguous, such as during a data transition. Default: true. |
| void | inspectionDataChanged (DataChange change=DataChange::Replaced) Advances the data revision and refreshes the data queries. Call after every accepted record change. |
| virtual InspectionDataPoint | inspectionDataPointAt (const QPointF & position) const Returns the record drawn at the series-local position as a data point. Default: unsupported. |
| virtual InspectionRecord | inspectionRecord (int index) const Returns the native record at index for series that are not plain XY series. Default: unsupported. |
| virtual InspectionRecord | inspectionRecordAt (const QPointF & position) const Returns the native record drawn at the series-local position . Default: unsupported. |
| virtual Internal::InspectionSource | inspectionSource () const Returns a view of the XY records that data point queries search. The default has none. |
| void | invalidateDataRanges () Discards the cached extents and notifies the bound axes. |
| void | invalidateInspection () Refreshes the data queries after record validity changed without a data change, such as an axis scale switch. |
| bool | logScaleX () const Returns whether the horizontal axis is logarithmic; false without an axis. |
| bool | logScaleY () const Returns whether the vertical axis is logarithmic; false without an axis. |
| void | notifyDataPointsChanged (DataChange change, int previousCount) Finishes a change of the data points: data ranges, onDataPointsChanged() ,countChanged() , data queries, and a repaint. |
| virtual void | onAxisRangeChanged () Called when the viewport of a bound axis changes. The default implementation schedules a repaint. |
| virtual void | onAxisScaleChanged () Called when a bound axis switches between linear and logarithmic scale, or a different axis is bound. |
| virtual void | onDataPointsChanged (DataChange change, int previousCount) Called after the data points changed, before the data queries are refreshed. The default does nothing. |
| virtual bool | positionInspectionSupported () const Returns whether inspectionDataPointAt() matches records drawn as areas, such as heatmap cells. Default: false. |
| virtual bool | recordInspectionSupported () const Returns whether inspectionRecord() andinspectionRecordAt() answer for this series. Default: false. |
| QRectF | resolvePlotRect () const Returns the plot area to render into: plotRect when set, otherwise the item's current size. |
| void | setHovered (bool hovered) Sets the hovered property to hovered . Called by the hover handling of a series. |
| void | storeDataPoints (DataPointInput && input) Stores input as the data points and finishes the change. |
| void | supportHover () Makes the series accept hover events while hoverEnabled istrue . |
| void | updateRenderCapacity (int capacity, int recordCount, CapacityOverflow overflow=CapacityOverflow::DropsExcess) Stores capacity , the number of records the GPU buffers hold, and warns when__recordCount newly exceeds it. |
| bool | validateDataSize (std::size_t valueCount, int count, bool floatData, int valuesPerDataPoint=0) const Returns whether valueCount values hold__count data points; warns otherwise. |
| bool | validateRawDataArguments (const void * data, int count) const Returns whether data and__count are valid arguments for copying data points; warns otherwise. |
Detailed Description¶
The grid has columns cells per row and rows rows of cells. Values are stored row by row: the value of a cell has index row * columns + column, with row 0 at yMin and column 0 at xMin. xMin, xMax, yMin, and yMax are the outer edges of the grid; an unset bound places the grid in index space, so column c spans [c, c + 1].
Each cell is colored by mapping its value through colormap. The series starts with a Viridis colormap of its own whose range is resolved from the data; assign a shared Colormap to replace it. Nothing is drawn while colormap is null. The series has no legend entry: a ColorBar is its key.
QAccelPlot.HeatmapSeries {
xMin: -10; xMax: 10
yMin: -5; yMax: 5
// Three columns by two rows.
Component.onCompleted: setValues([0, 1, 2, 3, 4, 5], 3)
}
** **
setValues() replaces the values and the shape together. The PlotSeries setters take one value per cell and keep columns, so their count must be a multiple of it. DataBounds passed to them replace the grid edges as the data range until the values, the shape, or an edge next changes. Values are stored in single precision. postValues() and postData() may be called from any thread.
** **
Cells with a non-finite value, and cells with a value at or below zero under a log-scale colormap, are transparent. Non-finite values do not count toward the value range.
** **
xSpacing and ySpacing space the cells evenly in data or in log10, independently of the axis scale. On a log axis, Log cells have equal widths, Linear cells narrow toward larger values, and the parts of cells at or below zero are not drawn; the data range starts at the first cell edge above zero. Under Log spacing, both edges of that dimension must be positive, so set them: an unset edge resolves to index space, which starts at 0. Otherwise the series draws nothing, reports no data range in that dimension, and logs a warning.
** **
inspection.recordAt() and inspection.recordAtPosition() return a record with the fields x and y (the cell center, geometric under Log spacing), value, row, and column. inspection.dataPointAtPosition() returns the cell as a data point at its center, with index row * columns + column, which PlotInspector reports in every mode. A cell with a non-finite value is still a match. While a grid edge is not finite, or not positive under Log spacing, recordAt() returns Unavailable and no position matches a cell.
** **
Each pixel takes the color of the cell under its center, without interpolation, and antialiasing has no effect. A grid with an infinite edge draws nothing. A grid of more than 16,777,216 (2^24) columns or rows, or of more cells than the GPU data texture holds, about 67 million for an 8192-pixel texture limit, draws nothing and logs a warning.
See also: ColormappedSeries, Colormap, ColorBar, PlotSeries
Public Types Documentation¶
enum Spacing¶
How the cells of one dimension are spaced between its grid edges.
Public Properties Documentation¶
property columns¶
Number of cells per row. Changing it keeps the values and recomputes rows . Default: 0.
Values of an incomplete last row are kept but not drawn or inspected. setValues() sets it, so do not bind columns while using setValues(): the binding reshapes the grid when it is re-evaluated.
property rows¶
Read-only: number of complete rows of columns values.
property xMax¶
Right edge of the last column in data coordinates. Unset (NaN) means columns . Default: unset.
property xMin¶
Left edge of column 0 in data coordinates. Unset (NaN) means 0. Default: unset.
property xSpacing¶
How the columns are spaced between xMin andxMax . Default:Linear .
property yMax¶
Top edge of the last row in data coordinates. Unset (NaN) means rows . Default: unset.
property yMin¶
Bottom edge of row 0 in data coordinates. Unset (NaN) means 0. Default: unset.
property ySpacing¶
How the rows are spaced between yMin andyMax . Default:Linear .
Public Signals Documentation¶
signal columnsChanged¶
Emitted when the columns property changes.
signal rowsChanged¶
Emitted when the rows property changes.
signal xMaxChanged¶
Emitted when the xMax property changes.
signal xMinChanged¶
Emitted when the xMin property changes.
signal xSpacingChanged¶
Emitted when the xSpacing property changes.
signal yMaxChanged¶
Emitted when the yMax property changes.
signal yMinChanged¶
Emitted when the yMin property changes.
signal ySpacingChanged¶
Emitted when the ySpacing property changes.
Public Functions Documentation¶
function HeatmapSeries¶
Constructs a HeatmapSeries with the given__parent .
function clearData¶
Removes all values and keeps columns .
Implements QAccelPlot::PlotSeries::clearData
function columns¶
Returns the number of cells per row.
function count¶
Returns the number of cells, columns ×rows .
Implements QAccelPlot::PlotSeries::count
function postValues¶
Thread-safe: queues setValues _(_values _,_columns _,_rows ) to the item's thread.
void QAccelPlot::HeatmapSeries::postValues (
std::vector< float > && values,
int columns,
int rows
)
function rows¶
Returns the number of complete rows.
function setColumns¶
Sets the number of cells per row to columns . Negative values are clamped to 0.
function setValues¶
Replaces the grid with values _, row by row,_columns per row.
Q_INVOKABLE void QAccelPlot::HeatmapSeries::setValues (
const QList< qreal > & values,
int columns
)
The number of values must be a multiple of columns. An empty list clears the values and keeps columns. Sets columns without removing a binding on it, so do not bind columns while using this function.
function setValues¶
Replaces the grid with columns by__rows values moved from__values , row by row.
function setXMax¶
Sets the right grid edge to value . NaN unsets it.
function setXMin¶
Sets the left grid edge to value . NaN unsets it.
function setXSpacing¶
Sets how the columns are spaced to spacing .
function setYMax¶
Sets the top grid edge to value . NaN unsets it.
function setYMin¶
Sets the bottom grid edge to value . NaN unsets it.
function setYSpacing¶
Sets how the rows are spaced to spacing .
function valueAt¶
Returns the value of the cell at row and__column , or NaN when it is outside the grid.
function xMax¶
Returns the right grid edge, or NaN when unset.
function xMin¶
Returns the left grid edge, or NaN when unset.
function xSpacing¶
Returns how the columns are spaced.
function yMax¶
Returns the top grid edge, or NaN when unset.
function yMin¶
Returns the bottom grid edge, or NaN when unset.
function ySpacing¶
Returns how the rows are spaced.
Protected Functions Documentation¶
function applyDataPoints¶
Stores the cell values passed to the PlotSeries setters, keepingcolumns .
Implements QAccelPlot::PlotSeries::applyDataPoints
function computeDataRanges¶
Returns the grid edges in each dimension; on a log axis from the first cell edge above zero.
Implements QAccelPlot::PlotSeries::computeDataRanges
function dataPointValueCount¶
Returns 1: the PlotSeries setters take one value per cell.
Implements QAccelPlot::PlotSeries::dataPointValueCount
function inspectionDataPointAt¶
Returns the cell drawn at the series-local position as a data point at its center.
virtual InspectionDataPoint QAccelPlot::HeatmapSeries::inspectionDataPointAt (
const QPointF & position
) override const
Implements QAccelPlot::PlotSeries::inspectionDataPointAt
function inspectionRecord¶
Returns the cell record at index .
Implements QAccelPlot::PlotSeries::inspectionRecord
function inspectionRecordAt¶
Returns the record of the cell drawn at the series-local position .
virtual InspectionRecord QAccelPlot::HeatmapSeries::inspectionRecordAt (
const QPointF & position
) override const
Implements QAccelPlot::PlotSeries::inspectionRecordAt
function onAxisScaleChanged¶
Repaints, because the mapping from pixels to cells depends on the axis scale.
Implements QAccelPlot::PlotSeries::onAxisScaleChanged
function positionInspectionSupported¶
Returns true: cells are matched by position.
Implements QAccelPlot::PlotSeries::positionInspectionSupported
function recordInspectionSupported¶
Returns true: cells are inspected as records.
Implements QAccelPlot::PlotSeries::recordInspectionSupported
function scanValueRange¶
Returns the span of the finite cell values.
Implements QAccelPlot::ColormappedSeries::scanValueRange
The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/series/HeatmapSeries.hpp