Changeset 3615 in Sophya for trunk/SophyaLib/BaseTools/randr48.h


Ignore:
Timestamp:
May 1, 2009, 1:34:31 PM (16 years ago)
Author:
cmv
Message:

Modifs relatives a l'introduction de RandomGeneratorInterface + delete de srandgen.c, cmv 01/05/2009

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/randr48.h

    r3612 r3615  
    1414#include "randinterf.h"
    1515
     16
     17/* ------- SPECIFIQUE Mac Darwin OSX  <= 10.2 (gcc < 3.x) -------- */
     18#if defined(Darwin) &&  defined(__GNUC__) && (__GNUC__ < 3)
     19#include "osx_values.h"
     20/* Declaration de drand48 et srand48 etc , mis ds SysSpec, Reza 11/02/2003 */
     21#ifdef __cplusplus
     22extern "C" {
     23#endif
     24unsigned short int * seed48(unsigned short int seed16v[3]);
     25void srand48(long seedval);
     26#ifdef __cplusplus
     27}
     28#endif
     29#define drand48() ((double)(random())/LONG_MAX)
     30#endif
     31/* ------- FIN SPECIFIQUE Mac OSX / Darwin V <= 10.2 --------- */
     32
     33
    1634namespace SOPHYA {
    1735
     
    2745  virtual void GetSeed(uint_2 seed[3]);
    2846  virtual void AutoInit(int lp=0);
     47  virtual void ShowRandom();
    2948
    3049  friend class ObjFileIO<DR48RandGen> ;
     
    5473  virtual void GetSeed(uint_2 seed[3]);
    5574  virtual void AutoInit(int lp=0);
     75  virtual void ShowRandom();
    5676
    5777  friend class ObjFileIO<ThSDR48RandGen> ;
Note: See TracChangeset for help on using the changeset viewer.