Beispiel #1
0
uint32 ReduceParams::getBase(const SharedContext& ctx) const {
	uint32 st = strategy.estimate != ReduceStrategy::est_dynamic || ctx.isExtended() ? strategy.estimate : (uint32)ReduceStrategy::est_num_constraints;
	switch(st) {
		default:
		case ReduceStrategy::est_dynamic        : {
			uint32 m = std::min(ctx.stats().vars.num, ctx.stats().numConstraints());
			uint32 M = std::max(ctx.stats().vars.num, ctx.stats().numConstraints());
			return M > (m * 10) ? M : m;
		}
		case ReduceStrategy::est_con_complexity : return ctx.stats().complexity;	
		case ReduceStrategy::est_num_constraints: return ctx.stats().numConstraints();
		case ReduceStrategy::est_num_vars       : return ctx.stats().vars.num;
	}
}
Beispiel #2
0
uint32 ReduceParams::getBase(const SharedContext& ctx) const {
	return strategy.estimate ? ctx.stats().complexity : ctx.stats().size; 
}