Sorry, back-arrow problem again:

#r "FSharp.PowerPack.dll"

open Microsoft.FSharp.Math

open System.Net

open System.IO

let mat = matrix[[0;0;0];

[1;0;0];

[2;0;0];

[3;0;0];

[4;0;0];

[5;0;0];

[6;0;0];

[7;0;0];

[8;0;0];

[9;0;0];

[10;1;4];

[11;1;4];

[12;1;4];

[13;1;5];

[14;1;5];

[15;1;5];

[16;2;6];

[17;2;6];

[18;2;6];

[19;2;7];

[20;2;7];

[21;2;7];

[22;3;8];

[23;3;8];

[24;3;8];

[25;3;9];

[26;3;9];

[27;3;9];]

let nrow = mat.NumRows

let Aprim = Matrix.create (nrow+1) (nrow+1) 0.

let newAval =

seq {for x in 2 .. (nrow+1) do

for y in 2 .. x do

if x = y then

yield

Aprim.[x,y] = 1 + 0.5*Aprim.[mat.[2,x-1]+1, mat.[3,x-1]+1]

else

yield

Aprim.[x,y] = 0.5*Aprim.[mat.[2,x-1], y] + 0.5*Aprim.[mat.[3,x-1]+1, y]}

By on 7/7/2010 1:14 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper