~eda-qa/dhlib/main

« back to all changes in this revision

Viewing changes to lib/mathx/RandGen.hx

  • Committer: edA-qa mort-ora-y
  • Date: 2010-02-16 05:36:32 UTC
  • Revision ID: eda-qa@disemia.com-20100216053632-60lt7fndfi3fgblw
first

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* <license>
 
2
 * This file is part of the dis-Emi-A HaXe Library. Copyright © edA-qa mort-ora-y
 
3
 * For full copyright and license information please refer to doc/license.txt.
 
4
 * </license> 
 
5
 */
 
6
package mathx;
 
7
 
 
8
/**
 
9
 * Defines the form of a random number generator.
 
10
 *
 
11
 * Class "Random" has constructors for many of the standard
 
12
 * generators
 
13
 *
 
14
 * HAXE: haXe's templates are like Java's and thus this class is not
 
15
 * as useful as one would hope.  One cannot determine at run-time
 
16
 * which type of RandGen one has, which causes problems in TypeConvert
 
17
 */
 
18
interface RandGen<T>
 
19
{
 
20
        /** 
 
21
         * Returns the next random item from this generator
 
22
         */
 
23
        public function next() : Dynamic;
 
24
        
 
25
        /**
 
26
         * RandGen's must be convertible to Strings in a fashion that
 
27
         * can be later parsed
 
28
         */
 
29
        public function toString() : String;
 
30
}