Package java.util

Examples of java.util.Random.nextGaussian()


{
  public static void main(String[] argv)
  {
    Random r = new Random();
    IHistogram1D h1 = new Histogram1D("AIDA 1D Histogram",40,-3,3);
    for (int i=0; i<10000; i++) h1.fill(r.nextGaussian());
   
    IHistogram2D h2 = new Histogram2D("AIDA 2D Histogram",40,-3,3,40,-3,3);
    for (int i=0; i<10000; i++) h2.fill(r.nextGaussian(),r.nextGaussian());
   
    // Write the results as a PlotML files!
View Full Code Here


    Random r = new Random();
    IHistogram1D h1 = new Histogram1D("AIDA 1D Histogram",40,-3,3);
    for (int i=0; i<10000; i++) h1.fill(r.nextGaussian());
   
    IHistogram2D h2 = new Histogram2D("AIDA 2D Histogram",40,-3,3,40,-3,3);
    for (int i=0; i<10000; i++) h2.fill(r.nextGaussian(),r.nextGaussian());
   
    // Write the results as a PlotML files!
    writeAsXML(h1,"aida1.xml");
    writeAsXML(h2,"aida2.xml");
   
View Full Code Here

    Random r = new Random();
    IHistogram1D h1 = new Histogram1D("AIDA 1D Histogram",40,-3,3);
    for (int i=0; i<10000; i++) h1.fill(r.nextGaussian());
   
    IHistogram2D h2 = new Histogram2D("AIDA 2D Histogram",40,-3,3,40,-3,3);
    for (int i=0; i<10000; i++) h2.fill(r.nextGaussian(),r.nextGaussian());
   
    // Write the results as a PlotML files!
    writeAsXML(h1,"aida1.xml");
    writeAsXML(h2,"aida2.xml");
   
View Full Code Here

  {
    double[] bounds = { -30,0,30, 1000 };
    Random r = new Random();
    IHistogram1D h1 = new Histogram1D("AIDA 1D Histogram",new VariableAxis(bounds));
    //IHistogram1D h1 = new Histogram1D("AIDA 1D Histogram",2,-3,3);
    for (int i=0; i<10000; i++) h1.fill(r.nextGaussian());
   
    IHistogram2D h2 = new Histogram2D("AIDA 2D Histogram",new VariableAxis(bounds),new VariableAxis(bounds));
    //IHistogram2D h2 = new Histogram2D("AIDA 2D Histogram",2,-3,3, 2,-3,3);
    for (int i=0; i<10000; i++) h2.fill(r.nextGaussian(),r.nextGaussian());
   
View Full Code Here

    //IHistogram1D h1 = new Histogram1D("AIDA 1D Histogram",2,-3,3);
    for (int i=0; i<10000; i++) h1.fill(r.nextGaussian());
   
    IHistogram2D h2 = new Histogram2D("AIDA 2D Histogram",new VariableAxis(bounds),new VariableAxis(bounds));
    //IHistogram2D h2 = new Histogram2D("AIDA 2D Histogram",2,-3,3, 2,-3,3);
    for (int i=0; i<10000; i++) h2.fill(r.nextGaussian(),r.nextGaussian());
   
    //IHistogram3D h3 = new Histogram3D("AIDA 3D Histogram",new VariableAxis(bounds),new VariableAxis(bounds),new VariableAxis(bounds));
    IHistogram3D h3 = new Histogram3D("AIDA 3D Histogram",10, -2, +2,    5, -2, +2,    3, -2, +2);
    for (int i=0; i<10000; i++) h3.fill(r.nextGaussian(),r.nextGaussian(),r.nextGaussian());
   
View Full Code Here

    //IHistogram1D h1 = new Histogram1D("AIDA 1D Histogram",2,-3,3);
    for (int i=0; i<10000; i++) h1.fill(r.nextGaussian());
   
    IHistogram2D h2 = new Histogram2D("AIDA 2D Histogram",new VariableAxis(bounds),new VariableAxis(bounds));
    //IHistogram2D h2 = new Histogram2D("AIDA 2D Histogram",2,-3,3, 2,-3,3);
    for (int i=0; i<10000; i++) h2.fill(r.nextGaussian(),r.nextGaussian());
   
    //IHistogram3D h3 = new Histogram3D("AIDA 3D Histogram",new VariableAxis(bounds),new VariableAxis(bounds),new VariableAxis(bounds));
    IHistogram3D h3 = new Histogram3D("AIDA 3D Histogram",10, -2, +2,    5, -2, +2,    3, -2, +2);
    for (int i=0; i<10000; i++) h3.fill(r.nextGaussian(),r.nextGaussian(),r.nextGaussian());
   
View Full Code Here

    //IHistogram2D h2 = new Histogram2D("AIDA 2D Histogram",2,-3,3, 2,-3,3);
    for (int i=0; i<10000; i++) h2.fill(r.nextGaussian(),r.nextGaussian());
   
    //IHistogram3D h3 = new Histogram3D("AIDA 3D Histogram",new VariableAxis(bounds),new VariableAxis(bounds),new VariableAxis(bounds));
    IHistogram3D h3 = new Histogram3D("AIDA 3D Histogram",10, -2, +2,    5, -2, +2,    3, -2, +2);
    for (int i=0; i<10000; i++) h3.fill(r.nextGaussian(),r.nextGaussian(),r.nextGaussian());
   
    // Write the results as a PlotML files!
    writeAsXML(h1,"aida1.xml");
    writeAsXML(h2,"aida2.xml");
    writeAsXML(h3,"aida2.xml");
View Full Code Here

    //IHistogram2D h2 = new Histogram2D("AIDA 2D Histogram",2,-3,3, 2,-3,3);
    for (int i=0; i<10000; i++) h2.fill(r.nextGaussian(),r.nextGaussian());
   
    //IHistogram3D h3 = new Histogram3D("AIDA 3D Histogram",new VariableAxis(bounds),new VariableAxis(bounds),new VariableAxis(bounds));
    IHistogram3D h3 = new Histogram3D("AIDA 3D Histogram",10, -2, +2,    5, -2, +2,    3, -2, +2);
    for (int i=0; i<10000; i++) h3.fill(r.nextGaussian(),r.nextGaussian(),r.nextGaussian());
   
    // Write the results as a PlotML files!
    writeAsXML(h1,"aida1.xml");
    writeAsXML(h2,"aida2.xml");
    writeAsXML(h3,"aida2.xml");
View Full Code Here

    //IHistogram2D h2 = new Histogram2D("AIDA 2D Histogram",2,-3,3, 2,-3,3);
    for (int i=0; i<10000; i++) h2.fill(r.nextGaussian(),r.nextGaussian());
   
    //IHistogram3D h3 = new Histogram3D("AIDA 3D Histogram",new VariableAxis(bounds),new VariableAxis(bounds),new VariableAxis(bounds));
    IHistogram3D h3 = new Histogram3D("AIDA 3D Histogram",10, -2, +2,    5, -2, +2,    3, -2, +2);
    for (int i=0; i<10000; i++) h3.fill(r.nextGaussian(),r.nextGaussian(),r.nextGaussian());
   
    // Write the results as a PlotML files!
    writeAsXML(h1,"aida1.xml");
    writeAsXML(h2,"aida2.xml");
    writeAsXML(h3,"aida2.xml");
View Full Code Here

            private double right;
            private Random rand = new Random();
           
            @Override
            public void actuate(AbstractEnvironment2D<AbstractAgent2D<?>> env, AbstractAgent2D<?> agent) {
                this.left += rand.nextGaussian() / 10;
                this.right += rand.nextGaussian() / 10;
               
                this.left *= 0.998;
                this.right *= 0.998;
               
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.