Exemple #1
0
 public static DimensionalDomain FromDimension(DimensionDefinition dimensionDefinition)
 {
     return(new DimensionalDomain
     {
         dimension = dimensionDefinition
     });
 }
Exemple #2
0
        public static IEnumerable <double> RandomNumbersInDomainRange(Domain domain, DimensionDefinition dimensionDefinition)
        {
            for (var dimension = 1; dimension <= dimensionDefinition; dimension++)
            {
                var domainDefinition = domain.GetDefinitionForDimension(dimension);

                var rangeMultiplier = domainDefinition.End - domainDefinition.Start;
                var rangeDifference = domainDefinition.Start - 0;

                var random = new Random(DateTime.Now.Millisecond);

                yield return((random.NextDouble() * rangeMultiplier) + rangeDifference);
            }
        }