Rev | Line | |
---|
[1314] | 1 | package de.ugoe.cs.autoquest.plugin.alignment.seqgen; |
---|
| 2 | import de.ugoe.cs.autoquest.eventcore.Event; |
---|
[1323] | 3 | |
---|
| 4 | import java.util.Collection; |
---|
[1314] | 5 | import java.util.List; |
---|
| 6 | |
---|
[1323] | 7 | public class RandomSequenceGenerator implements ISequenceGenerator{ |
---|
[1314] | 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 | } |
---|
[1323] | 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 | } |
---|
[1314] | 39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.