|
Alpha Expansion Library
C++ library for the Alpha-Expansion graph-cut algorithm with Python bindings
|
Expansion strategy that always picks the label with the greatest energy reduction. More...
#include <GreedyStrategy.hpp>
Public Member Functions | |
| GreedyStrategy (int max_cycles=100) | |
| Constructs the strategy. | |
| int | execute (AlphaExpansion< T > &optimizer, EnergyModel< T > &model) const override |
Runs greedy alpha-expansion until convergence or max_cycles. | |
Public Member Functions inherited from ExpansionStrategy< T > | |
| virtual | ~ExpansionStrategy ()=default |
Expansion strategy that always picks the label with the greatest energy reduction.
Each cycle evaluates all labels and applies only the expansion move that yields the largest energy decrease. This is more expensive per cycle than SequentialStrategy (O(K) max-flow solves per cycle instead of one) but may converge in fewer cycles on some instances.
| T | Numeric cost type. |
|
inline |
Constructs the strategy.
| max_cycles | Maximum number of greedy cycles before stopping (default: 100). |
|
inlineoverridevirtual |
Runs greedy alpha-expansion until convergence or max_cycles.
Implements ExpansionStrategy< T >.