MCPcopy Create free account
hub / github.com/comnik/declarative-dataflow / count

Method count

src/plan/hector.rs:1032–1044  ·  view source on GitHub ↗
(
        &mut self,
        prefixes: &Collection<S, (P, usize, usize)>,
        index: usize,
    )

Source from the content-addressed store, hash-verified

1030 type Extension = V;
1031
1032 fn count(
1033 &mut self,
1034 prefixes: &Collection<S, (P, usize, usize)>,
1035 index: usize,
1036 ) -> Option<Collection<S, (P, usize, usize)>> {
1037 Some(prefixes.map(move |(prefix, old_count, old_index)| {
1038 if 1 < old_count {
1039 (prefix.clone(), 1, index)
1040 } else {
1041 (prefix.clone(), old_count, old_index)
1042 }
1043 }))
1044 }
1045
1046 fn propose(&mut self, prefixes: &Collection<S, P>) -> Collection<S, (P, V)> {
1047 let value = self.value.clone();

Callers 8

mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
sinkMethod · 0.80
implementMethod · 0.80
extendMethod · 0.80
implementMethod · 0.80
implementMethod · 0.80

Calls 3

extendMethod · 0.80
cmpMethod · 0.80
less_equalMethod · 0.45

Tested by

no test coverage detected