public static Partition unit ( int size ) { Partition unit = new Partition ( ) ; unit . cells . add ( new TreeSet < Integer > ( ) ) ; for ( int i = 0 ; i < size ; i ++ ) { unit . cells . get ( 0 ) . add ( i ) ; } return unit ; }
Create a unit partition - in other words the coarsest possible partition where all the elements are in one cell .