pub struct ValuesWalk { /* private fields */ }Expand description
Successive windows of values over whole chromosomes.
Exhausted after one pass. locs() gives the region of each window up
front, so iter.locs().to_vec() before the walk is how both are had at
once.
Implementations§
Source§impl ValuesWalk
impl ValuesWalk
Sourcepub fn restarted(&self) -> Self
pub fn restarted(&self) -> Self
The same walk, back at its first window.
What makes the Python iterator re-iterable: __iter__ hands back a
fresh cursor over the plan that is already built, so a second for
loop walks the file again instead of yielding nothing. Costs two
refcount bumps — the windows and the per-window bin counts are shared,
not copied — and re-reads the file, which is what a second pass is.
Sourcepub fn plan(reader: &BbiReader, req: &ValuesRequest, span: i64) -> Result<Self>
pub fn plan(reader: &BbiReader, req: &ValuesRequest, span: i64) -> Result<Self>
Resolve the whole walk up front: the windows, the zoom level, and every argument that could be refused.
A request that cannot be read says so when it is made rather than part way through the iteration.
Sourcepub fn bin_size(&self) -> i64
pub fn bin_size(&self) -> i64
The whole number of base pairs each bin covers.
Resolved at plan from the request’s f64, so a caller laying window
values out on coordinates — as the exporters do — reads the grid the
walk actually used rather than rounding the request a second time.
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ValuesWalk
impl !UnwindSafe for ValuesWalk
impl Freeze for ValuesWalk
impl Send for ValuesWalk
impl Sync for ValuesWalk
impl Unpin for ValuesWalk
impl UnsafeUnpin for ValuesWalk
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
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> ⓘ
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> ⓘ
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