Home | History | Annotate | Download | only in util

Lines Matching refs:SparseArray

7 // SparseArray<T>(m) is a map from integers in [0, m) to T values.
27 // change after visiting. Thus SparseArray can be a convenient
30 // The SparseArray implementation is NOT thread-safe. It is up to the
35 // The SparseArray interface does not present all the usual STL bells and
55 // SparseArray uses a vector dense_ and an array sparse_to_dense_, both of
90 // destroyed when the SparseArray destructor is called.
100 class SparseArray {
102 SparseArray();
103 SparseArray(int max_size);
104 ~SparseArray();
106 // IndexValue pairs: exposed in SparseArray::iterator.
229 DISALLOW_EVIL_CONSTRUCTORS(SparseArray);
233 SparseArray<Value>::SparseArray()
236 // IndexValue pairs: exposed in SparseArray::iterator.
238 class SparseArray<Value>::IndexValue {
239 friend class SparseArray;
259 const typename SparseArray<Value>::IndexValue&
260 SparseArray<Value>::iv(int i) const {
269 void SparseArray<Value>::resize(int new_max_size) {
294 bool SparseArray<Value>::has_index(int i) const {
307 typename SparseArray<Value>::iterator SparseArray<Value>::set(int i, Value v) {
321 pair<typename SparseArray<Value>::iterator, bool> SparseArray<Value>::insert(
324 pair<typename SparseArray<Value>::iterator, bool> p;
335 Value SparseArray<Value>::get(int i, Value defaultv) const {
342 typename SparseArray<Value>::iterator SparseArray<Value>::find(int i) {
349 typename SparseArray<Value>::const_iterator
350 SparseArray<Value>::find(int i) const {
358 typename SparseArray<Value>::iterator
359 SparseArray<Value>::set_existing(int i, Value v) {
368 typename SparseArray<Value>::iterator
369 SparseArray<Value>::set_new(int i, Value v) {
383 Value SparseArray<Value>::get_existing(int i) const {
389 void SparseArray<Value>::erase(int i) {
397 void SparseArray<Value>::erase_existing(int i) {
410 void SparseArray<Value>::create_index(int i) {
418 template<typename Value> SparseArray<Value>::SparseArray(int max_size) {
434 template<typename Value> SparseArray<Value>::~SparseArray() {
439 template<typename Value> void SparseArray<Value>::DebugCheckInvariants() const {
446 template<typename Value> bool SparseArray<Value>::less(const IndexValue& a,