Subject: [xsl] 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) |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Using Struts ApplicationResou, Simpson, George | Thread | [xsl] Newbie XSL Evaluation, sicaudp |
[xsl] Using Struts ApplicationResou, Simpson, George | Date | Re: [xsl] Images relative path!, David Carlisle |
Month |