public final void computeIndex(){
  if (indexComputed) {
    return;
  }
  List<Long> cellList=Lists.newArrayList();
  List<Integer> edgeList=Lists.newArrayList();
  for (int i=0; i < getNumEdges(); ++i) {
    S2Point from=edgeFrom(i);
    S2Point to=edgeTo(i);
    ArrayList<S2CellId> cover=Lists.newArrayList();
    int level=getCovering(from,to,true,cover);
    minimumS2LevelUsed=Math.min(minimumS2LevelUsed,level);
    for (    S2CellId cellId : cover) {
      cellList.add(cellId.id());
      edgeList.add(i);
    }
  }
  cells=new long[cellList.size()];
  edges=new int[edgeList.size()];
  for (int i=0; i < cells.length; i++) {
    cells[i]=cellList.get(i);
    edges[i]=edgeList.get(i);
  }
  sortIndex();
  indexComputed=true;
}

public final void computeIndex ( ) { if ( indexComputed ) { return ; } List < Long > cellList = Lists . newArrayList ( ) ; List < Integer > edgeList = Lists . newArrayList ( ) ; for ( int i = 0 ; i < getNumEdges ( ) ; ++ i ) { S2Point from = edgeFrom ( i ) ; S2Point to = edgeTo ( i ) ; ArrayList < S2CellId > cover = Lists . newArrayList ( ) ; int level = getCovering ( from , to , true , cover ) ; minimumS2LevelUsed = Math . min ( minimumS2LevelUsed , level ) ; for ( S2CellId cellId : cover ) { cellList . add ( cellId . id ( ) ) ; edgeList . add ( i ) ; } } cells = new long [ cellList . size ( ) ] ; edges = new int [ edgeList . size ( ) ] ; for ( int i = 0 ; i < cells . length ; i ++ ) { cells [ i ] = cellList . get ( i ) ; edges [ i ] = edgeList . get ( i ) ; } sortIndex ( ) ; indexComputed = true ; }
computes the index ( if it has not been previously done ) .
