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
gageassignment.cpp File Reference
#include "core/gageassignment.h"
#include "core/editgeometry.h"
#include <QStringList>
#include <algorithm>
#include <cmath>
#include <utility>
Include dependency graph for gageassignment.cpp:

Namespaces

namespace  GageAssignment
 

Functions

QVector< QPointF > GageAssignment::clipHalfPlane (const QVector< QPointF > &ring, const QPointF &keep, const QPointF &drop)
 Clip an open ring by the half-plane of points at least as close to keep as to drop.
 
QVector< doubleGageAssignment::thiessenAreaShares (const QVector< QPointF > &ring, const QVector< QPointF > &gages)
 Area of ring intersected with each gage's Voronoi cell.
 
int GageAssignment::areaMajorityGage (const QVector< double > &shares, double *fractionOut=nullptr)
 Index of the largest share, ties broken toward the lowest index.
 
QVector< QPointF > GageAssignment::samplePolygon (const QVector< QPointF > &ring, int target=kDefaultSampleTarget)
 Interior sample points for area-averaging a field over a ring.
 
QVector< QPair< int, double > > GageAssignment::idwWeights (const QPointF &p, const QVector< QPointF > &sites)
 Inverse-distance weights (power 2), normalised to sum 1.
 
ClusterKey GageAssignment::quantizeWeights (const QVector< double > &w, double tol=kDefaultClusterTol, double wEps=kWeightEpsilon)
 Quantise a dense weight vector into a canonical cluster key.
 
QVector< doubleGageAssignment::dequantizeWeights (const ClusterKey &key, double tol, int nGages)
 Dense weights implied by a key — the blend actually synthesised.
 

Detailed Description