f#-powerpack

How to compare individual values in f# matrices?

丶灬走出姿态 提交于 2019-12-13 04:46:54
问题 I am trying to teach myself f#. For a program I am working on, I want to compare individual elements of 2 matrices, point wise. The matrices are both of size 1*N. The reason these are matrices is because they are the result of previous computations, performed using the standard F# PowerPack. I am happy to convert them to some other collection after these computations or use some other Matrix math library. What I need is a function that takes 2 matrices (which are essentially vectors) and

How to obtain F# powerpack for F# 3.0

自作多情 提交于 2019-12-06 02:06:29
问题 I'm using VS11 Beta on Win 8 Consumer Preview. After install VS11 Beta I have F# 3.0 SDK installed. But I'm not able to find a compatible FSharp.PowerPack.dll as CodePlex only provides PowerPack for F# 2.0. Any idea how to deal with this? 回答1: You can compile the PowerPack sources on your own (against F# 3.0), to make your own copy of the library. Alternatively, I think a binding redirect in your final foo.exe.config, along the lines of https://stackoverflow.com/a/9648673/19299 but

How to obtain F# powerpack for F# 3.0

青春壹個敷衍的年華 提交于 2019-12-04 05:56:14
I'm using VS11 Beta on Win 8 Consumer Preview. After install VS11 Beta I have F# 3.0 SDK installed. But I'm not able to find a compatible FSharp.PowerPack.dll as CodePlex only provides PowerPack for F# 2.0. Any idea how to deal with this? Brian You can compile the PowerPack sources on your own (against F# 3.0), to make your own copy of the library. Alternatively, I think a binding redirect in your final foo.exe.config, along the lines of https://stackoverflow.com/a/9648673/19299 but redirecting 2.0.0.0 (that PowerPack uses) to 4.3.0.0 (in VS11 SDK) will also work. In addition to what Brian

F# Func type inference difference between Seq and PSeq ToDictionary

只谈情不闲聊 提交于 2019-12-01 16:38:54
Given a trivial sequence of tuples, and a parallel one using F# PowerPack's PSeq: let a = Seq.singleton (1,"a") --> val a: seq<int * string> let b = a |> PSeq.map id --> val b: pseq<int * string> Now I'd like to create a .Net BCL dictionary from them: let bd = b.ToDictionary(fst, snd, HashIdentity.Structural) let ad = a.ToDictionary(fst, snd, HashIdentity.Structural) let ad2 = a.ToDictionary(fst, snd) let ad3 = a.ToDictionary((fun (x,y) -> x), (fun (x,y) -> y), HashIdentity.Structural) While let bd works, let ad does not compile as it fails to infer types and convert to BCL's Func correctly.

F# Func type inference difference between Seq and PSeq ToDictionary

心已入冬 提交于 2019-12-01 15:27:41
问题 Given a trivial sequence of tuples, and a parallel one using F# PowerPack's PSeq: let a = Seq.singleton (1,"a") --> val a: seq<int * string> let b = a |> PSeq.map id --> val b: pseq<int * string> Now I'd like to create a .Net BCL dictionary from them: let bd = b.ToDictionary(fst, snd, HashIdentity.Structural) let ad = a.ToDictionary(fst, snd, HashIdentity.Structural) let ad2 = a.ToDictionary(fst, snd) let ad3 = a.ToDictionary((fun (x,y) -> x), (fun (x,y) -> y), HashIdentity.Structural) While