28#ifndef OPENSWMMVIS_CORE_GAGEASSIGNMENT_H
29#define OPENSWMMVIS_CORE_GAGEASSIGNMENT_H
83 const QVector<QPointF> &gages);
92 double *fractionOut =
nullptr);
123[[nodiscard]] QVector<QPair<int, double>>
idwWeights(
const QPointF &
p,
124 const QVector<QPointF> &sites);
138 QVector<QPair<int, long long>>
terms;
int e
Definition inpmeshreader.cpp:41
ArrowPlacement p
Definition linesymbollayer.cpp:27
int w
Definition mesh2dresultsexport.cpp:387
const char * key
Definition meshcellparams.cpp:24
QPolygonF ring
normalizeRingCCW(r.ring).
Definition meshgenerator.cpp:156
Definition gageassignment.h:37
QVector< double > thiessenAreaShares(const QVector< QPointF > &ring, const QVector< QPointF > &gages)
Area of ring intersected with each gage's Voronoi cell.
Definition gageassignment.cpp:96
QVector< QPointF > 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.
Definition gageassignment.cpp:49
constexpr double kDefaultClusterTol
Default weight-agreement tolerance for clustering (1%).
Definition gageassignment.h:48
QVector< QPair< int, double > > idwWeights(const QPointF &p, const QVector< QPointF > &sites)
Inverse-distance weights (power 2), normalised to sum 1.
Definition gageassignment.cpp:209
constexpr int kDefaultSampleTarget
Default number of interior samples requested per ring.
Definition gageassignment.h:51
int areaMajorityGage(const QVector< double > &shares, double *fractionOut=nullptr)
Index of the largest share, ties broken toward the lowest index.
Definition gageassignment.cpp:129
constexpr double kWeightEpsilon
Weights below this magnitude are clamped to zero before clustering.
Definition gageassignment.h:45
QVector< QPointF > samplePolygon(const QVector< QPointF > &ring, int target=kDefaultSampleTarget)
Interior sample points for area-averaging a field over a ring.
Definition gageassignment.cpp:160
ClusterKey quantizeWeights(const QVector< double > &w, double tol=kDefaultClusterTol, double wEps=kWeightEpsilon)
Quantise a dense weight vector into a canonical cluster key.
Definition gageassignment.cpp:240
QVector< double > dequantizeWeights(const ClusterKey &key, double tol, int nGages)
Dense weights implied by a key — the blend actually synthesised.
Definition gageassignment.cpp:297
A canonical, integer-valued summary of one weight vector.
Definition gageassignment.h:137
bool isEmpty() const
Definition gageassignment.h:141
QVector< QPair< int, long long > > terms
(gage index, quantum), sorted by index.
Definition gageassignment.h:138
QString serialized
"3:57|7:29|11:14"; "" when empty.
Definition gageassignment.h:139