/*ident "@(#)C++env:lib/task/task/sim.c 1.1" */ /************************************************************************** Copyright (c) 1984 AT&T All Rights Reserved THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T The copyright notice above does not evidence any actual or intended publication of such source code. *****************************************************************************/ #include #include histogram::histogram(int nb, int ll, int rr) { register int i; if (rr<=ll || nb<1) object::task_error(E_HISTO, (object*)0); if (nb%2) nb++; while ((rr-ll)%nb) rr++; binsize = (rr-ll)/nb; h = new int[nb]; while (h == 0) object::task_error(E_STORE, (object*)0); for (i=0; i= 0) h[i--] = 0; binsize += binsize; } while (r<=a) { r += r - l; for (i=0, j=0; i