csound::Random Class Reference

#include <Random.hpp>

Inheritance diagram for csound::Random:

Inheritance graph
[legend]
Collaboration diagram for csound::Random:

Collaboration graph
[legend]

Detailed Description

A random value will be sampled from the specified distribution, translated and scaled as specified, and set in the specified row and column of the local coordinates. The resulting matrix will be used in place of the local coordinates when traversing the music graph. If eventCount is greater than zero, a new event will be created for each of eventCount samples, which will be transformed by the newly sampled local coordinates.

Public Member Functions

 Random ()
virtual ~Random ()
virtual double sample () const
virtual ublas::matrix< double > getLocalCoordinates () const
virtual void createDistribution (std::string distribution)
virtual void produceOrTransform (Score &score, size_t beginAt, size_t endAt, const ublas::matrix< double > &globalCoordinates)
virtual ublas::matrix< double > traverse (const ublas::matrix< double > &globalCoordinates, Score &score)
virtual ublas::matrix< double > createTransform ()
virtual void clear ()
virtual double & element (size_t row, size_t column)
virtual void setElement (size_t row, size_t column, double value)
virtual void addChild (Node *node)

Static Public Member Functions

static void seed (int s)

Data Fields

std::string distribution
int row
int column
int eventCount
bool incrementTime
double minimum
double maximum
double q
double a
double b
double c
double Lambda
double mean
double sigma
std::vector< Node * > children

Static Public Attributes

static boost::mt19937 mersenneTwister

Protected Attributes

void * generator_
boost::variate_generator
< boost::mt19937,
boost::uniform_smallint<> > * 
uniform_smallint_generator
boost::variate_generator
< boost::mt19937,
boost::uniform_int<> > * 
uniform_int_generator
boost::variate_generator
< boost::mt19937,
boost::uniform_real<> > * 
uniform_real_generator
boost::variate_generator
< boost::mt19937,
boost::bernoulli_distribution<> > * 
bernoulli_distribution_generator
boost::variate_generator
< boost::mt19937,
boost::geometric_distribution<> > * 
geometric_distribution_generator
boost::variate_generator
< boost::mt19937,
boost::triangle_distribution<> > * 
triangle_distribution_generator
boost::variate_generator
< boost::mt19937,
boost::exponential_distribution<> > * 
exponential_distribution_generator
boost::variate_generator
< boost::mt19937,
boost::normal_distribution<> > * 
normal_distribution_generator
boost::variate_generator
< boost::mt19937,
boost::lognormal_distribution<> > * 
lognormal_distribution_generator
ublas::matrix< double > localCoordinates

Constructor & Destructor Documentation

csound::Random::Random (  ) 

virtual csound::Random::~Random (  )  [virtual]


Member Function Documentation

virtual double csound::Random::sample (  )  const [virtual]

virtual ublas::matrix<double> csound::Random::getLocalCoordinates (  )  const [virtual]

Returns the local transformation of coordinate system.

Reimplemented from csound::Node.

virtual void csound::Random::createDistribution ( std::string  distribution  )  [virtual]

virtual void csound::Random::produceOrTransform ( Score score,
size_t  beginAt,
size_t  endAt,
const ublas::matrix< double > &  coordinates 
) [virtual]

The default implementation does nothing.

Reimplemented from csound::Node.

static void csound::Random::seed ( int  s  )  [static]

virtual ublas::matrix<double> csound::Node::traverse ( const ublas::matrix< double > &  globalCoordinates,
Score score 
) [virtual, inherited]

The default implementation postconcatenates its own local coordinate system with the global coordinates, then passes the score and the product of coordinate systems to each child, thus performing a depth-first traversal of the music graph.

Reimplemented in csound::Hocket, and csound::Sequence.

virtual ublas::matrix<double> csound::Node::createTransform (  )  [virtual, inherited]

virtual void csound::Node::clear (  )  [virtual, inherited]

Reimplemented in csound::Lindenmayer, and csound::MusicModel.

virtual double& csound::Node::element ( size_t  row,
size_t  column 
) [virtual, inherited]

virtual void csound::Node::setElement ( size_t  row,
size_t  column,
double  value 
) [virtual, inherited]

virtual void csound::Node::addChild ( Node node  )  [virtual, inherited]


Field Documentation

void* csound::Random::generator_ [protected]

boost::variate_generator<boost::mt19937, boost::uniform_smallint<> >* csound::Random::uniform_smallint_generator [protected]

boost::variate_generator<boost::mt19937, boost::uniform_int<> >* csound::Random::uniform_int_generator [protected]

boost::variate_generator<boost::mt19937, boost::uniform_real<> >* csound::Random::uniform_real_generator [protected]

boost::variate_generator<boost::mt19937, boost::bernoulli_distribution<> >* csound::Random::bernoulli_distribution_generator [protected]

boost::variate_generator<boost::mt19937, boost::geometric_distribution<> >* csound::Random::geometric_distribution_generator [protected]

boost::variate_generator<boost::mt19937, boost::triangle_distribution<> >* csound::Random::triangle_distribution_generator [protected]

boost::variate_generator<boost::mt19937, boost::exponential_distribution<> >* csound::Random::exponential_distribution_generator [protected]

boost::variate_generator<boost::mt19937, boost::normal_distribution<> >* csound::Random::normal_distribution_generator [protected]

boost::variate_generator<boost::mt19937, boost::lognormal_distribution<> >* csound::Random::lognormal_distribution_generator [protected]

boost::mt19937 csound::Random::mersenneTwister [static]

ublas::matrix<double> csound::Node::localCoordinates [protected, inherited]

std::vector<Node *> csound::Node::children [inherited]

Child Nodes, if any.


Generated on Sun Nov 9 00:24:59 2008 for Csound and CsoundAC by  doxygen 1.5.6