-
-
Notifications
You must be signed in to change notification settings - Fork 335
/
IRandomization.cs
64 lines (58 loc) · 2.51 KB
/
IRandomization.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
namespace GeneticSharp
{
/// <summary>
/// Defines an interface for randomization.
/// </summary>
public interface IRandomization
{
#region Methods
/// <summary>
/// Gets an integer value between minimum value (inclusive) and maximum value (exclusive).
/// </summary>
/// <returns>The integer.</returns>
/// <param name="min">Minimum value (inclusive).</param>
/// <param name="max">Maximum value (exclusive).</param>
int GetInt(int min, int max);
/// <summary>
/// Gets an integer array with values between minimum value (inclusive) and maximum value (exclusive).
/// </summary>
/// <returns>The integer array.</returns>
/// <param name="length">The array length</param>
/// <param name="min">Minimum value (inclusive).</param>
/// <param name="max">Maximum value (exclusive).</param>
int[] GetInts(int length, int min, int max);
/// <summary>
/// Gets an integer array with unique values between minimum value (inclusive) and maximum value (exclusive).
/// </summary>
/// <returns>The integer array.</returns>
/// <param name="length">The array length</param>
/// <param name="min">Minimum value (inclusive).</param>
/// <param name="max">Maximum value (exclusive).</param>
int[] GetUniqueInts(int length, int min, int max);
/// <summary>
/// Gets a float value between 0.0 and 1.0.
/// </summary>
/// <returns>The float value.</returns>
float GetFloat();
/// <summary>
/// Gets a float value between minimum value (inclusive) and maximum value (exclusive).
/// </summary>
/// <returns>The float value.</returns>
/// <param name="min">Minimum value.</param>
/// <param name="max">Max value.</param>
float GetFloat(float min, float max);
/// <summary>
/// Gets a double value between 0.0 and 1.0.
/// </summary>
/// <returns>The double value.</returns>
double GetDouble();
/// <summary>
/// Gets a double value between minimum value (inclusive) and maximum value (exclusive).
/// </summary>
/// <returns>The double value.</returns>
/// <param name="min">Minimum value.</param>
/// <param name="max">Max value.</param>
double GetDouble(double min, double max);
#endregion
}
}