SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
binsampler.cpp File Reference

Frame-sampler implementation (Slice Z.7). More...

#include "render/binsampler.h"
#include <algorithm>
#include <cmath>
Include dependency graph for binsampler.cpp:

Namespaces

namespace  OpenSWMM
 
namespace  OpenSWMM::Render
 

Functions

QVector< int > OpenSWMM::Render::sampledFrameIndices (int frameCount, double sampleRate)
 Indices of the frames the sampler would pick, for the same frameCount and sampleRate. Pure function — useful for tests and for showing the user which frames were sampled. Returns an empty vector when frameCount == 0.
 
QVector< doubleOpenSWMM::Render::sampleBreaksAcrossFrames (const IntervalBinner &binner, const QVector< QVector< double > > &perFrameValues, double sampleRate=0.2)
 Pick perFrameValues at sampleRate fraction (≥ 1 frame), flatten the selected frames' values, and call IntervalBinner::computeBreaks() on the flat sample.
 

Detailed Description

Frame-sampler implementation (Slice Z.7).

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later