pub struct Partition {
pub id: PartitionId,
pub nodes: Vec<u64>,
pub total_weight: f64,
pub total_memory: u64,
}Expand description
A partition of graph nodes.
Fields§
§id: PartitionIdPartition identifier.
nodes: Vec<u64>Node IDs assigned to this partition.
total_weight: f64Total computational weight.
total_memory: u64Total memory requirement.
Implementations§
Source§impl Partition
impl Partition
Sourcepub fn new(id: PartitionId) -> Self
pub fn new(id: PartitionId) -> Self
Create a new empty partition.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Number of nodes in this partition.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Partition
impl RefUnwindSafe for Partition
impl Send for Partition
impl Sync for Partition
impl Unpin for Partition
impl UnsafeUnpin for Partition
impl UnwindSafe for Partition
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> 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