rand.hpp File Reference

#include <cstdlib>
#include "config.hpp"
#include "exception.hpp"
#include "factory.hpp"
#include "cmp.hpp"
#include "big_int.hpp"
#include "rational.hpp"
#include "vector.hpp"
#include "matrix.hpp"
#include "sparse_polynom.hpp"

Go to the source code of this file.

Namespaces

namespace  Arageli

Defines

#define ARAGELI_RAND_GENERAL   ( std::rand() )
#define ARAGELI_RAND_SHORT   ( (unsigned short)ARAGELI_RAND_GENERAL )
#define ARAGELI_RAND_INT   ( ((unsigned int)ARAGELI_RAND_SHORT << 16) | ((unsigned int)ARAGELI_RAND_SHORT) )
#define ARAGELI_RAND_LONG   ( (unsigned long)ARAGELI_RAND_INT )
#define ARAGELI_RAND_LONG_LONG   ( (((unsigned long long)ARAGELI_RAND_LONG) << 32) | ((unsigned long long)ARAGELI_RAND_LONG) )
#define ARAGELI_DEFINE_FUNCTION_T_RAND_T(type, rand_value)   inline type rand(type maxVal) { return 0==maxVal ? 0 : (((type)rand_value)%(maxVal+1)); }
#define ARAGELI_INCLUDE_CPP_WITH_EXPORT_TEMPLATE_rand

Functions

char Arageli::rand (char maxVal)
unsigned char Arageli::rand (unsigned char maxVal)
short Arageli::rand (short maxVal)
unsigned short Arageli::rand (unsigned short maxVal)
int Arageli::rand (int maxVal)
unsigned int Arageli::rand (unsigned int maxVal)
long Arageli::rand (long maxVal)
unsigned long Arageli::rand (unsigned long maxVal)
big_int Arageli::rand (big_int maxVal)
template<typename T>
rational< T > Arageli::rand (const rational< T > &maxVal)
template<typename F, typename I>
monom< F, I > Arageli::rand (const monom< F, I > &maxVal)
template<typename F, typename I, bool REFCNT>
sparse_polynom< F, I, REFCNT > Arageli::rand (const sparse_polynom< F, I, REFCNT > &maxVal)
template<typename T, bool REFCNT>
matrix< T, REFCNT > Arageli::rand (const matrix< T, REFCNT > &maxVal)


Detailed Description

Defines T rand(T maxVal) function for each type.

Definition in file rand.hpp.


Define Documentation

#define ARAGELI_DEFINE_FUNCTION_T_RAND_T ( type,
rand_value   )     inline type rand(type maxVal) { return 0==maxVal ? 0 : (((type)rand_value)%(maxVal+1)); }

Definition at line 45 of file rand.hpp.

#define ARAGELI_INCLUDE_CPP_WITH_EXPORT_TEMPLATE_rand

Definition at line 109 of file rand.hpp.

#define ARAGELI_RAND_GENERAL   ( std::rand() )

Definition at line 36 of file rand.hpp.

#define ARAGELI_RAND_INT   ( ((unsigned int)ARAGELI_RAND_SHORT << 16) | ((unsigned int)ARAGELI_RAND_SHORT) )

Definition at line 38 of file rand.hpp.

#define ARAGELI_RAND_LONG   ( (unsigned long)ARAGELI_RAND_INT )

Definition at line 39 of file rand.hpp.

#define ARAGELI_RAND_LONG_LONG   ( (((unsigned long long)ARAGELI_RAND_LONG) << 32) | ((unsigned long long)ARAGELI_RAND_LONG) )

Definition at line 40 of file rand.hpp.

#define ARAGELI_RAND_SHORT   ( (unsigned short)ARAGELI_RAND_GENERAL )

Definition at line 37 of file rand.hpp.


Generated on Thu Aug 31 17:38:18 2006 for Arageli by  doxygen 1.4.7