foobar2000 SDK
2015-08-03
|
#include <bit_array_impl_part2.h>
Public Member Functions | |
bit_array_flatIndexList () | |
void | add (size_t n) |
t_size | find (bool val, t_size start, t_ssize count) const |
bool | get (t_size n) const |
void | presort () |
Public Member Functions inherited from pfc::bit_array | |
t_size | calc_count (bool val, t_size start, t_size count, t_size count_max=~0) const |
t_size | find_first (bool val, t_size start, t_size max) const |
t_size | find_next (bool val, t_size previous, t_size max) const |
bool | operator[] (t_size n) const |
Private Member Functions | |
bool | _find (size_t val, size_t &outIdx) const |
bool | _findNearestDown (size_t val, size_t &outIdx) const |
bool | _findNearestUp (size_t val, size_t &outIdx) const |
Private Attributes | |
pfc::array_t< size_t, pfc::alloc_fast > | m_content |
Additional Inherited Members | |
Protected Member Functions inherited from pfc::bit_array | |
bit_array () | |
~bit_array () | |
Specialized implementation of bit_array.
Indended for scenarios where fast searching for true values in a large list is needed, combined with low footprint regardless of the amount of items. Call add() repeatedly with the true val indexes. If the indexes were not added in increasing order, call presort() when done with adding.
Definition at line 23 of file bit_array_impl_part2.h.
pfc::bit_array_flatIndexList::bit_array_flatIndexList | ( | ) |
Definition at line 33 of file bit_array.cpp.
|
inlineprivate |
Definition at line 37 of file bit_array_impl_part2.h.
|
private |
Definition at line 73 of file bit_array.cpp.
|
private |
Definition at line 63 of file bit_array.cpp.
void pfc::bit_array_flatIndexList::add | ( | size_t | n | ) |
Definition at line 37 of file bit_array.cpp.
Returns the first occurance of val between start and start+count (excluding start+count), or start+count if not found; count may be negative to search back rather than forward.
Can be overridden by bit_array implementations for improved speed in specific cases.
Reimplemented from pfc::bit_array.
Definition at line 45 of file bit_array.cpp.
|
virtual |
Implements pfc::bit_array.
Definition at line 41 of file bit_array.cpp.
void pfc::bit_array_flatIndexList::presort | ( | ) |
Definition at line 84 of file bit_array.cpp.
|
private |
Definition at line 41 of file bit_array_impl_part2.h.