|
| 1 | +/* |
| 2 | + * Copyright 1990-2008, Mark Little, University of Newcastle upon Tyne |
| 3 | + * and others contributors as indicated |
| 4 | + * by the @authors tag. All rights reserved. |
| 5 | + * See the copyright.txt in the distribution for a |
| 6 | + * full listing of individual contributors. |
| 7 | + * This copyrighted material is made available to anyone wishing to use, |
| 8 | + * modify, copy, or redistribute it subject to the terms and conditions |
| 9 | + * of the GNU Lesser General Public License, v. 2.1. |
| 10 | + * This program is distributed in the hope that it will be useful, but WITHOUT A |
| 11 | + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 12 | + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. |
| 13 | + * You should have received a copy of the GNU Lesser General Public License, |
| 14 | + * v.2.1 along with this distribution; if not, write to the Free Software |
| 15 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
| 16 | + * MA 02110-1301, USA. |
| 17 | + * |
| 18 | + * (C) 1990-2008, |
| 19 | + */ |
| 20 | + |
| 21 | +package org.javasim.examples.stats; |
| 22 | + |
| 23 | +import org.javasim.streams.NormalStream; |
| 24 | +import org.javasim.stats.Quantile; |
| 25 | + |
| 26 | +public class Stats |
| 27 | +{ |
| 28 | + public static void main (String[] args) throws Exception |
| 29 | + { |
| 30 | + NormalStream str = new NormalStream(100.0, 2.0); |
| 31 | + Quantile hist = new Quantile(); |
| 32 | + |
| 33 | + for (int i = 0; i < 20; i++) |
| 34 | + { |
| 35 | + hist.setValue(str.getNumber()); |
| 36 | + } |
| 37 | + |
| 38 | + System.out.println("NormalStream error: "+str.error()); |
| 39 | + |
| 40 | + hist.print(); |
| 41 | + } |
| 42 | +} |
0 commit comments