summaryrefslogtreecommitdiff
path: root/apt-pkg/solver3.h
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2025-02-12 20:39:33 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2025-02-14 19:08:45 +0100
commit2050ecb34a9e18cf1d8edbff8c52d456a7229162 (patch)
tree600d8a15264de47c7d3f36e2115b93a4457804df /apt-pkg/solver3.h
parent3c778d92e91d0e0ca5b4196e6900dee92a7b66bb (diff)
solver3: Remove work rescoring in favor of unit propagation
Instead of expensive rescoring of all outstanding items, use unit propagation to find new units after conflicts. We still count the items when adding them; but unless they are 0 or 1, which they should not be, they don't have any effect: The size field is now effectively static. If the size of an optional clause changed to 1, it is inserted a second time, and then moves up to the top of the optional items per the Work::operator< rules.
Diffstat (limited to 'apt-pkg/solver3.h')
-rw-r--r--apt-pkg/solver3.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h
index 796f198b1..d4a584f2d 100644
--- a/apt-pkg/solver3.h
+++ b/apt-pkg/solver3.h
@@ -193,8 +193,6 @@ class Solver
// be able to iterate over the queued work and see if a choice would
// invalidate any work.
heap<Work> work{};
- // \brief Whether RescoreWork() actually needs to rescore the work.
- bool needsRescore{false};
// \brief Backlog of solved work.
//
@@ -271,8 +269,6 @@ class Solver
void UndoOne();
// \brief Add work to our work queue.
[[nodiscard]] bool AddWork(Work &&work);
- // \brief Rescore the work after a reject or a pop
- void RescoreWorkIfNeeded();
// \brief Basic solver initializer. This cannot fail.
Solver(pkgCache &Cache, pkgDepCache::Policy &Policy, EDSP::Request::Flags requestFlags);