{"id":3044,"date":"2020-04-25T13:45:23","date_gmt":"2020-04-25T04:45:23","guid":{"rendered":"https:\/\/www.ktech.biz\/jp\/?p=3044"},"modified":"2020-07-30T17:11:34","modified_gmt":"2020-07-30T08:11:34","slug":"fs","status":"publish","type":"post","link":"https:\/\/www.ktech.biz\/jp\/manual-api\/fs\/","title":{"rendered":"XLPack API: F# \u4f7f\u7528\u4f8b"},"content":{"rendered":"<h3>F#\u304b\u3089XLPack\u3092\u547c\u3073\u51fa\u3059<\/h3>\n<p>F#\u304b\u3089XLPack\u3092\u547c\u3073\u51fa\u3059\u305f\u3081\u306b\u306fDLL\u3092\u76f4\u63a5\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059.<br \/>\nSDK\u306b\u306fDLL\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u30d7\u30ed\u30b0\u30e9\u30e0xlpack_fs.fs\u304c\u5165\u3063\u3066\u3044\u307e\u3059. \u3053\u308c\u3092\u4f7f\u3046\u3068, \u547c\u3073\u51fa\u3057\u30d7\u30ed\u30b0\u30e9\u30e0\u306f &#8220;open XLPack&#8221; \u3068\u5ba3\u8a00\u3059\u308b\u3060\u3051\u3067DLL\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u8a73\u7d30\u3092\u6c17\u306b\u305b\u305a\u7d44\u8fbc\u307f\u95a2\u6570\u306e\u3088\u3046\u306b\u7c21\u5358\u306bXLPack\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059.<br \/>\n\u4fc2\u6570\u884c\u5217a\u306f2\u6b21\u5143\u914d\u5217, \u53f3\u8fba\u884c\u5217b\u306f1\u6b21\u5143\u914d\u5217\u3092\u4f7f\u3044\u307e\u3059.<\/p>\n<h3>F#\u30d7\u30ed\u30b0\u30e9\u30e0\u4f8b<\/h3>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-fsharp\" data-lang=\"F#\"><code>open XLPack\n\nlet TestDgesv() =\n    let n = 3\n    let a = array2D [\n        [ 0.2; -0.32; -0.8 ];\n        [ -0.11; 0.81; -0.92 ];\n        [ -0.93; 0.37; -0.29 ] ]\n    let b = [| -0.3727; 0.4319; -1.4247 |]\n    let ipiv = Array.create n 0\n    let info = XLPack.Dgesv(n, a, ipiv, b)\n    printfn \"x = %A, info = %d\" b info\n\nTestDgesv()<\/code><\/pre>\n<\/div>\n<p>\u5b9f\u884c\u7d50\u679c<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-plane\"><code>x = [|0.86; 0.64; 0.51|], info = 0\n<\/code><\/pre>\n<\/div>\n<h3>F#\u30d7\u30ed\u30b0\u30e9\u30e0\u4f8b (\u4f8b\u984c(2))<\/h3>\n<p>\u4f8b\u984c(2)\u3067\u306ff(x)\u306e\u7a4d\u5206\u3092qk15\u3092\u4f7f\u3063\u3066\u6c42\u3081\u307e\u3059. qk15\u306ff(x)\u3092\u5b9a\u7fa9\u3059\u308b\u5916\u90e8\u95a2\u6570\u3092\u5fc5\u8981\u3068\u3057\u307e\u3059. \u5916\u90e8\u95a2\u6570\u306fF#\u3067\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d, qk15\u306f\u5fc5\u8981\u306a\u3068\u304d\u306b\u305d\u308c\u3092\u547c\u3073\u51fa\u3057\u307e\u3059.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-fsharp\" data-lang=\"F#\"><code>open XLPack\n\nlet TestQk15() =\n    let f(x: double) = 1.0\/(1.0 + x*x)\n    let a, b = (0.0, 4.0)\n    let result, abserr = XLPack.Qk15(f, a, b)\n    printfn \"result = %f, abserr = %g\" result abserr\n\nTestQk15()<\/code><\/pre>\n<\/div>\n<p>\u5b9f\u884c\u7d50\u679c<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-plain\"><code>result = 1.325818, abserr = 0.00148272<\/code><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>F#\u304b\u3089XLPack\u3092\u547c\u3073\u51fa\u3059 F#\u304b\u3089XLPack\u3092\u547c\u3073\u51fa\u3059\u305f\u3081\u306b\u306fDLL\u3092\u76f4\u63a5\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059. SDK\u306b\u306fDLL\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u30d7\u30ed\u30b0\u30e9\u30e0xlpack_fs.fs\u304c\u5165\u3063\u3066\u3044\u307e\u3059. \u3053\u308c\u3092\u4f7f\u3046\u3068, \u547c\u3073\u51fa\u3057\u30d7\u30ed\u30b0\u30e9 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[16],"tags":[],"class_list":["post-3044","post","type-post","status-publish","format-standard","hentry","category-manual-api"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/posts\/3044","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/comments?post=3044"}],"version-history":[{"count":1,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/posts\/3044\/revisions"}],"predecessor-version":[{"id":3045,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/posts\/3044\/revisions\/3045"}],"wp:attachment":[{"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/media?parent=3044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/categories?post=3044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/tags?post=3044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}