PhoenixSwarm  3.5.0
Library to ease communication between daemons
Loading...
Searching...
No Matches
CheckStream< VecStat > Struct Reference

Generic VecStat Check function. More...

#include <Representation.h>

Static Public Member Functions

static bool check_stream (const std::string &fieldDescription, const VecStat &data, const VecStat &reference, std::ostream &out)
 Check Stream for a VecStat.
 

Detailed Description

Generic VecStat Check function.

Definition at line 359 of file Representation.h.

Member Function Documentation

◆ check_stream()

bool CheckStream< VecStat >::check_stream ( const std::string & fieldDescription,
const VecStat & data,
const VecStat & reference,
std::ostream & out )
static

Check Stream for a VecStat.

Parameters
fieldDescription: description of the field to be checked
data: data to be checked
reference: reference of the check
out: ostream used to collect feed back in case of error (std::cerr or a logger)
Returns
true on success, false otherwise

Definition at line 549 of file Representation.cpp.

549 {
550 bool b(true);
551 b &= CheckStream<std::vector<size_t>>::check_stream(fieldDescription + "\n- VecStat::nbEvent", data.getNbEvent(), reference.getNbEvent(), out);
552 b &= CheckStream<std::vector<time_t>>::check_stream(fieldDescription + "\n- VecStat::startTimestamp", data.getStartTimestamp(), reference.getStartTimestamp(), out);
553 b &= CheckStream<std::vector<time_t>>::check_stream(fieldDescription + "\n- VecStat::endTimestamp", data.getEndTimestamp(), reference.getEndTimestamp(), out);
554 b &= CheckStream<std::vector<float>>::check_stream(fieldDescription + "\n- VecStat::min", data.getMin(), reference.getMin(), out);
555 b &= CheckStream<std::vector<float>>::check_stream(fieldDescription + "\n- VecStat::max", data.getMax(), reference.getMax(), out);
556 b &= CheckStream<std::vector<float>>::check_stream(fieldDescription + "\n- VecStat::average", data.getAverage(), reference.getAverage(), out);
557 b &= CheckStream<std::vector<float>>::check_stream(fieldDescription + "\n- VecStat::rate", data.getRate(), reference.getRate(), out);
558 b &= CheckStream<std::vector<std::vector<float> >>::check_stream(fieldDescription + "\n- VecStat::vecRateQuantile", data.getVecRateQuantile(), reference.getVecRateQuantile(), out);
559 b &= CheckStream<std::vector<float>>::check_stream(fieldDescription + "\n- VecStat::rateEventBelowLowerBound", data.getRateEventBelowLowerBound(), reference.getRateEventBelowLowerBound(), out);
560 b &= CheckStream<std::vector<float>>::check_stream(fieldDescription + "\n- VecStat::rateEventAboveUpperBound", data.getRateEventAboveUpperBound(), reference.getRateEventAboveUpperBound(), out);
561 return b;
562}
const std::vector< float > & getMax() const
Gets the max of the VecStat.
const std::vector< time_t > & getEndTimestamp() const
Gets the endTimestamp of the VecStat.
const std::vector< float > & getRate() const
Gets the rate of the VecStat.
const std::vector< time_t > & getStartTimestamp() const
Gets the startTimestamp of the VecStat.
const std::vector< float > & getAverage() const
Gets the average of the VecStat.
const std::vector< float > & getRateEventBelowLowerBound() const
Gets the rateEventBelowLowerBound of the VecStat.
const std::vector< float > & getRateEventAboveUpperBound() const
Gets the rateEventAboveUpperBound of the VecStat.
const std::vector< float > & getMin() const
Gets the min of the VecStat.
const std::vector< size_t > & getNbEvent() const
Gets the nbEvent of the VecStat.
const std::vector< std::vector< float > > & getVecRateQuantile() const
Gets the vecRateQuantile of the VecStat.
static bool check_stream(const std::string &fieldDescription, const VecStat &data, const VecStat &reference, std::ostream &out)
Check Stream for a VecStat.

References check_stream(), VecStat::getAverage(), VecStat::getEndTimestamp(), VecStat::getMax(), VecStat::getMin(), VecStat::getNbEvent(), VecStat::getRate(), VecStat::getRateEventAboveUpperBound(), VecStat::getRateEventBelowLowerBound(), VecStat::getStartTimestamp(), and VecStat::getVecRateQuantile().

Referenced by check_stream().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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