random.h

00001 /*                                              -*- mode:C++; fill-column:100 -*-
00002   random.h - Low-level declarations for the PRNG in the SFB
00003   Copyright (C) 2009 The Regents of the University of New Mexico.  All rights reserved.
00004 
00005   This library is free software; you can redistribute it and/or
00006   modify it under the terms of the GNU Lesser General Public
00007   License as published by the Free Software Foundation; either
00008   version 2.1 of the License, or (at your option) any later version.
00009 
00010   This library is distributed in the hope that it will be useful,
00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013   Lesser General Public License for more details.
00014 
00015   You should have received a copy of the GNU General Public License
00016   along with this library; if not, write to the Free Software
00017   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
00018   USA
00019 
00020   $Id$
00021 */
00022 /*
00023  * Based on code that is:
00024  *
00025  * Copyright (c) 1983 Regents of the University of California.
00026  * All rights reserved.
00027  *
00028  * Redistribution and use in source and binary forms are permitted
00029  * provided that the above copyright notice and this paragraph are
00030  * duplicated in all such forms and that any documentation,
00031  * advertising materials, and other materials related to such
00032  * distribution and use acknowledge that the software was developed
00033  * by the University of California, Berkeley.  The name of the
00034  * University may not be used to endorse or promote products derived
00035  * from this software without specific prior written permission.
00036  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
00037  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
00038  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00039  */
00040 
00041 #ifndef RANDOM_H
00042 #define RANDOM_H
00043 
00044 #ifdef __cplusplus
00045 extern "C" {
00046 #endif
00047 
00048 extern long int randomImpl ();
00049 extern void srandomImpl (unsigned int x);
00050 
00051 extern void * initstateImpl (unsigned int seed, void * arg_state, unsigned long n);
00052 extern void * setstateImpl (void * arg_state);
00053 
00054 /* (See SFBRandom.h for the 'Arduino age API') */
00055 
00056 #ifdef __cplusplus
00057 }
00058 #endif
00059 
00060 
00061 #endif /* RANDOM_H */
00062 

Generated on Fri Apr 22 06:54:11 2011 for SFB by doxygen 1.5.9