This project has moved and is read-only. For the latest updates, please go here.

Random numbers?

Jun 14, 2010 at 6:31 PM

Hi, can anyone help with this? The following code produces ten zeros, what am I doing wrong? I was hoping for ten random numbers. Thanks, Steg

 

 

using System;
using MathNet.Numerics.Random;

namespace temp
{
    class Program
    {
        static void Main(string[] args)
        {

            MersenneTwister R = new MersenneTwister();
            for (int i = 0; i < 10; i++)
                Console.WriteLine(R.Next(1000).ToString());
            Console.ReadLine();
        }
    }
}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Jun 14, 2010 at 9:45 PM
Edited Jun 14, 2010 at 9:48 PM

Hi,

Thanks for spotting and reporting this. Your code is indeed correct, the bug was on our side and has just been fixed (commit b3ab6106).

Thanks, Chris

Jun 15, 2010 at 8:58 AM
cdrnet wrote:

Hi,

Thanks for spotting and reporting this. Your code is indeed correct, the bug was on our side and has just been fixed (commit b3ab6106).

Thanks, Chris

 Thanks Chris, how do I get a copy of the fixed version?

Steve

 

Jun 18, 2010 at 3:25 PM

Hi Steve,

Automatic builds are currently disabled; can you build it directly from the sources for the time being?

Thanks,
Chris

Jun 21, 2010 at 9:41 AM

Hi Chris, I could try this but don’t really know where to start, there seems like a lot of files/directories, which do I need? Is there a single download that can be unzipped and then built?

BW, Steve.

Jun 30, 2010 at 9:50 PM
Hi Steve, On http://github.com/mathnet/mathnet-numerics there is a button "download" source. You can download our source tree there and then open the src/MathNet.Numerics.sln solution. Just building form within VS2010 should work fine at that point. Does this help? J
Jul 1, 2010 at 8:15 AM
jvangael wrote:
Hi Steve, On http://github.com/mathnet/mathnet-numerics there is a button "download" source. You can download our source tree there and then open the src/MathNet.Numerics.sln solution. Just building form within VS2010 should work fine at that point. Does this help? J

 Thanks J, I tried the link you indicated but got "403 forbidden". Then I found the whole directory structure and files can be downloaded in one hit at http://mathnetnumerics.codeplex.com/SourceControl/list/changesets but unfortunately I have VS2008!

Jul 1, 2010 at 10:06 PM
Ok that's unfortunate. One idea would be to use Visual Studio 2010 Express; otherwise we'll have to wait for getting our buildserver up and running again. Let me know if I can send you a custom build via email (send private message with email via codeplex) Cheers, Jurgen