24 package org.lightvoting.simulation.combinations;
26 import java.util.ArrayList;
27 import java.util.Arrays;
28 import java.util.List;
54 public void combinations(
final int[] p_arr,
final int p_len,
final int p_startPosition,
final int[] p_result )
58 m_resultList.add( Arrays.copyOf( p_result, p_result.length ) );
62 for (
int i = p_startPosition; i <= p_arr.length - p_len; i++ )
64 p_result[p_result.length - p_len] = p_arr[i];
65 this.combinations( p_arr, p_len - 1, i + 1, p_result );
void combinations(final int[] p_arr, final int p_len, final int p_startPosition, final int[] p_result)
compute possible positions of the ones in the committee
Created by sophie on 08.02.17.
List< int[]> getResultList()
List< int[]> m_resultList