Esempio n. 1
0
        public override void Load(BinaryReader r, uint id)
        {
            base.Load(r, id);

            Min = r.ReadInt32();
            Max = r.ReadInt32();
            StandardDeviation = r.ReadDouble();
            Mean = r.ReadDouble();
            _maxToGenerateForProbability = r.ReadDouble();
            _rGen = BinarySerializable.GetObject <UniformRandomGenerator>(r);

            int length = r.ReadInt32();

            for (int i = 0; i < length; i++)
            {
                int    key   = r.ReadInt32();
                double value = r.ReadDouble();
                probabilities.Add(key, value);
            }
        }
Esempio n. 2
0
 public NormalRandomGenerator(int min, int max, UniformRandomGenerator rand)
     : base("NormalRandomGenerator")
 {
     _rGen = rand;
     Load(min, max);
 }
Esempio n. 3
0
 public NormalRandomGenerator(int min, int max)
     : base("NormalRandomGenerator")
 {
     _rGen = new UniformRandomGenerator();
     Load(min, max);
 }