Commit 5041d416 authored by michael lundquist's avatar michael lundquist
Browse files

Adding some comments

parent 2eeac570
Pipeline #4243 passed with stage
in 1 minute and 34 seconds
......@@ -3,9 +3,16 @@ package com.ds.fifthlab;
import java.util.Vector;
public class Combination<T, S> {
Produces all the permutations
* This creates an array of the permutations of all the elements choosing 1 from .
* @param <T> The parameterized type of vec1.
* @param <S> The parameterized type of vec2.
* @param vec1 The first vector to pull elements from for combinations.
* @param vec2 The second vector to pull elements from for combinations.
* @return An array of all per
* @throws IndexOutOfBoundsException if vec1 and vec2 aren't the same size.
public static <T, S> Pair[] getPermutation( Vector<T> vec1, Vector<S> vec2){
if(vec1.size() != vec2.size()){
throw new IndexOutOfBoundsException("Vectors not the same size");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment