10#ifndef MCRL2_PG_SMALL_PROGRESS_MEASURES_H
11#define MCRL2_PG_SMALL_PROGRESS_MEASURES_H
129 template<
class OutputIterator>
266 const std::size_t
p_;
291 const verti *vertex_map = 0,
verti vertex_map_size = 0 );
334 std::shared_ptr<LiftingStrategyFactory> lsf,
335 bool alternate =
false,
337 const verti *vmap = 0,
338 verti vmap_size = 0 );
368 std::shared_ptr<LiftingStrategyFactory>
lsf_;
382 std::shared_ptr<LiftingStrategyFactory> lsf,
383 bool alternate =
false,
385 const verti *vmap = 0,
386 verti vmap_size = 0 );
410 std::shared_ptr<LiftingStrategyFactory>
lsf_;
std::size_t verti
type used to number vertices
const verti * vec(verti v) const
verti * spm_
array storing the SPM vector data
void set_vec_to_top(verti v)
void set_vec(verti v, const verti src[], bool carry)
long long lifts_attempted() const
void add_lifts_succeeded(long long count)
void add_lifts_attempted(long long count)
void add_lifts_succeeded(verti v, long long count)
std::vector< std::pair< long long, long long > > vertex_stats_
long long lifts_attempted_
long long lifts_succeeded_
long long lifts_attempted(verti v) const
void record_lift(verti v, bool success)
long long lifts_succeeded() const
long long lifts_succeeded(verti v) const
void add_lifts_attempted(verti v, long long count)
const ParityGame & game() const
priority_t priority(verti v) const
Player player(verti v) const
std::vector< verti > Strategy
SmallProgressMeasuresSolver2 & operator=(const SmallProgressMeasuresSolver2 &)
SmallProgressMeasuresSolver2(const SmallProgressMeasuresSolver2 &)
ParityGame::Strategy solve_alternate()
ParityGame::Strategy solve_normal()
ParityGameSolver * create(const ParityGame &game, const verti *vmap, verti vmap_size)
LiftingStatistics * stats_
std::shared_ptr< LiftingStrategyFactory > lsf_
SetToTopIterator(SmallProgressMeasures &spm)
SetToTopIterator & operator*()
SetToTopIterator & operator=(verti v)
SetToTopIterator & operator++(int)
SetToTopIterator & operator++()
SmallProgressMeasures & spm
bool alternate_
whether to use the alternate algorithm
const verti vmap_size_
size of vertex map
virtual ParityGame::Strategy solve_normal()
std::shared_ptr< LiftingStrategyFactory > lsf_
factory used to create lifting strategy
virtual ParityGame::Strategy solve_alternate()
SmallProgressMeasuresSolver & operator=(const SmallProgressMeasuresSolver &)
ParityGame::Strategy solve()
LiftingStatistics * stats_
object to record lifting statistics
const verti * vmap_
current vertex map
static void preprocess_game(ParityGame &game)
SmallProgressMeasuresSolver(const SmallProgressMeasuresSolver &)
void debug_print_vertex(int v) const
long long solve_some(LiftingStrategy &ls, long long attempts=work_size)
const verti * vmap_
active vertex map (if any)
LiftingStatistics * stats_
statistics object to record lifts
const std::size_t p_
the player to solve for
SmallProgressMeasures & operator=(const SmallProgressMeasures &)
verti * M_
bounds on the SPM vector components
bool take_max(verti v) const
verti get_max_succ(verti v) const
void set_M(const verti *new_M)
std::size_t len_
length of SPM vectors
virtual void set_vec_to_top(verti v)=0
bool is_top(const verti vec[]) const
verti get_min_succ(verti v) const
SmallProgressMeasures(const SmallProgressMeasures &)
virtual ~SmallProgressMeasures()
bool less_than(verti v, const verti vec2[], bool carry=0)
bool is_top(verti v) const
bool compare_strict(verti v) const
verti get_ext_succ(verti v) const
bool is_dirty(verti v) const
bool lift_to(verti v, const verti vec2[], bool carry=0)
void get_winning_set(ParityGame::Player player, OutputIterator result)
const ParityGame & game() const
bool * dirty_
marks unstable vertices
ParityGame::Player player() const
std::pair< verti, bool > solve_one(LiftingStrategy &ls)
verti vmap_size_
size of vertex map
bool lift_to_top(verti v)
static const int work_size
Maximum number of lifting attempts in a row before checking timer.
verti get_successor(verti v) const
verti get_strategy(verti v) const
int vector_cmp(const verti vec1[], const verti vec2[], int N) const
void initialize_lifting_strategy(LiftingStrategy2 &ls)
const ParityGame & game_
the game being solved
verti get_ext_succ(verti v, bool take_max) const
virtual void set_vec(verti v, const verti src[], bool carry)=0
ParityGame::Strategy strategy_
current strategy
virtual const verti * vec(verti v) const =0