NAME
Math::StochasticProcess::RandomVariable - Part of the Math::StochasticProcess::Tuple model
VERSION
Version 0.04
SYNOPSIS
See Math::StochasticProcess::Event::Tuple. The RandomVariable
class represents a numerical random variable. The Tuple class represents a set of named random variables, and also controls how random variables change.
FUNCTIONS
new
A standard constructor. The possible arguments are as follows:
- value
-
This should be set to the initial value.
- validate_cb
-
This optional coderef is run against any change of value and must always return 1.
- internal
-
Internal random variables are ignored once an Event is resolved. Probably internal random variables need not be numerical.
checkValue
This function checks that the value of the RandomVariable
satisfies its internal constraint.
value
This returns the current.
signature
The signature gives an approximate value to the variable for the purposes of event merging. The more lumpy the variable then the bigger the approximation. If the variable has undefined lumpiness, then the signature is just the same as the value.
merge
This is a utility function for Math::StochasticProcess::Event::Tuple::merge. We choose this interface to allow for the possibility that derived classes might want to regard "similar" values as essentially identical. In such a case the probabilities would be required to set the new value to a weighted average.
copy
This is a utility function for Math::StochasticProcess::Event::Tuple::copy
. It is effectively a constructor of the RandomVariable
. It returns a copy of the RandomVariable
with a change specified by the $change
parameter. This might be a new value or callback which is applied to the old value to get the new value.
isInternal
Internal variables only figure in the calculation so long as the Event is unresolved.
AUTHOR
Nicholas Bamber, <theabbot at silasthemonk.org.uk>
BUGS
Please report any bugs or feature requests to bug-math-pea-randomvariable at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Math-StochasticProcess. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Math::StochasticProcess
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Math-StochasticProcess
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2008 Nicholas Bamber, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.