[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Article: Casting the Dice with FXSL: Random Number Gen

Subject: Article: Casting the Dice with FXSL: Random Number Generation Functions in XSLT
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Tue, 23 Apr 2002 08:02:32 -0700 (PDT)
random dice gen
http://www.topxml.com/xsl/articles/dice/

Many thanks for the help, patience and understanding of Trace Wilson --
the administrator of TopXML.

Here's the table of contents, abstract, and conclusion from the
article:

Table of Contents 

Introduction

1. Generation of a single random number and a sequence of random
numbers. Scaling a sequence.

2. Generating a random sequence following a distribution. Subsequences.

3. Testing randomness with Monte Carlo integration

Conclusion

Resources


"This article is a follow-up from two recent publications [1], [2] on
functional programming in XSLT. Described is the Random module of the
XSLT functional programming library FXSL [3], which implements a linear
congruential method of generating a pseudo-random sequence of natural
numbers starting with a seed and then getting the next element of the
sequence, as described by Simon Thompson [4]. Such a sequence can then
be scaled to natural or real numbers in any given interval. Numbers can
be also generated, denoting a given event outcome with a specified
probability (distribution). Implemented is a simplified Monte Carlo
integration to test the "randomness" of the functions' results. The
code of the implementation demonstrates the use of such powerful,
functional programming design patterns as partial application and
creation of functions dynamically.

The source code for this article is part of the FXSL library version
0.3".


 
"Conclusion
This article proves once again that it is easy to implement even
difficult and scary algorithms using powerful functional programming
functions and design patterns. The FXSL functional programming library
for XSLT makes this possible. As a beneficial side effect, a new,
useful module -- Random.xsl --has been added to FXSL. It will serve the
needs of XSLT 1.0 and XSLT 2.0 users."

Cheers,
Dimitre Novatchev.


__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.