Last change
on this file since 1543 was
1542,
checked in by rkrimmel, 10 years ago
|
pre-catastraphic-changes-commit
|
File size:
891 bytes
|
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 | |
---|
[1449] | 7 | public class RandomSequenceGenerator implements SequenceGenerator{ |
---|
[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 |
---|
[1449] | 35 | public NumberSequence get(int index) { |
---|
[1323] | 36 | // TODO Auto-generated method stub |
---|
| 37 | return null; |
---|
| 38 | } |
---|
[1542] | 39 | |
---|
| 40 | @Override |
---|
| 41 | public int sequenceCount() { |
---|
| 42 | return count; |
---|
| 43 | } |
---|
| 44 | |
---|
[1314] | 45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.