source: trunk/autoquest-plugin-alignment/src/main/java/de/ugoe/cs/autoquest/plugin/alignment/seqgen/RandomSequenceGenerator.java @ 1314

Last change on this file since 1314 was 1314, checked in by rkrimmel, 11 years ago

Hopefully resolved svn issues

File size: 578 bytes
Line 
1package de.ugoe.cs.autoquest.plugin.alignment.seqgen;
2import de.ugoe.cs.autoquest.eventcore.Event;
3import java.util.List;
4
5public class RandomSequenceGenerator implements SequenceGenerator {
6
7        private int min;
8        private int max;
9        private int count;
10       
11       
12        public RandomSequenceGenerator(int min, int max, int count) {
13                this.min = min;
14                this.max = max;
15                this.count = count;
16        }
17       
18        public int[] generate(List<Event> eventList) {
19                int[] result = new int[count];
20                for (int i=0; i<count;i++) {
21                        result[i]= min + (int)(Math.random() * ((max - min)) + 1);
22                }
23                return result;
24        }
25}
Note: See TracBrowser for help on using the repository browser.