{"id":1008,"date":"2021-09-13T04:55:48","date_gmt":"2021-09-12T19:55:48","guid":{"rendered":"https:\/\/machiaworx.net\/?p=1008"},"modified":"2021-09-13T04:56:12","modified_gmt":"2021-09-12T19:56:12","slug":"miniscript%e3%81%a72%e6%ac%a1%e5%85%83%e3%83%99%e3%82%af%e3%83%88%e3%83%ab%e3%81%ae%e3%82%af%e3%83%a9%e3%82%b9%e4%bd%9c%e6%88%90%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f%e3%80%82","status":"publish","type":"post","link":"https:\/\/machiaworx.net\/?p=1008","title":{"rendered":"Miniscript\u30672\u6b21\u5143\u30d9\u30af\u30c8\u30eb\u306e\u30af\u30e9\u30b9\u4f5c\u6210\u3057\u3066\u307f\u305f\u3002"},"content":{"rendered":"<p>\u672c\u5f53\u306f\u8907\u7d20\u6570\u5e73\u9762\u306e\u30af\u30e9\u30b9\u3092\u4f5c\u308a\u305f\u304b\u3063\u305f\u3051\u3069\u3001<br \/>\n\u6f14\u7b97\u5b50\u306e\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u306f\u7121\u7406\u306a\u306e\u3067\u30d9\u30fc\u30b9\u3068\u306a\u308b\u90e8\u5206\u304b\u30892\u6b21\u5143\u30d9\u30af\u30c8\u30eb\u306e\u51e6\u7406\u3060\u3051\u69cb\u7bc9\u3057\u305f\u611f\u3058\u3002<\/p>\n<p>\u7d50\u69cb\u9069\u5f53\u306b\u66f8\u304f\u306e\u3067\u3082\u4f7f\u3044\u52dd\u624b\u304c\u3044\u3044\u306e\u3067\u3001\u500b\u4eba\u7684\u306b\u306f\u3059\u3052\u3048\u5f79\u7acb\u3063\u3066\u308b\u3002<\/p>\n<p>\u81ea\u4f5c\u30b2\u30fc\u30e0\u958b\u767a\u3067\u3082Miniscript\u306e\u4f7f\u7528\u983b\u5ea6\u304c\u304b\u306a\u308a\u591a\u3044\u306e\u3067\u3059\u3088\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nComplex = {}\r\nComplex.x =0\r\nComplex.y =0\r\nComplex.init = function(a,b)\r\n\u00a0\u00a0\u00a0\u00a0if a isa number then\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.x =a\r\n\u00a0\u00a0\u00a0\u00a0end if\r\n\u00a0\u00a0\u00a0\u00a0if b isa number then\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.y = b\r\n\u00a0\u00a0\u00a0\u00a0end if\r\nend function\r\nComplex.plus = function(a,b)\r\n\u00a0\u00a0\u00a0\u00a0if a isa Complex then\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.x = a.x+ b.x\r\n\u00a0\u00a0\u00a0\u00a0end if\r\n\u00a0\u00a0\u00a0\u00a0if b isa Complex then\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.y = a.y+ b.y\r\n\u00a0\u00a0\u00a0\u00a0end if\r\nend function\r\nComplex.minus = function(a,b)\r\n\u00a0\u00a0\u00a0\u00a0if a isa Complex then\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.x = a.x- b.x\r\n\u00a0\u00a0\u00a0\u00a0end if\r\n\u00a0\u00a0\u00a0\u00a0if b isa Complex then\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.y = a.y- b.y\r\n\u00a0\u00a0\u00a0\u00a0end if\r\nend function\r\nComplex.inv = function()\r\n\u00a0\u00a0\u00a0\u00a0self.x =-self.x\r\n\u00a0\u00a0\u00a0\u00a0self.y =-self.y\r\nend function\r\nComplex.multi = function(num_x,a)\r\n\u00a0\u00a0\u00a0\u00a0if a isa Complex and num_x isa number then\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.x = num_x * a.x\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.y = num_y * a.y\r\n\u00a0\u00a0\u00a0\u00a0end if\r\nend function\r\nComplex.equal = function( a,b)\r\n\u00a0\u00a0\u00a0\u00a0if a isa Complex and b isa Complex then\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if a.x == b.x and a.y == b.y then\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return 1\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return 0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0end if\r\n\u00a0\u00a0\u00a0\u00a0end if\r\n\u00a0\u00a0\u00a0\u00a0return -1\r\nend function\r\n<\/pre>\n<h3>\u4f7f\u7528\u4f8b<\/h3>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n\r\n\/\/\u521d\u671f\u5b9a\u7fa9\r\ncp_a = new Complex\r\ncp_a.init(2,3)\r\ncp_b = new Complex\r\ncp_b.init(1,-1)\r\n\r\n\/\/\u8a08\u7b97\r\ncp_result= new Complex\r\ncp_result.plus(cp_a,cp_b)\r\n\r\n\/\/\u5185\u90e8\u30af\u30e9\u30b9\u69cb\u9020\u304c\u51fa\u529b\u3055\u308c\u308b\r\nprint cp_result\r\n\/\/\u30e1\u30f3\u30d0\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u5024\u3092\u78ba\u8a8d\r\nprint cp_result.x\r\nprint cp_result.y\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u5f53\u306f\u8907\u7d20\u6570\u5e73\u9762\u306e\u30af\u30e9\u30b9\u3092\u4f5c\u308a\u305f\u304b\u3063\u305f\u3051\u3069\u3001 \u6f14\u7b97\u5b50\u306e\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u306f\u7121\u7406\u306a\u306e\u3067\u30d9\u30fc\u30b9\u3068\u306a\u308b\u90e8\u5206\u304b\u30892\u6b21\u5143\u30d9\u30af\u30c8\u30eb\u306e\u51e6\u7406\u3060\u3051\u69cb\u7bc9\u3057\u305f\u611f\u3058\u3002 \u7d50\u69cb\u9069\u5f53\u306b\u66f8\u304f\u306e\u3067\u3082\u4f7f\u3044\u52dd\u624b\u304c\u3044\u3044\u306e\u3067\u3001\u500b\u4eba\u7684\u306b\u306f\u3059\u3052\u3048\u5f79\u7acb\u3063\u3066\u308b\u3002 \u81ea\u4f5c\u30b2\u30fc\u30e0&hellip; <span class=\"clear\"><\/span><a href=\"https:\/\/machiaworx.net\/?p=1008\" class=\"more-link read-more\" rel=\"bookmark\"><span class=\"screen-reader-text\">Miniscript\u30672\u6b21\u5143\u30d9\u30af\u30c8\u30eb\u306e\u30af\u30e9\u30b9\u4f5c\u6210\u3057\u3066\u307f\u305f\u3002<\/span><i class=\"fa fa-arrow-right\"><\/i> \u306e\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,4],"tags":[],"class_list":["post-1008","post","type-post","status-publish","format-standard","hentry","category-miniscript","category-pgm"],"_links":{"self":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts\/1008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1008"}],"version-history":[{"count":5,"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts\/1008\/revisions"}],"predecessor-version":[{"id":1013,"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts\/1008\/revisions\/1013"}],"wp:attachment":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}