Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
306
306Lab5
Commits
5041d416
Commit
5041d416
authored
Apr 19, 2019
by
michael lundquist
Browse files
Adding some comments
parent
2eeac570
Pipeline
#4243
passed with stage
in 1 minute and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
fifthlab/src/main/java/com/ds/fifthlab/Combination.java
View file @
5041d416
...
...
@@ -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"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment