fn apply(&self, data: &CollisionDataset) -> Vec<usize> {
        let mut indices = Vec::new();
        for (idx, c) in data.collisions.iter().enumerate() {
            if c.time < self.time_range.0 || c.time > self.time_range.1 {
                continue;
            }
            if self.severity.map(|s| s != c.severity).unwrap_or(false) {
                continue;
            }
            indices.push(idx);
        }
        indices
    }
/// Returns the indices of all matching collisions
Returns the indices of all matching collisions
Returns the indices of all matching collisions
fn apply(&self, data: &CollisionDataset) -> Vec<usize> {
        let mut indices = Vec::new();
        for (idx, c) in data.collisions.iter().enumerate() {
            if c.time < self.time_range.0 || c.time > self.time_range.1 {
                continue;
            }
            if self.severity.map(|s| s != c.severity).unwrap_or(false) {
                continue;
            }
            indices.push(idx);
        }
        indices
    }
fn apply ( & self , data : & CollisionDataset ) -> Vec < usize > { let mut indices = Vec :: new ( ) ; for ( idx , c ) in data . collisions . iter ( ) . enumerate ( ) { if c . time < self . time_range . 0 || c . time > self . time_range . 1 { continue ; } if self . severity . map ( | s | s != c . severity ) . unwrap_or ( false ) { continue ; } indices . push ( idx ) ; } indices }
Returns the indices of all matching collisions
Returns the indices of all matching collisions
&self
data
&CollisionDataset