Line | |
---|
1 | package de.ugoe.cs.autoquest.plugin.alignment.seqgen; |
---|
2 | import de.ugoe.cs.autoquest.eventcore.Event; |
---|
3 | |
---|
4 | import java.util.Collection; |
---|
5 | import java.util.List; |
---|
6 | |
---|
7 | public class RandomSequenceGenerator implements ISequenceGenerator{ |
---|
8 | |
---|
9 | private int min; |
---|
10 | private int max; |
---|
11 | private int count; |
---|
12 | |
---|
13 | |
---|
14 | public RandomSequenceGenerator(int min, int max, int count) { |
---|
15 | this.min = min; |
---|
16 | this.max = max; |
---|
17 | this.count = count; |
---|
18 | } |
---|
19 | |
---|
20 | public int[] generate(List<Event> eventList) { |
---|
21 | int[] result = new int[count]; |
---|
22 | for (int i=0; i<count;i++) { |
---|
23 | result[i]= min + (int)(Math.random() * ((max - min)) + 1); |
---|
24 | } |
---|
25 | return result; |
---|
26 | } |
---|
27 | |
---|
28 | @Override |
---|
29 | public void generate(Collection<List<Event>> eventList) { |
---|
30 | // TODO Auto-generated method stub |
---|
31 | |
---|
32 | } |
---|
33 | |
---|
34 | @Override |
---|
35 | public int[] get(int index) { |
---|
36 | // TODO Auto-generated method stub |
---|
37 | return null; |
---|
38 | } |
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.