Create a universal quantifier reducer from a predicate p
.
Create a universal quantifier reducer from a predicate p
.
the predicate to apply to the values of the column.
Reduce the given column of values to a cell using only the indexes in given array slice.
Reduce the given column of values to a cell using only the indexes in given array slice.
indices
, start
, and end
represent an array slice. The
following must hold:
0 <= start
end <= indices.length
start <= end
and the slice is [start:end)
, inclusive of start
and
exclusive of end
.
Let i: Int
where start <= i
and i < end
, then
column(indices(i)) match { case Value(v) => // 1. case NA => // 2. case NM => // 3. }
the column of values is the source of the reduction
the array of column indexes to reduce over
the start of the array slice on the indices
the end of the array slice on the indices
the result of the reduction as a Cell
A Reducer that universally quantifies a predicate as a reduction over a collection of Cells.
This reducer will return false upon encountering the first value that is not meaningful, or the first value that is available and meaningful and applying the predicate
p
to that value returns false. Otherwise, returns true.This reducer does propogate NM, in a sense, but the result is
Value(false)
rather thanNM
. Unavailable values (NA) are treated as the vaccuous case, so they will in count as a counter example to the quantification.This reducer will only traverse the entire collection if it never encounters a not meaningful value or a meaningful value that does not satisfy the predicate
p
.the value type of the column to reduce.
This reducer will always return precisely
Value[Boolean]
, rather thanCell[Boolean]
. This in constrast to most reducers that will also return NonValues.Exists