question: protected Map < Integer , List < Solution > > createGridMap ( ) { AdaptiveGridArchive archive = getArchive ( ) ; Map < Integer , List < Solution > > result = new HashMap < Integer , List < Solution > > ( ) ; for ( Solution solution : archive ) { int index = archive . findIndex ( solution ) ; List < Solution > solutions = result . get ( index ) ; if ( solutions == null ) { solutions = new ArrayList < Solution > ( ) ; result . put ( index , solutions ) ; } solutions . add ( solution ) ; } return result ; }
target:  Returns a mapping from grid index to the solutions occupying that grid index.  The key is the grid index, and the value is the list of solutions occupying that index.