[Home] [By Thread] [By Date] [Recent Entries]

Subject: Fibonacci & XSL
From: "Kasper Nielsen" <news@xxxxxx>
Date: Tue, 17 Dec 2002 12:19:04 +0100
This is actually more a question of dynamic programming in XSL.
If you can't remember the function it is:

F0 = 0
F1 = 1
f(n)=f(n-1)+f(n-2) for n>=2

is it possible to make a template that calculates this in linear time (I
know it can be done in O(lg n) but linear is enogh) in xsl?
The straightforward recursive method for calculating f(n) is clearly
exponential in n.

If it is possible I would prefer an example using memoization because I need
it to a similar problem I have.

regards
  Kasper


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


Current Thread
  • Fibonacci & XSL
    • Kasper Nielsen - Tue, 17 Dec 2002 06:13:52 -0500 (EST) <=
      • Eric van der Vlist - Tue, 17 Dec 2002 06:42:14 -0500 (EST)
      • bryan - Tue, 17 Dec 2002 07:46:04 -0500 (EST)
      • Michael Kay - Tue, 17 Dec 2002 08:50:40 -0500 (EST)
        • bryan - Tue, 17 Dec 2002 08:57:30 -0500 (EST)
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member