pub struct CommunityPartition { /* private fields */ }Expand description
Partitioned clause database organized by variable communities.
Implementations§
Source§impl CommunityPartition
impl CommunityPartition
Sourcepub fn from_clauses(num_vars: usize, clauses: &[Clause]) -> Self
pub fn from_clauses(num_vars: usize, clauses: &[Clause]) -> Self
Creates a new community partition from clauses.
Sourcepub fn get_partition(&self, community: usize) -> &[usize]
pub fn get_partition(&self, community: usize) -> &[usize]
Returns the clause indices in a specific community partition.
Sourcepub fn num_communities(&self) -> usize
pub fn num_communities(&self) -> usize
Returns the number of communities.
Sourcepub fn partition_sizes(&self) -> Vec<usize>
pub fn partition_sizes(&self) -> Vec<usize>
Returns all partition sizes.
Sourcepub fn total_clauses(&self) -> usize
pub fn total_clauses(&self) -> usize
Returns the total number of clauses across all partitions.
Sourcepub fn communities(&self) -> &Communities
pub fn communities(&self) -> &Communities
Returns the communities structure.
Sourcepub fn create_ordering(&self) -> CommunityOrdering
pub fn create_ordering(&self) -> CommunityOrdering
Creates a community-aware variable ordering.
Trait Implementations§
Source§impl Clone for CommunityPartition
impl Clone for CommunityPartition
Source§fn clone(&self) -> CommunityPartition
fn clone(&self) -> CommunityPartition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CommunityPartition
impl RefUnwindSafe for CommunityPartition
impl Send for CommunityPartition
impl Sync for CommunityPartition
impl Unpin for CommunityPartition
impl UnsafeUnpin for CommunityPartition
impl UnwindSafe for CommunityPartition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more