File tree Expand file tree Collapse file tree
vortex-array/src/arrays/listview Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -315,9 +315,9 @@ impl Default for ListViewData {
315315 }
316316}
317317
318- /// Walks parallel `(offset, size)` slices and marks every referenced position in `buf`.
318+ /// Walks parallel `(offset, size)` slices and sets each range `[offset, offset + size]` in `buf`.
319319///
320- /// **Precondition **
320+ /// **Preconditions **
321321///
322322/// `offsets` and `sizes` must be the same length (which is always the case in valid `ListViewArray`s).
323323fn fill_referenced_mask < O : IntegerPType , S : IntegerPType > (
@@ -460,7 +460,7 @@ pub trait ListViewArrayExt: TypedArrayRef<ListView> {
460460
461461 /// Exact fraction of `elements` referenced by some view, in `[0.0, 1.0]`. Extremely costly.
462462 ///
463- /// Returns `Ok(1.0)` when `elements` is empty.
463+ /// Returns `Ok(1.0)` when `elements` is empty instead of dividing by 0 .
464464 fn compute_density ( & self , ctx : & mut ExecutionCtx ) -> VortexResult < f32 > {
465465 if self . elements ( ) . is_empty ( ) {
466466 return Ok ( 1.0 ) ;
@@ -484,7 +484,7 @@ pub trait ListViewArrayExt: TypedArrayRef<ListView> {
484484 ///
485485 /// Exact for non-overlapping views, but overcounts when multiple views share the same elements.
486486 ///
487- /// Returns `Ok(1.0)` when `elements` is empty.
487+ /// Returns `Ok(1.0)` when `elements` is empty instead of dividing by 0 .
488488 fn upper_bound_density ( & self , ctx : & mut ExecutionCtx ) -> VortexResult < f32 > {
489489 let n_elts = self . elements ( ) . len ( ) ;
490490 if n_elts == 0 {
You can’t perform that action at this time.
0 commit comments