/*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * This file is distributed subject to a Software License Agreement found * in the file LICENSE that is included with this distribution. \*************************************************************************/ /* $Log: counter.c,v $ Revision 1.3 2002/08/14 16:18:54 soliday Added Open License Revision 1.2 1995/09/05 21:19:29 saunders First test release of the SDDS1.5 package. */ /* routine: advance_values() * purpose: sequence an array of values in a systematic way such that * a specified n-dimensional grid is covered. * * Michael Borland, 1988. */ #include "mdb.h" long advance_values(double *value, long *value_index, double *initial, double *step, long n_values, long *counter, long *max_count, long n_indices ) { long i, counter_changed; if ((counter_changed=advance_counter(counter, max_count, n_indices))<0) return(-1); for (i=0; i