Lines Matching refs:data

18     pub(crate) fn get(&self, n: usize, data: &[T], index: usize) -> Option<bool> {  in get()
26 let element = data.get(element_index)?; in get()
33 pub(crate) fn set(&self, n: usize, data: &mut [T], index: usize, value: bool) -> Option<bool> { in set()
40 let element = data.get_mut(element_index)?; in set()
46 pub(crate) fn set_all(&self, n: usize, data: &mut [T], value: bool) { in set_all()
48 for element in data.iter_mut() { in set_all()
53 let last_element = data.last_mut().unwrap(); in set_all()
61 pub(crate) fn first_index(&self, data: &[T]) -> Option<usize> { in first_index()
62 for (i, element) in data.iter().enumerate() { in first_index()
73 pub(crate) fn first_false_index(&self, n: usize, data: &[T]) -> Option<usize> { in first_false_index()
74 for (i, element) in data.iter().enumerate() { in first_false_index()
84 pub(crate) fn last_index(&self, n: usize, data: &[T]) -> Option<usize> { in last_index()
85 for (i, element) in data.iter().enumerate().rev() { in last_index()
100 pub(crate) fn last_false_index(&self, n: usize, data: &[T]) -> Option<usize> { in last_false_index()
101 let mut iter = data.iter().rev(); in last_false_index()
113 return self.make_index(n, (data.len() - 1) * T::bit_size() + bit); in last_false_index()
118 return self.make_index(n, (data.len() - 1) * T::bit_size() + bit); in last_false_index()
126 pub(crate) fn next_index(&self, n: usize, data: &[T], index: usize) -> Option<usize> { in next_index()
134 let element = data.get(element_index)?; in next_index()
139 for (i, element) in data.iter().enumerate().skip(element_index + 1) { in next_index()
149 pub(crate) fn next_false_index(&self, n: usize, data: &[T], index: usize) -> Option<usize> { in next_false_index()
157 let element = data.get(element_index)?; in next_false_index()
162 for (i, element) in data.iter().enumerate().skip(element_index + 1) { in next_false_index()
172 pub(crate) fn prev_index(&self, n: usize, data: &[T], index: usize) -> Option<usize> { in prev_index()
179 let element = data.get(element_index)?; in prev_index()
184 for (i, element) in data.iter().enumerate().take(element_index).rev() { in prev_index()
193 pub(crate) fn prev_false_index(&self, n: usize, data: &[T], index: usize) -> Option<usize> { in prev_false_index()
197 let element = data.get(element_index)?; in prev_false_index()
202 for (i, element) in data.iter().enumerate().take(element_index).rev() { in prev_false_index()
211 pub(crate) fn invert(&self, n: usize, data: &mut [T]) { in invert()
212 for element in data.iter_mut() { in invert()
218 let last_element = data.last_mut().unwrap(); in invert()
225 pub(crate) fn is_full(&self, n: usize, data: &[T]) -> bool { in is_full()
226 let mut iter = data.iter().peekable(); in is_full()
248 pub(crate) fn is_empty(&self, data: &[T]) -> bool { in is_empty()
249 for element in data.iter() { in is_empty()