![]() |
OpenMS
|
Pairwise point-set matching using Wasserstein optimal transport. More...
#include <OpenMS/ANALYSIS/MAPMATCHING/WNetMatcher.h>
Classes | |
| struct | MatchResult |
| Result of a pairwise matching. More... | |
Public Types | |
| enum class | DistanceMetric { L1 , L2 , LINF } |
| Distance metric for comparing point positions. More... | |
Static Public Member Functions | |
| static MatchResult | match (const std::vector< std::array< double, 2 > > &positions_a, const std::vector< double > &intensities_a, const std::vector< std::array< double, 2 > > &positions_b, const std::vector< double > &intensities_b, DistanceMetric metric=DistanceMetric::LINF, double max_distance=100.0, double trash_cost=100.0) |
| Match two sets of 2D points using optimal transport. | |
| static DistanceMetric | metricFromString (const std::string &s) |
| Convert a string to a DistanceMetric enum value. | |
Pairwise point-set matching using Wasserstein optimal transport.
Matches two sets of 2D points (with associated intensities) by solving a minimum-cost network flow problem. Returns 1-to-1 matched index pairs selected greedily by descending transport flow.
This provides a minimal, FeatureMap-independent interface to the WNetAlign algorithm. For feature-level grouping across multiple maps, use FeatureGroupingAlgorithmWNet instead.
| struct OpenMS::WNetMatcher::MatchResult |
|
strong |
|
static |
Match two sets of 2D points using optimal transport.
Points are matched by minimizing the total transport cost between their positions, weighted by intensity. Unmatched points are sent to a "trash" node at the specified cost.
| [in] | positions_a | Positions of first point set (each {dim0, dim1}) |
| [in] | intensities_a | Intensities/weights of first point set |
| [in] | positions_b | Positions of second point set (each {dim0, dim1}) |
| [in] | intensities_b | Intensities/weights of second point set |
| [in] | metric | Distance metric (L1, L2, or LINF) |
| [in] | max_distance | Maximum distance to consider a match |
| [in] | trash_cost | Cost of leaving a point unmatched |
|
static |
Convert a string to a DistanceMetric enum value.
Recognizes "L1", "L2", and "LINF" (maps to DistanceMetric::L1/L2/LINF respectively). Any other input emits a warning via OPENMS_LOG_WARN and returns DistanceMetric::LINF as the fallback.