Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ create_statistics_struct!(SemanticMinimiserStatistics {

impl Default for SemanticMinimiser {
fn default() -> Self {
let mapping = |x: &DomainId| x.id() as usize;
Self {
original_domains: Default::default(),
domains: Default::default(),
present_ids: SparseSet::new(vec![], mapping),
present_ids: SparseSet::new(vec![]),
helper: Vec::default(),
mode: SemanticMinimisationMode::EnableEqualityMerging,
statistics: SemanticMinimiserStatistics::default(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use super::VariableSelector;
use crate::branching::BrancherEvent;
use crate::branching::SelectionContext;
use crate::containers::SparseSet;
use crate::containers::StorageKey;
use crate::variables::DomainId;

/// A [`VariableSelector`] which selects a random unfixed variable.
Expand All @@ -15,9 +14,7 @@ impl RandomSelector {
pub fn new(variables: impl IntoIterator<Item = DomainId>) -> Self {
// Note the -1 due to the fact that the indices of the domain ids start at 1
Self {
variables: SparseSet::new(variables.into_iter().collect(), |element| {
element.index() - 1
}),
variables: SparseSet::new(variables.into_iter().collect()),
}
}

Expand Down
Loading
Loading