Add Multicolumn support block fragmentation.

This commit is contained in:
Simon Sapin 2015-12-30 23:50:24 +00:00
parent 359b984348
commit 5498b54347
10 changed files with 373 additions and 51 deletions

View file

@ -29,6 +29,17 @@ impl FlowList {
self.flows.push_back(new_tail);
}
/// Add an element first in the list
///
/// O(1)
pub fn push_front(&mut self, new_head: FlowRef) {
self.flows.push_front(new_head);
}
pub fn pop_front(&mut self) -> Option<FlowRef> {
self.flows.pop_front()
}
/// Create an empty list
#[inline]
pub fn new() -> FlowList {
@ -64,6 +75,13 @@ impl FlowList {
pub fn len(&self) -> usize {
self.flows.len()
}
#[inline]
pub fn split_off(&mut self, i: usize) -> Self {
FlowList {
flows: self.flows.split_off(i)
}
}
}
impl<'a> Iterator for FlowListIterator<'a> {