Last change
on this file since 27 was
26,
checked in by gnappo, 14 years ago
|
Aggiunto output in formato XML dei dati; modificato MQI (adesso cerca nella partizione piu` grande).
|
File size:
585 bytes
|
Line | |
---|
1 | package weka.clusterers.forMetisMQI.util; |
---|
2 | |
---|
3 | public class Random extends java.util.Random { |
---|
4 | |
---|
5 | private static final long serialVersionUID = 1L; |
---|
6 | |
---|
7 | private static Random instance = null; |
---|
8 | |
---|
9 | private long seed = 1234567890; |
---|
10 | |
---|
11 | /** |
---|
12 | * Return an instance of a random generator with a random seed. |
---|
13 | * @return |
---|
14 | */ |
---|
15 | public static Random instance() { |
---|
16 | if(instance == null) { |
---|
17 | instance = new Random(new java.util.Random().nextLong()/*1234567890*/); |
---|
18 | } |
---|
19 | return instance; |
---|
20 | } |
---|
21 | |
---|
22 | public long getSeed() { |
---|
23 | return seed; |
---|
24 | } |
---|
25 | |
---|
26 | private Random(long seed) { |
---|
27 | super(seed); |
---|
28 | this.seed = seed; |
---|
29 | } |
---|
30 | |
---|
31 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.