package combinations;

import java.util.Vector;

public class Driver {
	
	int numberOfFields;
	
	int fieldLength;
	
	int bitsConstrained;
	
	int count;
	
	Vector<Integer> fieldLengthCollection;
	
	Vector<Integer> bitsConstrainedCollection;
	
	Vector<Integer> countCollection;
	
	public Driver(){
		
		numberOfFields = 5;
		
		fieldLength = -1;
		
		bitsConstrained = -1;
		
		count = -1;
		
		fieldLengthCollection = new Vector<Integer>();
		
		bitsConstrainedCollection = new Vector<Integer>();
		
		countCollection = new Vector<Integer>();
		
	}

	public Vector<String> getCombo_AllBitsConstrained( int fieldLength ){
		
		Vector<String> combos = new Vector<String>();
		
		String combo = "";
		
		for(int i=0; i<2; i++){
		
			for(int j=0; j<fieldLength; j++){
			
				if( i == 0 )
					combo += "0";
				else
					combo += "1";
			
			}
			
			combos.add( combo );
			combo = new String();
			
		}
		
		return combos;
		
	}
	
	public int getCount_AllBitsConstrained( int fieldLength ){
		
		Vector<String> combos = getCombo_AllBitsConstrained( fieldLength );
	
		return combos.size();
		
	}
	
	public int getCount_SomeBitsConstrained( int fieldLength, int bitsConstrained ){
		
		Vector<String> combos = new Vector<String>();
		
		String combo = "";
		
		int numberRows = fieldLength - bitsConstrained + 1;
		
		int numberCombosPerRow = (int) Math.pow( 2.0, ((double)numberRows) );
		
		// number of "rows" ..
		for(int i=0; i<numberRows; i++){
		
			// number of combos per "row" ..
			for(int j=0; j<fieldLength; j++){
				
				
				
				// a single combo ..
				for(int k=0; k<fieldLength; k++){
				
					// generate 
				
				}
			
			}
			

			
			combos.add( combo );
			combo = new String();
			
		}
		
		return combos;
		
	}
	
	public static void main(String[] args){
		
		
		
	}

}
