#ifndef __X10_UTIL_RANDOM_H
#define __X10_UTIL_RANDOM_H

#include <x10rt.h>


#define X10_LANG_OBJECT_H_NODEPS
#include <x10/lang/Object.h>
#undef X10_LANG_OBJECT_H_NODEPS
#define X10_LANG_INT_H_NODEPS
#include <x10/lang/Int.h>
#undef X10_LANG_INT_H_NODEPS
namespace x10 { namespace util { 
class Timer;
} } 
namespace x10 { namespace lang { 
class Long;
} } 
namespace x10 { namespace compiler { 
class NonEscaping;
} } 
namespace x10 { namespace lang { 
class Int;
} } 
namespace x10 { namespace array { 
template<class TPMGL(T)> class Array;
} } 
namespace x10 { namespace lang { 
class Byte;
} } 
namespace x10 { namespace lang { 
class Boolean;
} } 
namespace x10 { namespace lang { 
class Float;
} } 
namespace x10 { namespace lang { 
class Double;
} } 
namespace x10 { namespace util { 

class Random : public x10::lang::Object   {
    public:
    RTT_H_DECLS_CLASS
    
    void _constructor();
    
    static x10aux::ref<x10::util::Random> _make();
    
    void _constructor(x10_long seed);
    
    static x10aux::ref<x10::util::Random> _make(x10_long seed);
    
    virtual void setSeed(x10_long seed);
    virtual x10_int nextInt();
    virtual x10_int nextInt(x10_int maxPlus1);
    virtual void nextBytes(x10aux::ref<x10::array::Array<x10_byte> > buf);
    virtual x10_long nextLong();
    virtual x10_long nextLong(x10_long maxPlus1);
    virtual x10_boolean nextBoolean();
    virtual x10_float nextFloat();
    virtual x10_double nextDouble();
    static x10_int FMGL(N);
    
    static x10_int FMGL(N__get)();
    static x10_int FMGL(M);
    
    static x10_int FMGL(M__get)();
    x10_int FMGL(index);
    
    x10aux::ref<x10::array::Array<x10_int> > FMGL(MT);
    
    virtual void init(x10_long seed);
    virtual x10_int random();
    static void twist(x10aux::ref<x10::array::Array<x10_int> > MT);
    virtual x10aux::ref<x10::util::Random> x10__util__Random____x10__util__Random__this(
      );
    void __fieldInitializers49805();
    
    // Serialization
    public: static const x10aux::serialization_id_t _serialization_id;
    
    public: virtual x10aux::serialization_id_t _get_serialization_id() {
         return _serialization_id;
    }
    
    public: virtual void _serialize_body(x10aux::serialization_buffer& buf);
    
    public: static x10aux::ref<x10::lang::Reference> _deserializer(x10aux::deserialization_buffer& buf);
    
    public: void _deserialize_body(x10aux::deserialization_buffer& buf);
    
};

} } 
#endif // X10_UTIL_RANDOM_H

namespace x10 { namespace util { 
class Random;
} } 

#ifndef X10_UTIL_RANDOM_H_NODEPS
#define X10_UTIL_RANDOM_H_NODEPS
#ifndef X10_UTIL_RANDOM_H_GENERICS
#define X10_UTIL_RANDOM_H_GENERICS
inline x10_int x10::util::Random::FMGL(N__get)() {
    return x10::util::Random::FMGL(N);
}

inline x10_int x10::util::Random::FMGL(M__get)() {
    return x10::util::Random::FMGL(M);
}

#endif // X10_UTIL_RANDOM_H_GENERICS
#endif // __X10_UTIL_RANDOM_H_NODEPS
