Mantid
Loading...
Searching...
No Matches
ITimeSeriesProperty.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9#include <vector>
10
11namespace Mantid {
12namespace Types {
13namespace Core {
14class DateAndTime;
15}
16} // namespace Types
17namespace Kernel {
18//---------------------------------------------------------------------------
19// Forward Declarations
20//---------------------------------------------------------------------------
21class SplittingInterval;
22class TimeInterval;
23class Property;
27public:
29 virtual void makeFilterByValue(std::vector<SplittingInterval> &split, double min, double max, double TimeTolerance,
30 bool centre = true) const = 0;
32 virtual void expandFilterToRange(std::vector<SplittingInterval> &split, double min, double max,
33 const TimeInterval &range) const = 0;
34 // Provide a new instance of the ITimeSeriesProperty with shifted time values
35 // After trying to use return type covariance, but that showed Error C2908
36 // Using property seemed to be the most straightforward solution.
37 virtual Property *cloneWithTimeShift(const double timeShift) const = 0;
39 virtual double averageValueInFilter(const std::vector<SplittingInterval> &filter) const = 0;
42 virtual std::pair<double, double> averageAndStdDevInFilter(const std::vector<SplittingInterval> &filter) const = 0;
44 virtual std::vector<Types::Core::DateAndTime> timesAsVector() const = 0;
46 virtual double timeAverageValue() const = 0;
48 virtual int realSize() const = 0;
50 virtual void clear() = 0;
52 virtual void clearOutdated() = 0;
54 virtual ~ITimeSeriesProperty() = default;
55};
56
57} // namespace Kernel
58} // namespace Mantid
A non-templated interface to a TimeSeriesProperty.
virtual int realSize() const =0
Returns the real size of the time series property map:
virtual double timeAverageValue() const =0
Returns the calculated time weighted average value.
virtual std::pair< double, double > averageAndStdDevInFilter(const std::vector< SplittingInterval > &filter) const =0
Calculate the time-weighted average and standard deviation of a property in a filtered range.
virtual Property * cloneWithTimeShift(const double timeShift) const =0
virtual void expandFilterToRange(std::vector< SplittingInterval > &split, double min, double max, const TimeInterval &range) const =0
Make sure an existing filter covers the full time range given.
virtual std::vector< Types::Core::DateAndTime > timesAsVector() const =0
Return the time series's times as a vector<DateAndTime>
virtual void clearOutdated()=0
Deletes all but the 'last entry' in the property.
virtual double averageValueInFilter(const std::vector< SplittingInterval > &filter) const =0
Calculate the time-weighted average of a property in a filtered range.
virtual void clear()=0
Deletes the series of values in the property.
virtual ~ITimeSeriesProperty()=default
Virtual destructor.
virtual void makeFilterByValue(std::vector< SplittingInterval > &split, double min, double max, double TimeTolerance, bool centre=true) const =0
Fill a TimeSplitterType that will filter the events by matching.
Base class for properties.
Definition: Property.h:94
Represents a time interval.
Definition: DateAndTime.h:25
Helper class which provides the Collimation Length for SANS instruments.