|
Alpha Expansion Library
C++ library for the Alpha-Expansion graph-cut algorithm with Python bindings
|
Expansion strategy that shuffles the label order randomly each cycle. More...
#include <RandomizedStrategy.hpp>
Public Member Functions | |
| RandomizedStrategy (int max_cycles=100, unsigned int seed=42) | |
| Constructs the strategy. | |
| int | execute (AlphaExpansion< T > &optimizer, EnergyModel< T > &model) const override |
Runs randomized alpha-expansion until convergence or max_cycles. | |
Public Member Functions inherited from ExpansionStrategy< T > | |
| virtual | ~ExpansionStrategy ()=default |
Expansion strategy that shuffles the label order randomly each cycle.
Works the same as SequentialStrategy, but the label order is randomly shuffled at the start of each cycle using a Mersenne Twister RNG. Good for studying how the label order affects convergence speed.
| T | Numeric cost type. |
|
inline |
Constructs the strategy.
| max_cycles | Maximum number of cycles before stopping (default: 100). |
| seed | Seed for the Mersenne Twister RNG (default: 42). |
|
inlineoverridevirtual |
Runs randomized alpha-expansion until convergence or max_cycles.
Implements ExpansionStrategy< T >.