pub fn len_of_set(&self, index: usize) -> usize {
        let mut current = self.meta[index].link();
        let mut count = 1;

        while current != index {
            current = self.meta[current].link();
            count += 1;
        }

        count
    }
/// Returns the amount of elements in the set that `index` belongs to.
///
/// This will be done in `O(m)` time where `m` is the size of the set that `index` belongs to.
///
/// # Panics
///
/// If `index` is out of bounds.
///
/// # Examples
///
/// ```
/// # #[macro_use]
/// # extern crate partitions;
/// #
/// # fn main() {
/// let mut partition_vec = partition_vec![true; 3];
///
/// assert!(partition_vec.len_of_set(0) == 1);
/// assert!(partition_vec.len_of_set(1) == 1);
/// assert!(partition_vec.len_of_set(2) == 1);
///
/// partition_vec.union(0, 2);
///
/// assert!(partition_vec.len_of_set(0) == 2);
/// assert!(partition_vec.len_of_set(1) == 1);
/// assert!(partition_vec.len_of_set(2) == 2);
/// # }
/// ```
Returns the amount of elements in the set that `index` belongs to.
Returns the amount of elements in the set that ` index ` belongs to .
pub fn len_of_set(&self, index: usize) -> usize {
        let mut current = self.meta[index].link();
        let mut count = 1;
        while current != index {
            current = self.meta[current].link();
            count += 1;
        }
        count
    }
pub fn len_of_set ( & self , index : usize ) -> usize { let mut current = self . meta [ index ] . link ( ) ; let mut count = 1 ; while current != index { current = self . meta [ current ] . link ( ) ; count += 1 ; } count }
Returns the amount of elements in the set that `index` belongs to.
Returns the amount of elements in the set that ` index ` belongs to .
&self
index
usize
&self
index
usize
panics
If `index` is out of bounds.
If ` index ` is out of bounds .
examples
None
#[macro_use]
None
extern crate partitions;
None
fn main() {
let mut partition_vec = partition_vec![true; 3].



partition_vec.union(0, 2).


let mut partition_vec = partition_vec! [ true ; 3 ] . partition_vec . union ( 0 2 ) .
}
None