src/ccutil/indexmapbidi.cpp
void IndexMapBiDi::Init(int size, bool all_mapped) {
  if (!all_mapped) {
    sparse_map_.clear();
  }
  sparse_map_.resize(size, -1);
  if (all_mapped) {
    for (int i = 0; i < size; ++i) {
      sparse_map_[i] = i;
    }
  }
}
// Initializes just the sparse_map_ to the given size with either all
// forward indices mapped (all_mapped = true) or none (all_mapped = false).
// Call Setup immediately after, or make calls to SetMap first to adjust the
// mapping and then call Setup before using the map.
Initializes just the sparse_map_ to the given size with either all
forward indices mapped (all_mapped = true) or none (all_mapped = false).
Call Setup immediately after, or make calls to SetMap first to adjust the
mapping and then call Setup before using the map.
Initializes just the sparse_map_ to the given size with either all forward indices mapped ( all_mapped = true ) or none ( all_mapped = false ) . Call Setup immediately after or make calls to SetMap first to adjust the mapping and then call Setup before using the map .
void IndexMapBiDi::Init(int size, bool all_mapped) {
  if (!all_mapped) {
    sparse_map_.clear();
  }
  sparse_map_.resize(size, -1);
  if (all_mapped) {
    for (int i = 0; i < size; ++i) {
      sparse_map_[i] = i;
    }
  }
}
void IndexMapBiDi :: Init ( int size , bool all_mapped ) { if ( ! all_mapped ) { sparse_map_ . clear ( ) ; } sparse_map_ . resize ( size , -1 ) ; if ( all_mapped ) { for ( int i = 0 ; i < size ; ++ i ) { sparse_map_ [ i ] = i ; } } }
Initializes just the sparse_map_ to the given size with either all
forward indices mapped (all_mapped = true) or none (all_mapped = false).
Initializes just the sparse_map_ to the given size with either all forward indices mapped ( all_mapped = true ) or none ( all_mapped = false ) .