MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
solver.h File Reference
#include <cstddef>
#include <optional>
#include <fe/bitset.h>
#include <fe/span.h>
#include "pbqp/graph.h"
Include dependency graph for solver.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pbqp::Statistics
 How often solve applied each reduction. More...
struct  pbqp::Solution
 A complete assignment of options to nodes. More...

Namespaces

namespace  pbqp

Functions

Cost pbqp::evaluate (const Graph &graph, fe::View< OptionId > choices)
 All solver functions are safe to call concurrently on a graph that nobody mutates meanwhile.
fe::Bitset pbqp::conflicts (const Graph &graph, fe::View< OptionId > choices)
 Nodes whose choice is Cost::inf in their cost vector or, given the neighbour's choice, in an incident matrix.
Solution pbqp::solve (const Graph &graph, fe::View< size_t > rn_priority={})
 Heuristic PBQP solver.
std::optional< Solution > pbqp::solve_exhaustive (const Graph &graph, size_t max_combinations=10 '000 '000, unsigned num_threads=0)
 Brute-force optimum, useful to cross-check small instances.

Class Documentation

◆ pbqp::Statistics

struct pbqp::Statistics

How often solve applied each reduction.

Definition at line 15 of file solver.h.

Class Members
size_t dropped_edges = 0
size_t forbidden_options = 0
size_t r0 = 0
size_t r1 = 0
size_t r2 = 0
size_t rm = 0
size_t rn = 0
size_t single_option = 0