コード例 #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);
     });
 }
コード例 #2
0
            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;
            }
コード例 #3
0
            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;
            }
コード例 #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;
            }
コード例 #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;
            }
コード例 #6
0
 public Start(ISingleVariableFunction <int, double> function, int noResults, string distributionName)
 {
     Function         = function;
     NoResults        = noResults;
     DistributionName = distributionName;
 }