// ===================================================================
// $Id: detrndba.h,v 1.1 2003/11/04 15:31:57 havran Exp $
//
// detrndba.h:
//    A set of function to generate random number given a seed and
//    dimension for multidimensional setting. Thus deterministic
//    random generator.
//
// Class: CMultDimRNDGen
//
// Licence and usage conditions in November 2003:
// This file can be used and modified only with written permission of
// Vlastimil Havran, Pohodli 27, 57001 Litomysl, the Czech Republic.
// This library is granted to be used by Polina Kondratieva within
// her MPI HIWI job working on BRDFLIB library. The usage condition
// may change in the next version of the library. At the moment,
// the library development is supported by Max-Planck-Institut for
// Informatik, Stuhlsatzenhausweg 85, 66123 Saarbruecken Germany
// See WWW: http://www.mpi-sb.mpg.de
// REPLACEMENT_STRING
//
// Initial coding by Vlastimil Havran, October 2003.
//
// Given for the use to BRDFLIB project for the Polina Kondratieva's
// HIWI JOB assignment in November 2003.

#ifndef __DETRNDBA_H__
#define __DETRNDBA_H__

#include "configh.h"

__BEGIN_BRDFLIB_HEADER

// The abstract class for multi-dimensional random generator.
class CMultDimRNDGen
{
public:
  // Constructor
  CMultDimRNDGen() { }

  // Sets the new seed for the next call of Rand(int dimension)
  virtual void SetSeed(unsigned long newSeed) = 0;

  // Generate a random number given the dimension in range [0;1f).
  // The seed is given by the generator from the previous call. So after
  // running this call the seed is updated. Some generators can ignore the
  // dimension completely.
  virtual double Rand01d(int dimension) = 0;
  
  // Returns the maximum dimension that can be used for this generator
  virtual int MaxDimension() const = 0;
};

__END_BRDFLIB_HEADER

#endif // __DETRNDBA_H__

