MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / build_v_peer_groups

Function build_v_peer_groups

nodedb-query/src/window/value_agg.rs:247–262  ·  view source on GitHub ↗
(order_values: &[Value])

Source from the content-addressed store, hash-verified

245}
246
247fn build_v_peer_groups(order_values: &[Value]) -> Vec<usize> {
248 let mut groups = Vec::with_capacity(order_values.len());
249 let mut current_group = 0usize;
250 for (i, val) in order_values.iter().enumerate() {
251 if i > 0
252 && !matches!(
253 cmp_values(val, &order_values[i - 1]),
254 std::cmp::Ordering::Equal
255 )
256 {
257 current_group += 1;
258 }
259 groups.push(current_group);
260 }
261 groups
262}
263
264pub(super) fn evaluate_v_frame_bounds(
265 frame: &WindowFrame,

Callers 1

Calls 3

lenMethod · 0.45
iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected