{"id":373148,"date":"2024-05-21T05:29:21","date_gmt":"2024-05-21T05:29:21","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=373148"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=373148","title":{"rendered":"<span>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438?<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0427\u0430\u0441\u0442\u043e\u0442\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u2014 \u0432\u043e\u043b\u0448\u0435\u0431\u043d\u043e\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0432 \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u044b \u0438 \u0444\u0430\u0437\u044b \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434. \u041e\u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432, \u043a\u0430\u0437\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u044b\u043c\u0438 \u043f\u0440\u0438 \u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0432 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u2014 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/909\/131\/1b8\/9091311b846a0498ed56b8c3dd34459d.png\" alt=\"\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u043e\u043b\u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (\u0432\u044b\u0448\u0435) \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0435\u043a\u0442\u0440\u0430 (\u043d\u0438\u0436\u0435) \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 &quot;Girl in Blue&quot;\" title=\"\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u043e\u043b\u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (\u0432\u044b\u0448\u0435) \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0435\u043a\u0442\u0440\u0430 (\u043d\u0438\u0436\u0435) \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 &quot;Girl in Blue&quot;\" width=\"1456\" height=\"907\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/909\/131\/1b8\/9091311b846a0498ed56b8c3dd34459d.png\"\/><\/p>\n<div><figcaption>\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u043e\u043b\u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (\u0432\u044b\u0448\u0435) \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0435\u043a\u0442\u0440\u0430 (\u043d\u0438\u0436\u0435) \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 &#171;Girl in Blue&#187;<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u043e \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e? \u0414\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435 (DFT) \u0438\u043c\u0435\u0435\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0441\u0444\u0435\u0440\u0430\u0445 \u0441\u0432\u044f\u0437\u0438 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432, \u043d\u043e \u043d\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043b\u0438 \u043e\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0435, \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438? \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u043e\u043b\u043d\u044b. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 \u043e\u043d\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442, \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435 \u0440\u0430\u0437\u043b\u0430\u0433\u0430\u0435\u0442 \u0438\u0445 \u043d\u0430 <a href=\"https:\/\/lcamtuf.substack.com\/p\/square-waves-or-non-elephant-biology\">\u0440\u044f\u0434 \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u0445 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u043a \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0445\u0435\u043c \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435?<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0447\u0443 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u043e\u043b\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0424\u0443\u0440\u044c\u0435, \u0441\u043d\u044f\u0432 \u0435\u0433\u043e \u0441 \u043f\u043e\u0441\u0442\u0430\u043c\u0435\u043d\u0442\u0430. \u041d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e, \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u043b\u043d\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0432\u0441\u0435\u043c\u0435\u0441\u0442\u043d\u044b\u043c\u0438 \u0432 \u043f\u0440\u0438\u0440\u043e\u0434\u0435 \u0438 \u0441\u043b\u0443\u0436\u0430\u0442 \u043c\u043e\u0449\u043d\u044b\u043c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u0434\u0430\u0447. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 \u0441 \u0445\u043e\u0440\u043e\u0448\u0438\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0447\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c. \u041a \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0442\u0443, \u0433\u0434\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u043e\u043b\u043d\u044b, \u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043b\u0438\u0448\u044c \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435.<\/p>\n<h2>\u0414\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 (DCT)<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u043c\u0441\u044f \u043a \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u2014 \u044d\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0424\u0443\u0440\u044c\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430. \u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0444\u043e\u0440\u043c\u0443\u043b\u0443 DCT-II:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"F_k = \\sum^{\\substack{ N - 1  }}_{\\substack{ n = 0  }} s_n \\cdot cos(\\pi k \\frac{n+\\frac12 }{N} ) \" alt=\"F_k = \\sum^{\\substack{ N - 1  }}_{\\substack{ n = 0  }} s_n \\cdot cos(\\pi k \\frac{n+\\frac12 }{N} ) \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8ac\/ece\/b5c\/8aceceb5cb1b39fffaf0826c47088bce.svg\" width=\"241\" height=\"60\"\/><\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u043c \u0432\u0437\u044f\u0442\u0438\u0438 \u0440\u044f\u0434\u0430 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u0443\u0434\u0438\u043e\u0441\u0435\u043c\u043f\u043b\u043e\u0432 sn), \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438 \u0438\u0445 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u044b \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u0435 (<img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"F_k\" alt=\"F_k\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c74\/e19\/e49\/c74e19e4905704ff6863775a2e0ba02b.svg\" width=\"22\" height=\"20\"\/>).<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"cos()\" alt=\"cos()\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ce8\/352\/5ac\/ce83525acf13218b14c1fbcc9f4bb830.svg\" width=\"42\" height=\"22\"\/>, \u0441\u043e\u0437\u0434\u0430\u044e\u0449\u0443\u044e \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0443 \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0433\u043e \u0431\u0438\u043d\u0430 DCT. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u0438\u0441\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u0432\u043b\u0435\u0447\u044c\u0441\u044f \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u044b \u0438 \u043f\u0435\u0440\u0435\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"F_k = \\sum \\limits_{n=0}^{N-1} s_n \\cdot B(k,n) \" alt=\"F_k = \\sum \\limits_{n=0}^{N-1} s_n \\cdot B(k,n) \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/337\/857\/8d7\/3378578d79b933ddbc283e6319623c53.svg\" width=\"175\" height=\"60\"\/><\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0435 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e, <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"B(k,n) \" alt=\"B(k,n) \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dd7\/e91\/ea0\/dd7e91ea05f3b010fc305ca4a65bb403.svg\" width=\"61\" height=\"22\"\/> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0435\u043a\u0438\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442, \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0439 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"k\" alt=\"k\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/962\/ee1\/4be\/962ee14be0b25e56bc5ef1a05e83cb26.svg\" width=\"10\" height=\"17\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8d6\/4d2\/147\/8d64d214743be1c14e0a80be8089f6a7.svg\" width=\"12\" height=\"12\"\/>. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"B(k,n) \" alt=\"B(k,n) \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/731\/fbb\/76f\/731fbb76f4b06aa9fac577c160d0c9f3.svg\" width=\"61\" height=\"22\"\/> \u043a\u0430\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u2014 \u0438\u043b\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435 \u2014 \u0434\u043b\u044f N \u0440\u0430\u0432\u043d\u043e\u0433\u043e 16:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b6e\/295\/7ea\/b6e2957eafc681e215141613360671ae.png\" alt=\"\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f DCT-II \u0434\u043b\u044f N=16\" title=\"\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f DCT-II \u0434\u043b\u044f N=16\" width=\"1456\" height=\"1455\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b6e\/295\/7ea\/b6e2957eafc681e215141613360671ae.png\"\/><\/p>\n<div><figcaption>\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f DCT-II \u0434\u043b\u044f N=16<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 (<img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"k=0\" alt=\"k=0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/73a\/dd9\/230\/73add92300719297ebd3dee11ec9cb48.svg\" width=\"46\" height=\"17\"\/>) \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0439 (DC) \u2014 \u044d\u0442\u043e \u043a\u043e\u0441\u0438\u043d\u0443\u0441 \u0441 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0440\u0430\u0432\u0435\u043d +1.00. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u0441\u0438\u043d\u0443\u0441, \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043e\u0442 +1.00 \u0434\u043e -1.00; \u0434\u0430\u043b\u0435\u0435 \u0438\u0434\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u0430 \u043f\u0440\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"k=2\" alt=\"k=2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/056\/88f\/eab\/05688feabe2c7044e4bd963eb6eb4720.svg\" width=\"46\" height=\"17\"\/>, \u0437\u0430\u0442\u0435\u043c \u0446\u0438\u043a\u043b \u0438 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u043f\u0440\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"k=3\" alt=\"k=3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/545\/698\/e6b\/545698e6bd6a09cf306763269de27afa.svg\" width=\"46\" height=\"17\"\/> \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<h2>\u0412\u0441\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0445 \u0432\u043e\u043b\u043d<\/h2>\n<p>\u041a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0438\u0441\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u043d\u0430 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c \u0438\u0445 \u043d\u0430 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u043e\u043b\u043d\u044b? \u0417\u0430\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u043f\u0435\u0440\u0435\u0434, \u043e\u0442\u0432\u0435\u0442 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4b8\/919\/a11\/4b8919a110aa4c662017520ae2d34689.png\" alt=\"\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0423\u043e\u043b\u0448\u0430 \u0434\u043b\u044f N=16\" title=\"\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0423\u043e\u043b\u0448\u0430 \u0434\u043b\u044f N=16\" width=\"1456\" height=\"1455\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4b8\/919\/a11\/4b8919a110aa4c662017520ae2d34689.png\"\/><\/p>\n<div><figcaption>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0423\u043e\u043b\u0448\u0430 \u0434\u043b\u044f N=16<\/figcaption><\/div>\n<\/figure>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430 \u043a\u0430\u043a \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0423\u043e\u043b\u0448\u0430. \u041e\u043d\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0438\u0437 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0445 \u0432\u043e\u043b\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u0432\u043e\u044e \u0447\u0430\u0441\u0442\u043e\u0442\u0443, \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0438. \u041a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043b\u0438\u0431\u043e +1, \u043b\u0438\u0431\u043e -1, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u043a\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438\u0445 \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0435\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0427\u0442\u043e\u0431\u044b \u043e\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0432\u0441\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0447\u0430\u0441\u0442\u043e\u0442\u0435 \u0438 \u0444\u0430\u0437\u0435, \u0441\u0442\u0440\u043e\u043a\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0437\u043d\u0430\u043a\u0430 \u2014 \u043a\u0430\u0436\u0434\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0430 \u043e\u0434\u0438\u043d \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0437\u043d\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0443\u0437\u043e\u0440 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u044c <em>\u043e\u0440\u0442\u043e\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/em> \u2014 \u044d\u0442\u043e \u043e\u0441\u043e\u0431\u044b\u0439 \u0432\u0438\u0434 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u0432\u0445\u043e\u0434\u043e\u043c \u0438 \u0432\u044b\u0445\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u0435\u0437\u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0423\u043e\u043b\u0448\u0430, \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0447\u0430\u043b\u043e \u0441 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0410\u0434\u0430\u043c\u0430\u0440\u0430. \u0414\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 N=16 \u044d\u0442\u0430 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8d2\/1e2\/8c7\/8d21e28c7ecedaa62f1396be50ce4fe3.png\" alt=\"\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0425\u0430\u0434\u0430\u043c\u0430\u0440\u0430 \u0434\u043b\u044f N=16\" title=\"\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0425\u0430\u0434\u0430\u043c\u0430\u0440\u0430 \u0434\u043b\u044f N=16\" width=\"1456\" height=\"1455\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8d2\/1e2\/8c7\/8d21e28c7ecedaa62f1396be50ce4fe3.png\"\/><\/p>\n<div><figcaption>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0410\u0434\u0430\u043c\u0430\u0440\u0430 \u0434\u043b\u044f N=16<\/figcaption><\/div>\n<\/figure>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u043c\u0438\u0440 \u0410\u0434\u0430\u043c\u0430\u0440\u0430<\/h2>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0441\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u043d\u043e\u0439, \u043d\u043e \u043d\u0430 \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0423\u043e\u043b\u0448\u0430. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0441\u0442\u0440\u043e\u043a\u0438 #1 \u0438 #8 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043c\u0435\u0441\u0442\u0430\u043c\u0438; \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 #1 \u0438 #15. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0423\u043e\u043b\u0448\u0430, \u044d\u0442\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0444\u0440\u0430\u043a\u0442\u0430\u043b, \u043d\u0430 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441 \u043d\u0443\u043b\u044f.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 1\u00d71:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"H_0 = \\begin{bmatrix} +1 \\end{bmatrix}\" alt=\"H_0 = \\begin{bmatrix} +1 \\end{bmatrix}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c10\/6ca\/9d7\/c106ca9d7b512f4e637950f0bb798d1f.svg\" width=\"93\" height=\"22\"\/><\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e, \u043c\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0430\u0441\u0441\u0438\u0432, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u044d\u0442\u0430\u043f\u0435 ( <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"H_{n-1}\" alt=\"H_{n-1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b8d\/c7d\/62c\/b8dc7d62c74b52394814782756a4177f.svg\" width=\"44\" height=\"21\"\/>). \u041c\u044b \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u0447\u0435\u0442\u044b\u0440\u0435 \u0435\u0433\u043e \u043a\u043e\u043f\u0438\u0438 \u043d\u0430 \u0440\u0435\u0448\u0435\u0442\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0434\u0432\u043e\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b. \u041f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u043a\u043e\u043f\u0438\u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u0430 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0443\u044e \u2014 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u043f\u0440\u0430\u0432\u043e\u043c \u0443\u0433\u043b\u0443 \u2014 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e \u0437\u043d\u0430\u043a\u0443. \u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"H_n = N_{n-1} \\otimes \\begin{bmatrix} +1 &amp; +1 \\\\ +1 &amp; -1\\end{bmatrix}\" alt=\"H_n = N_{n-1} \\otimes \\begin{bmatrix} +1 &amp; +1 \\\\ +1 &amp; -1\\end{bmatrix}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4bf\/fe9\/5ce\/4bffe95cef86182ba276143f3093022e.svg\" width=\"217\" height=\"50\"\/><\/p>\n<p>\u042d\u0442\u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u2297 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>\u043a\u0440\u043e\u043d\u0435\u043a\u0435\u0440\u043e\u0432\u044b\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c<\/em>, \u0445\u043e\u0442\u044f \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043b\u0438\u0448\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0438. \u041f\u0435\u0440\u0432\u043e\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"H_1 = \\begin{bmatrix} \\begin{array}{c|c} +1 &amp; +1 \\\\ \\hline +1 &amp; -1\\end{array}\\end{bmatrix}\" alt=\"H_1 = \\begin{bmatrix} \\begin{array}{c|c} +1 &amp; +1 \\\\ \\hline +1 &amp; -1\\end{array}\\end{bmatrix}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/eb8\/850\/92d\/eb885092dd70db04966ad272bc9de4fc.svg\" width=\"172\" height=\"62\"\/><\/p>\n<p>\u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0430\u0435\u0442 \u043d\u0430\u043c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"H_2 = \\begin{bmatrix} \\begin{array}{c c| c c} +1 &amp; +1 &amp; +1 &amp; +1 \\\\ +1 &amp; -1 &amp; +1 &amp; -1 \\\\ \\hline+1 &amp;+1 &amp;-1 &amp;-1 \\\\ +1 &amp;-1 &amp;-1 &amp;+1   \\end{array} \\end{bmatrix}\" alt=\"H_2 = \\begin{bmatrix} \\begin{array}{c c| c c} +1 &amp; +1 &amp; +1 &amp; +1 \\\\ +1 &amp; -1 &amp; +1 &amp; -1 \\\\ \\hline+1 &amp;+1 &amp;-1 &amp;-1 \\\\ +1 &amp;-1 &amp;-1 &amp;+1   \\end{array} \\end{bmatrix}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ddd\/99a\/2a8\/ddd99a2a856925667628f08d5444e5a5.svg\" width=\"264\" height=\"113\"\/><\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u0434\u0435\u0442 \u0434\u0430\u043b\u044c\u0448\u0435. \u0420\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0410\u0434\u0430\u043c\u0430\u0440\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"2^n \\times 2^n\" alt=\"2^n \\times 2^n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/640\/cdd\/610\/640cdd610c2f88b78894ace532fbbece.svg\" width=\"64\" height=\"18\"\/>, \u0433\u0434\u0435 <em><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/466\/db5\/c77\/466db5c772ca42ac9a4fba7126cdd07d.svg\" width=\"12\" height=\"12\"\/><\/em> \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u043e\u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0425\u043e\u0442\u044f \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443, \u0441\u043b\u0435\u0434\u0443\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0442\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043e\u0439: \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0410\u0434\u0430\u043c\u0430\u0440\u0430 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0418 (x <em>&amp;<\/em> y) \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u044d\u0442\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0447\u0435\u0442\u043d\u044b\u043c \u0438\u043b\u0438 \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0431\u0438\u0442\u043e\u0432 \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a\u043e\u0434 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0410\u0434\u0430\u043c\u0430\u0440\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 8\u00d78:<\/p>\n<pre><code class=\"cpp\">#include &lt;stdint.h> #include &lt;stdio.h>  #define HD_LEN_POW2 3 #define HD_LEN      (1 &lt;&lt; HD_LEN_POW2)  int8_t hadamard(uint32_t x, uint32_t y) {     return (__builtin_popcount(x &amp; y) % 2) ? -1 : 1; }  int main() {   for (uint32_t y = 0; y &lt; HD_LEN; y++) {     for (uint32_t x = 0; x &lt; HD_LEN; x++) printf(\"%+d \", hadamard(x, y));     putchar('\\n');   } }<\/code><\/pre>\n<p>\u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c, \u0434\u0430\u043d\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u0432 \u0432 \u043d\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u043c. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0442\u044c \u0438\u0445, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c.<\/p>\n<h2>\u0412\u043e\u0439\u0434\u0438\u0442\u0435, \u0433\u043e\u0441\u043f\u043e\u0434\u0438\u043d \u0423\u043e\u043b\u0448<\/h2>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0410\u0434\u0430\u043c\u0430\u0440\u0430 \u0432 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443, \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0440\u0430\u043d\u0435\u0435, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0438\u0445 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u043c\u0443 \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439, \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u043c\u0435\u043d \u0437\u043d\u0430\u043a\u043e\u0432 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 <a href=\"https:\/\/icosahedron.website\/@gaditb\/112228725360149921\">Mastodon<\/a> \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043e\u0441\u0442\u0440\u043e\u0443\u043c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u0431\u0438\u0442\u043e\u0432\u0443\u044e \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443: \u0434\u043b\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"2^n\" alt=\"2^n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0c4\/44b\/f33\/0c444bf337cabb1bc5aa7eaad1ff0f9d.svg\" width=\"20\" height=\"18\"\/> \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0442\u0440\u043e\u043a \u0410\u0434\u0430\u043c\u0430\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043f\u0443\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 XOR \u043c\u0435\u0436\u0434\u0443 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438 \u0441\u0442\u0440\u043e\u043a \u0423\u043e\u043b\u0448\u0430 \u0438 \u0438\u0445 \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u0441\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u043c \u043d\u0430 \u043e\u0434\u0438\u043d \u0431\u0438\u0442 \u0432\u043f\u0440\u0430\u0432\u043e, \u0430 \u0437\u0430\u0442\u0435\u043c \u0440\u0435\u0432\u0435\u0440\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 <em>n<\/em> \u0431\u0438\u0442.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 8\u00d78:<\/p>\n<pre><code class=\"cpp\">#include &lt;stdint.h> #include &lt;stdio.h>  #define HD_LEN_POW2 3 #define HD_LEN      (1 &lt;&lt; HD_LEN_POW2)  int8_t hadamard(uint32_t x, uint32_t y) {   return (__builtin_popcount(x &amp; y) % 2) ? -1 : 1; }  uint32_t to_graycode(uint32_t val) {   return val ^ (val >> 1); }  uint32_t reverse_bits(uint32_t val, uint8_t bit_cnt) {   uint32_t res = 0;   while (bit_cnt--) { res &lt;&lt;= 1; res |= (val &amp; 1); val >>= 1; }   return res; }  int8_t walsh_array[HD_LEN][HD_LEN];  void precompute_walsh() {   for (uint32_t y = 0; y &lt; HD_LEN; y++) {     uint32_t hd_y = reverse_bits(to_graycode(y), HD_LEN_POW2);     for (int x = 0; x &lt; HD_LEN; x++) walsh_array[y][x] = hadamard(x, hd_y);   } }  int main() {   precompute_walsh();   for (uint32_t y = 0; y &lt; HD_LEN; y++) {     for (uint32_t x = 0; x &lt; HD_LEN; x++) printf(\"%+d \", walsh_array[y][x]);     putchar('\\n');   } }<\/code><\/pre>\n<p>\u0421 \u044d\u0442\u0438\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0432 \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438, \u043c\u044b \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u043e\u0441\u043c\u044b\u0441\u043b\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f (DCT) \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c &#171;\u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0410\u0434\u0430\u043c\u0430\u0440\u0430&#187; \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0435\u0433\u043e \u0438\u043d\u0432\u0435\u0440\u0441\u0438\u0435\u0439:<\/p>\n<pre><code class=\"cpp\">...previous code here, sans main()...  void sqft(double* out_buf, double* in_buf, uint32_t len) {    for (uint32_t bin_no = 0; bin_no &lt; len; bin_no++) {     double sum = 0;     for (uint32_t s_no = 0; s_no &lt; len; s_no++)       sum += in_buf[s_no] * walsh_array[s_no][bin_no];     out_buf[bin_no] = sum;   }  }  void isqft(double* out_buf, double* in_buf, uint32_t len) {    for (int s_no = 0; s_no &lt; len; s_no++) {     double sum = 0;     for (int bin_no = 0; bin_no &lt; len; bin_no++)       sum += in_buf[bin_no] * walsh_array[bin_no][s_no];     out_buf[s_no] = sum \/ len;   }  }<\/code><\/pre>\n<p>\u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u044d\u0442\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a <em>\u0423\u043e\u043b\u0448\u0430-\u0410\u0434\u0430\u043c\u0430\u0440\u0430 (WHT)<\/em>, \u043e\u0434\u043d\u0430\u043a\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c \u0432\u0430\u0436\u043d\u043e. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f \u0432 \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438:<\/p>\n<pre><code class=\"cpp\">...continuing from the previous snippet...  void print_buf(const char* prefix, double* buf, uint32_t len) {   printf(\"%s\", prefix);   for (uint32_t i = 0; i &lt; len; i++) printf(\" %+.2f\", buf[i]);   putchar('\\n'); }  int main() {    double in[HD_LEN] = { 1, 1, 1, 1, 5, 5, 5, 5 };   double sq_freq[HD_LEN], out[HD_LEN];    precompute_walsh();   sqft(sq_freq, in, HD_LEN);   isqft(out, sq_freq, HD_LEN);    print_buf(\"Input :\", in, HD_LEN);   print_buf(\"SQFT  :\", sq_freq, HD_LEN);   print_buf(\"ISQFT :\", out, HD_LEN);    return 0; }<\/code><\/pre>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0447\u0438\u0441\u0435\u043b, \u0438\u043c\u0438\u0442\u0438\u0440\u0443\u044e\u0449\u0443\u044e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u0443\u044e \u0432\u043e\u043b\u043d\u0443: 1 1 1 1 5 5 5 5. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0424\u0443\u0440\u044c\u0435 (\u0414\u041f\u0424) \u0438\u043b\u0438 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f (\u0414\u041a\u041f) \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u0431\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u043a, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430\u043c:<\/p>\n<p><code>DCT   : +24.00 -10.25 -0.00 +3.60 +0.00 -2.41 -0.00 +2.04<\/code><\/p>\n<p>\u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u043c\u0443, \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439, \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"F_0\" alt=\"F_0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bac\/878\/e75\/bac878e7558135aede24a69e9a33892d.svg\" width=\"21\" height=\"20\"\/> (\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f) \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"F_1\" alt=\"F_1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ae5\/817\/8a2\/ae58178a22b924f56b0826387d3ef0bd.svg\" width=\"21\" height=\"19\"\/>, \u0447\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b \u043d\u0430 \u0447\u0438\u0441\u0442\u044b\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u043e\u043b\u043d\u044b:<\/p>\n<p><code>SQFT  : +24.00 -16.00 +0.00 +0.00 +0.00 +0.00 +0.00 +0.00<\/code><\/p>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u2014 <em>isqft()<\/em> \u2014 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0439 \u0441\u043f\u0435\u043a\u0442\u0440 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<p><code>ISQFT : +1.00 +1.00 +1.00 +1.00 +5.00 +5.00 +5.00 +5.00<\/code><\/p>\n<p>\u041c\u043d\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u0445 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. \u041f\u0440\u0438\u0432\u043e\u0436\u0443 \u043a \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043a\u0432\u0430\u0437\u0438-\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0441\u043f\u0435\u043a\u0442\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f (\u0414\u041a\u041f) \u0434\u043b\u044f <a href=\"https:\/\/lcamtuf.coredump.cx\/dare.mp3\">11-\u0441\u0435\u043a\u0443\u043d\u0434\u043d\u043e\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u043f\u0435\u0441\u043d\u0438 &#171;DARE&#187; \u0433\u0440\u0443\u043f\u043f\u044b Gorillaz<\/a>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/951\/a93\/0f6\/951a930f6a7d25d69379b6e4835f51a2.png\" alt=\"\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u043f\u0435\u043a\u0442\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430\" title=\"\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u043f\u0435\u043a\u0442\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430\" width=\"1456\" height=\"607\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/951\/a93\/0f6\/951a930f6a7d25d69379b6e4835f51a2.png\"\/><\/p>\n<div><figcaption>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u043f\u0435\u043a\u0442\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0418 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u0432\u043e\u0442 \u0438\u0437\u044f\u0449\u043d\u0430\u044f \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u0430\u044f \u0441\u043f\u0435\u043a\u0442\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u0430\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0423\u043e\u043b\u0448\u0430-\u0410\u0434\u0430\u043c\u0430\u0440\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/179\/a53\/f6d\/179a53f6d2335cf72e3a59ac939e136f.png\" alt=\"\u0414\u0435\u0431\u044e\u0442 \u0441\u043f\u0435\u043a\u0442\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0439 \u0432\u043e\u043b\u043d\u044b\" title=\"\u0414\u0435\u0431\u044e\u0442 \u0441\u043f\u0435\u043a\u0442\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0439 \u0432\u043e\u043b\u043d\u044b\" width=\"1456\" height=\"607\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/179\/a53\/f6d\/179a53f6d2335cf72e3a59ac939e136f.png\"\/><\/p>\n<div><figcaption>\u0414\u0435\u0431\u044e\u0442 \u0441\u043f\u0435\u043a\u0442\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0439 \u0432\u043e\u043b\u043d\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0423\u043e\u043b\u0448\u0430-\u0410\u0434\u0430\u043c\u0430\u0440\u0430, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u0432\u043e\u0435\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438 \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0443\u0437\u043a\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445. \u041d\u0435 \u0432 \u0442\u043e\u043c \u0434\u0435\u043b\u043e, \u0447\u0442\u043e \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435; \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/806491\/\"> https:\/\/habr.com\/ru\/articles\/806491\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0427\u0430\u0441\u0442\u043e\u0442\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u2014 \u0432\u043e\u043b\u0448\u0435\u0431\u043d\u043e\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0432 \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u044b \u0438 \u0444\u0430\u0437\u044b \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434. \u041e\u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432, \u043a\u0430\u0437\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u044b\u043c\u0438 \u043f\u0440\u0438 \u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0432 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u2014 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u043e\u043b\u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0438\u0441\u0443\u043d\u043a\u0430 (\u0432\u044b\u0448\u0435) \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0435\u043a\u0442\u0440\u0430 (\u043d\u0438\u0436\u0435) \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 &#171;Girl in Blue&#187;<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u043e \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e? \u0414\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435 (DFT) \u0438\u043c\u0435\u0435\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0441\u0444\u0435\u0440\u0430\u0445 \u0441\u0432\u044f\u0437\u0438 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432, \u043d\u043e \u043d\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043b\u0438 \u043e\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0435, \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438? \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u043e\u043b\u043d\u044b. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 \u043e\u043d\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442, \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435 \u0440\u0430\u0437\u043b\u0430\u0433\u0430\u0435\u0442 \u0438\u0445 \u043d\u0430 <a href=\"https:\/\/lcamtuf.substack.com\/p\/square-waves-or-non-elephant-biology\">\u0440\u044f\u0434 \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u0445 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u043a \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0445\u0435\u043c \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435?<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0447\u0443 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u043e\u043b\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0424\u0443\u0440\u044c\u0435, \u0441\u043d\u044f\u0432 \u0435\u0433\u043e \u0441 \u043f\u043e\u0441\u0442\u0430\u043c\u0435\u043d\u0442\u0430. \u041d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e, \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u043b\u043d\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0432\u0441\u0435\u043c\u0435\u0441\u0442\u043d\u044b\u043c\u0438 \u0432 \u043f\u0440\u0438\u0440\u043e\u0434\u0435 \u0438 \u0441\u043b\u0443\u0436\u0430\u0442 \u043c\u043e\u0449\u043d\u044b\u043c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u0434\u0430\u0447. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 \u0441 \u0445\u043e\u0440\u043e\u0448\u0438\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0447\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c. \u041a \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0442\u0443, \u0433\u0434\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u043e\u043b\u043d\u044b, \u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043b\u0438\u0448\u044c \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435.<\/p>\n<h2>\u0414\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 (DCT)<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u043c\u0441\u044f \u043a \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u2014 \u044d\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0424\u0443\u0440\u044c\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430. \u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0444\u043e\u0440\u043c\u0443\u043b\u0443 DCT-II:<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u043c \u0432\u0437\u044f\u0442\u0438\u0438 \u0440\u044f\u0434\u0430 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u0443\u0434\u0438\u043e\u0441\u0435\u043c\u043f\u043b\u043e\u0432 sn), \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438 \u0438\u0445 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u044b \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u0435 ().<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e , \u0441\u043e\u0437\u0434\u0430\u044e\u0449\u0443\u044e \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0443 \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0433\u043e \u0431\u0438\u043d\u0430 DCT. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u0438\u0441\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u0432\u043b\u0435\u0447\u044c\u0441\u044f \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u044b \u0438 \u043f\u0435\u0440\u0435\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0435 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e,  \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0435\u043a\u0438\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442, \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0439 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439  \u0438 . \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c  \u043a\u0430\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u2014 \u0438\u043b\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435 \u2014 \u0434\u043b\u044f N \u0440\u0430\u0432\u043d\u043e\u0433\u043e 16:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f DCT-II \u0434\u043b\u044f N=16<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 () \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0439 (DC) \u2014 \u044d\u0442\u043e \u043a\u043e\u0441\u0438\u043d\u0443\u0441 \u0441 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0440\u0430\u0432\u0435\u043d +1.00. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u0441\u0438\u043d\u0443\u0441, \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043e\u0442 +1.00 \u0434\u043e -1.00; \u0434\u0430\u043b\u0435\u0435 \u0438\u0434\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u0430 \u043f\u0440\u0438 , \u0437\u0430\u0442\u0435\u043c \u0446\u0438\u043a\u043b \u0438 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u043f\u0440\u0438  \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<h2>\u0412\u0441\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0445 \u0432\u043e\u043b\u043d<\/h2>\n<p>\u041a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0438\u0441\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u043d\u0430 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c \u0438\u0445 \u043d\u0430 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u043e\u043b\u043d\u044b? \u0417\u0430\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u043f\u0435\u0440\u0435\u0434, \u043e\u0442\u0432\u0435\u0442 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0423\u043e\u043b\u0448\u0430 \u0434\u043b\u044f N=16<\/figcaption><\/div>\n<\/figure>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430 \u043a\u0430\u043a \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0423\u043e\u043b\u0448\u0430. \u041e\u043d\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0438\u0437 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0445 \u0432\u043e\u043b\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u0432\u043e\u044e \u0447\u0430\u0441\u0442\u043e\u0442\u0443, \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0438. \u041a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043b\u0438\u0431\u043e +1, \u043b\u0438\u0431\u043e -1, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u043a\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438\u0445 \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0435\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0427\u0442\u043e\u0431\u044b \u043e\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0432\u0441\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0447\u0430\u0441\u0442\u043e\u0442\u0435 \u0438 \u0444\u0430\u0437\u0435, \u0441\u0442\u0440\u043e\u043a\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0437\u043d\u0430\u043a\u0430 \u2014 \u043a\u0430\u0436\u0434\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0430 \u043e\u0434\u0438\u043d \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0437\u043d\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0443\u0437\u043e\u0440 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u044c <em>\u043e\u0440\u0442\u043e\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/em> \u2014 \u044d\u0442\u043e \u043e\u0441\u043e\u0431\u044b\u0439 \u0432\u0438\u0434 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u0432\u0445\u043e\u0434\u043e\u043c \u0438 \u0432\u044b\u0445\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u0435\u0437\u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0423\u043e\u043b\u0448\u0430, \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0447\u0430\u043b\u043e \u0441 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0410\u0434\u0430\u043c\u0430\u0440\u0430. \u0414\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 N=16 \u044d\u0442\u0430 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u0410\u0434\u0430\u043c\u0430\u0440\u0430 \u0434\u043b\u044f N=16<\/figcaption><\/div>\n<\/figure>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u043c\u0438\u0440 \u0410\u0434\u0430\u043c\u0430\u0440\u0430<\/h2>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0441\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u043d\u043e\u0439, \u043d\u043e \u043d\u0430 \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0423\u043e\u043b\u0448\u0430. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0441\u0442\u0440\u043e\u043a\u0438 #1 \u0438 #8 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043c\u0435\u0441\u0442\u0430\u043c\u0438; \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 #1 \u0438 #15. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0423\u043e\u043b\u0448\u0430, \u044d\u0442\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0444\u0440\u0430\u043a\u0442\u0430\u043b, \u043d\u0430 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441 \u043d\u0443\u043b\u044f.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 1\u00d71:<\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e, \u043c\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0430\u0441\u0441\u0438\u0432, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u044d\u0442\u0430\u043f\u0435 ( ). \u041c\u044b \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u0447\u0435\u0442\u044b\u0440\u0435 \u0435\u0433\u043e \u043a\u043e\u043f\u0438\u0438 \u043d\u0430 \u0440\u0435\u0448\u0435\u0442\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0434\u0432\u043e\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b. \u041f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u043a\u043e\u043f\u0438\u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u0430 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0443\u044e \u2014 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u043f\u0440\u0430\u0432\u043e\u043c \u0443\u0433\u043b\u0443 \u2014 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e \u0437\u043d\u0430\u043a\u0443. \u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u2297 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>\u043a\u0440\u043e\u043d\u0435\u043a\u0435\u0440\u043e\u0432\u044b\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c<\/em>, \u0445\u043e\u0442\u044f \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043b\u0438\u0448\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0438. \u041f\u0435\u0440\u0432\u043e\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>\u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0430\u0435\u0442 \u043d\u0430\u043c:<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u0434\u0435\u0442 \u0434\u0430\u043b\u044c\u0448\u0435. \u0420\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0410\u0434\u0430\u043c\u0430\u0440\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 , \u0433\u0434\u0435 <em><\/em> \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u043e\u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0425\u043e\u0442\u044f \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443, \u0441\u043b\u0435\u0434\u0443\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0442\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043e\u0439: \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0410\u0434\u0430\u043c\u0430\u0440\u0430 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0418 (x <em>&amp;<\/em> y) \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u044d\u0442\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0447\u0435\u0442\u043d\u044b\u043c \u0438\u043b\u0438 \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0431\u0438\u0442\u043e\u0432 \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a\u043e\u0434 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0410\u0434\u0430\u043c\u0430\u0440\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 8\u00d78:<\/p>\n<pre><code class=\"cpp\">#include &lt;stdint.h> #include &lt;stdio.h>  #define HD_LEN_POW2 3 #define HD_LEN      (1 &lt;&lt; HD_LEN_POW2)  int8_t hadamard(uint32_t x, uint32_t y) {     return (__builtin_popcount(x &amp; y) % 2) ? -1 : 1; }  int main() {   for (uint32_t y = 0; y &lt; HD_LEN; y++) {     for (uint32_t x = 0; x &lt; HD_LEN; x++) printf(\"%+d \", hadamard(x, y));     putchar('\\n');   } }<\/code><\/pre>\n<p>\u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c, \u0434\u0430\u043d\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u0432 \u0432 \u043d\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u043c. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0442\u044c \u0438\u0445, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c.<\/p>\n<h2>\u0412\u043e\u0439\u0434\u0438\u0442\u0435, \u0433\u043e\u0441\u043f\u043e\u0434\u0438\u043d \u0423\u043e\u043b\u0448<\/h2>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0410\u0434\u0430\u043c\u0430\u0440\u0430 \u0432 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443, \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0440\u0430\u043d\u0435\u0435, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0438\u0445 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u043c\u0443 \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439, \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u043c\u0435\u043d \u0437\u043d\u0430\u043a\u043e\u0432 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 <a href=\"https:\/\/icosahedron.website\/@gaditb\/112228725360149921\">Mastodon<\/a> \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043e\u0441\u0442\u0440\u043e\u0443\u043c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u0431\u0438\u0442\u043e\u0432\u0443\u044e \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443: \u0434\u043b\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441  \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0442\u0440\u043e\u043a \u0410\u0434\u0430\u043c\u0430\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043f\u0443\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 XOR \u043c\u0435\u0436\u0434\u0443 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438 \u0441\u0442\u0440\u043e\u043a \u0423\u043e\u043b\u0448\u0430 \u0438 \u0438\u0445 \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u0441\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u043c \u043d\u0430 \u043e\u0434\u0438\u043d \u0431\u0438\u0442 \u0432\u043f\u0440\u0430\u0432\u043e, \u0430 \u0437\u0430\u0442\u0435\u043c \u0440\u0435\u0432\u0435\u0440\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 <em>n<\/em> \u0431\u0438\u0442.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 8\u00d78:<\/p>\n<pre><code class=\"cpp\">#include &lt;stdint.h> #include &lt;stdio.h>  #define HD_LEN_POW2 3 #define HD_LEN      (1 &lt;&lt; HD_LEN_POW2)  int8_t hadamard(uint32_t x, uint32_t y) {   return (__builtin_popcount(x &amp; y) % 2) ? -1 : 1; }  uint32_t to_graycode(uint32_t val) {   return val ^ (val >> 1); }  uint32_t reverse_bits(uint32_t val, uint8_t bit_cnt) {   uint32_t res = 0;   while (bit_cnt--) { res &lt;&lt;= 1; res |= (val &amp; 1); val >>= 1; }   return res; }  int8_t walsh_array[HD_LEN][HD_LEN];  void precompute_walsh() {   for (uint32_t y = 0; y &lt; HD_LEN; y++) {     uint32_t hd_y = reverse_bits(to_graycode(y), HD_LEN_POW2);     for (int x = 0; x &lt; HD_LEN; x++) walsh_array[y][x] = hadamard(x, hd_y);   } }  int main() {   precompute_walsh();   for (uint32_t y = 0; y &lt; HD_LEN; y++) {     for (uint32_t x = 0; x &lt; HD_LEN; x++) printf(\"%+d \", walsh_array[y][x]);     putchar('\\n');   } }<\/code><\/pre>\n<p>\u0421 \u044d\u0442\u0438\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0432 \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438, \u043c\u044b \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u043e\u0441\u043c\u044b\u0441\u043b\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f (DCT) \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c &#171;\u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0410\u0434\u0430\u043c\u0430\u0440\u0430&#187; \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0435\u0433\u043e \u0438\u043d\u0432\u0435\u0440\u0441\u0438\u0435\u0439:<\/p>\n<pre><code class=\"cpp\">...previous code here, sans main()...  void sqft(double* out_buf, double* in_buf, uint32_t len) {    for (uint32_t bin_no = 0; bin_no &lt; len; bin_no++) {     double sum = 0;     for (uint32_t s_no = 0; s_no &lt; len; s_no++)       sum += in_buf[s_no] * walsh_array[s_no][bin_no];     out_buf[bin_no] = sum;   }  }  void isqft(double* out_buf, double* in_buf, uint32_t len) {    for (int s_no = 0; s_no &lt; len; s_no++) {     double sum = 0;     for (int bin_no = 0; bin_no &lt; len; bin_no++)       sum += in_buf[bin_no] * walsh_array[bin_no][s_no];     out_buf[s_no] = sum \/ len;   }  }<\/code><\/pre>\n<p>\u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u044d\u0442\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a <em>\u0423\u043e\u043b\u0448\u0430-\u0410\u0434\u0430\u043c\u0430\u0440\u0430 (WHT)<\/em>, \u043e\u0434\u043d\u0430\u043a\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c \u0432\u0430\u0436\u043d\u043e. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f \u0432 \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438:<\/p>\n<pre><code class=\"cpp\">...continuing from the previous snippet...  void print_buf(const char* prefix, double* buf, uint32_t len) {   printf(\"%s\", prefix);   for (uint32_t i = 0; i &lt; len; i++) printf(\" %+.2f\", buf[i]);   putchar('\\n'); }  int main() {    double in[HD_LEN] = { 1, 1, 1, 1, 5, 5, 5, 5 };   double sq_freq[HD_LEN], out[HD_LEN];    precompute_walsh();   sqft(sq_freq, in, HD_LEN);   isqft(out, sq_freq, HD_LEN);    print_buf(\"Input :\", in, HD_LEN);   print_buf(\"SQFT  :\", sq_freq, HD_LEN);   print_buf(\"ISQFT :\", out, HD_LEN);    return 0; }<\/code><\/pre>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0447\u0438\u0441\u0435\u043b, \u0438\u043c\u0438\u0442\u0438\u0440\u0443\u044e\u0449\u0443\u044e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u0443\u044e \u0432\u043e\u043b\u043d\u0443: 1 1 1 1 5 5 5 5. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0424\u0443\u0440\u044c\u0435 (\u0414\u041f\u0424) \u0438\u043b\u0438 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f (\u0414\u041a\u041f) \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u0431\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u043a, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430\u043c:<\/p>\n<p><code>DCT   : +24.00 -10.25 -0.00 +3.60 +0.00 -2.41 -0.00 +2.04<\/code><\/p>\n<p>\u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u043c\u0443, \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439,<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-373148","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/373148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=373148"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/373148\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=373148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=373148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=373148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}