Example #1
0
 private void Waiting()
 {
     Receive <Start>(msg =>
     {
         _function         = msg.Function;
         _sender           = Sender;
         _distributionName = msg.DistributionName;
         _randomActor.Tell(new RandomDoubleActor.NextRandom(msg.NoResults));
         BecomeStacked(Working);
     });
 }
            public AddProbabilityDensityFunction(string functionName, ISingleVariableFunction <double, int> function)
            {
                if (function == null)
                {
                    throw new ArgumentNullException(nameof(function));
                }
                if (String.IsNullOrWhiteSpace(functionName))
                {
                    throw new ArgumentException("Argument is null or whitespace", nameof(functionName));
                }

                FunctionName = functionName;
                Function     = function;
            }
            public AddCumulativeDistributionFunction(string functionName, ISingleVariableFunction <int, double> function)
            {
                if (function == null)
                {
                    throw new ArgumentNullException(nameof(function));
                }
                if (String.IsNullOrWhiteSpace(functionName))
                {
                    throw new ArgumentException("Argument is null or whitespace", nameof(functionName));
                }

                FunctionName = functionName;
                Function     = function;
            }
Example #4
0
            public CdfGenerated(string cdfName, ISingleVariableFunction <int, double> cdf)
            {
                if (cdf == null)
                {
                    throw new ArgumentNullException(nameof(cdf));
                }
                if (String.IsNullOrWhiteSpace(cdfName))
                {
                    throw new ArgumentException("Argument is null or whitespace", nameof(cdfName));
                }


                CdfName = cdfName;
                CDF     = cdf;
            }
Example #5
0
            public Start(ISingleVariableFunction <double, int> function, int min, int max, int noPointsToSample, string cdfName)
            {
                if (function == null)
                {
                    throw new ArgumentNullException(nameof(function));
                }
                if (noPointsToSample <= 0)
                {
                    throw new ArgumentOutOfRangeException(nameof(noPointsToSample));
                }
                if (String.IsNullOrWhiteSpace(cdfName))
                {
                    throw new ArgumentException("Argument is null or whitespace", nameof(cdfName));
                }

                Function         = function;
                Min              = min;
                Max              = max;
                NoPointsToSample = noPointsToSample;
                CdfName          = cdfName;
            }
Example #6
0
 public Start(ISingleVariableFunction <int, double> function, int noResults, string distributionName)
 {
     Function         = function;
     NoResults        = noResults;
     DistributionName = distributionName;
 }