forked from giacomelli/GeneticSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIRandomization.cs
52 lines (47 loc) · 1.79 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
using System;
namespace GeneticSharp.Domain.Randomizations
{
/// <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 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
}
}