rand_util.h File Reference

Wrappers around the available random number generators. More...

#include <oski/common.h>
#include <oski/mangle.h>

Go to the source code of this file.

Defines

#define INC_UTIL_RAND_UTIL_H
 util/rand_util.h included.
Name mangling.
#define rand_GenIndex   MANGLE_(rand_GenIndex)
#define rand_GenValue   MANGLE_(rand_GenValue)
#define rand_GenValueReal   MANGLE_(rand_GenValueReal)
#define rand_SortIndices   MANGLE_(rand_SortIndices)
#define rand_PermuteIndices   MANGLE_(rand_PermuteIndices)
#define rand_PermuteIndValPairs   MANGLE_(rand_PermuteIndValPairs)

Functions

oski_index_t rand_GenIndex (oski_index_t a, oski_index_t b)
 Returns a random integer index in the interval $[a, b]$.
oski_value_t rand_GenValue (double a, double b)
 Returns a random value in the interval $[a, b]$.
oski_value_t rand_GenValueReal (double a, double b)
 Returns a random pure real scalar in the interval $[a, b]$.
void rand_PermuteIndices (oski_index_t *ind, oski_index_t len)
 Randomly permute the elements of an array of indices.
void rand_PermuteIndValPairs (oski_index_t *ind, oski_value_t *val, oski_index_t len)
 Randomly permute corresponding (index, value) pairs of elements.


Detailed Description

Wrappers around the available random number generators.


Define Documentation

#define INC_UTIL_RAND_UTIL_H

util/rand_util.h included.


Function Documentation

oski_index_t rand_GenIndex ( oski_index_t  a,
oski_index_t  b 
)

Returns a random integer index in the interval $[a, b]$.

oski_value_t rand_GenValue ( double  a,
double  b 
)

Returns a random value in the interval $[a, b]$.

If oski_value_t is complex, then the real and imaginary parts each lie in the interval.

References _IM, and _RE.

oski_value_t rand_GenValueReal ( double  a,
double  b 
)

Returns a random pure real scalar in the interval $[a, b]$.

Thus, if oski_value_t is complex, then the imaginary part is set to 0.

References MAKE_VAL_COMPLEX.

void rand_PermuteIndices ( oski_index_t *  ind,
oski_index_t  len 
)

Randomly permute the elements of an array of indices.

void rand_PermuteIndValPairs ( oski_index_t *  ind,
oski_value_t *  val,
oski_index_t  len 
)

Randomly permute corresponding (index, value) pairs of elements.


Generated on Fri Apr 8 22:35:19 2011 for BeBOP Optimized Sparse Kernel Interface Library by  doxygen 1.5.9