A method and neurostimulation control system for programming electrodes disposed adjacent tissue of a patient. The electrodes are initially assigned to a plurality of electrode subsets to be evaluated. A pair of immediately neighboring ones of the electrode subsets is determined, and merged into a new electrode subset that includes all electrodes in the pair of immediately neighboring electrode subsets. The new electrode subset is included within the plurality of electrode subsets to be evaluated, while the pair of immediately neighboring electrode subsets is excluded from the plurality of electrode sets to be evaluated. These steps are repeated until all the electrode subsets have been merged into a single electrode subset. A clustering relationship of the electrodes is identified, and the electrodes are programmed based on the identified clustering relationship of the electrodes.