{"id":30,"date":"2024-09-10T07:26:16","date_gmt":"2024-09-09T23:26:16","guid":{"rendered":"http:\/\/chaixiangyu.cn\/?p=30"},"modified":"2024-09-11T21:40:36","modified_gmt":"2024-09-11T13:40:36","slug":"armadillo%e4%bd%bf%e7%94%a8%e4%bb%8b%e7%bb%8d%ef%bc%88%e4%b9%9d%ef%bc%89%ef%bc%9a%e4%b8%8b%e8%bd%bdarmadillo%e3%80%81%e9%85%8d%e7%bd%ae%e5%b7%a5%e7%a8%8b%e3%80%81%e8%bf%90%e8%a1%8c%e7%ac%ac%e4%b8%80","status":"publish","type":"post","link":"https:\/\/chaixiangyu.cn\/?p=30","title":{"rendered":"Armadillo\u4f7f\u7528\u4ecb\u7ecd\uff08\u4e5d\uff09\uff1a\u4e0b\u8f7dArmadillo\u3001\u914d\u7f6e\u5de5\u7a0b\u3001\u8fd0\u884c\u7b2c\u4e00\u4e2a\u7a0b\u5e8f"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">\u4e00\u3001\u4e0b\u8f7dArmadillo<\/h1>\n\n\n\n<p>\u901a\u8fc7\u4ee5\u4e0b\u4e24\u79cd\u9014\u5f84\u4e0b\u8f7dArmadillo C++\u5e93\u6e90\u7801\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"http:\/\/arma.sourceforge.net\/download.html\">Armadillo Download page<\/a><br>\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u53ef\u4ee5\u4e0b\u8f7d\u5230\u6700\u65b0\u7248\u672c\u7684armadillo\u5e93\uff08\u968f\u7740\u65f6\u95f4\u53d8\u5316\uff0carmadillo\u7248\u672c\u53ef\u80fd\u4f1a\u6bd4\u56fe\u793a\u7684\u7248\u672c\u66f4\u9ad8\uff09\u3002<br><img decoding=\"async\" src=\"https:\/\/i-blog.csdnimg.cn\/blog_migrate\/07779f85eee8983b79bb63609b251eb0.png\" alt=\"Armadillo Download page\u56fe\u7247\"><br>\u70b9\u51fb\u4e0a\u56fe\u7ea2\u6846\u4e2d\u7684\u94fe\u63a5\u540e\uff0c\u4f1a\u8fdb\u5165\u4e0b\u56fe\u6240\u793a\u9875\u9762\uff0c\u81ea\u52a8\u4e0b\u8f7d\u6e90\u7801\u3002<br><img decoding=\"async\" src=\"https:\/\/i-blog.csdnimg.cn\/blog_migrate\/1c0bb073793d707e358a72104345e8af.png\" alt=\"\u4e0b\u8f7d\u9875\u9762\"><\/li>\n\n\n\n<li><a href=\"https:\/\/gitlab.com\/conradsnicta\/armadillo-code\/-\/tree\/9.900.x\">Armadillo Gitlab page<\/a><br>\u53ef\u4ee5\u4eceArmadillo\u5728Gitlab\u7684\u4ed3\u5e93\u4e0b\u8f7d\u5230\u6700\u65b0\u7684\u6e90\u7801\uff08Armadillo\u7684\u4ed3\u5e93\u5728Gitlab\u800c\u975eGithub\u7684\u539f\u56e0\uff0c\u53c2\u89c1\u201c<a href=\"http:\/\/arma.sourceforge.net\/faq.html#development\">What happened to the source code repository at GitHub ?<\/a>\u201d\uff09\uff0c\u5177\u4f53\u6b65\u9aa4\u53c2\u89c1\u4e0b\u56fe\u4e2d\u7684\u2460->\u2461->\u2462<br><img decoding=\"async\" src=\"https:\/\/i-blog.csdnimg.cn\/blog_migrate\/1fd2af120d707d7022a01b325573dfd9.png\" alt=\"Armadillo Gitlab page\u56fe\u7247\"><\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u3001\u914d\u7f6e\u5de5\u7a0b<\/h1>\n\n\n\n<p>\u672c\u8282\u4ec5\u4ecb\u7ecdWindows\u4e0b\u91c7\u7528visual studio\u642d\u5efa\u5de5\u7a0b\u65f6\u5e94\u7528Armadillo\u7684\u65b9\u6cd5\uff0c\u4e14\u4ec5\u652f\u6301win64\u7248\u672c\u3002<br>\u5bf9\u4e8e\u914d\u7f6e\u7c7b\u578b\u4e3a<strong>\u5e94\u7528\u7a0b\u5e8f(.exe)<\/strong>\u7684\u5de5\u7a0b\uff0c\u91c7\u7528\u4ee5\u4e0b\u914d\u7f6e\u65b9\u5f0f\uff1a<br>2.1 \u524d\u6587\u4e0b\u8f7d\u7684\u6e90\u7801\u6587\u4ef6\u5939\u590d\u5236\u5230\u89e3\u51b3\u65b9\u6848\u8def\u5f84\u4e0b\uff08\u5b8f\u547d\u4ee4\u8868\u793a\u4e3a<code>$(SolutionDir)<\/code>\uff09<br>2.2 \u8fd9\u91cc\u91c7\u7528\u914d\u7f6e\u4e3a<code>Debug<\/code>\uff0c\u5e73\u53f0\u4e3a<code>x64<\/code><br>2.3 \u201c\u53f3\u952e\u201d-&gt;\u201c\u5c5e\u6027\u201d-&gt;\u201c\u914d\u7f6e\u5c5e\u6027\u201d-&gt;\u201cC\/C++\u201d-&gt;\u201c\u5e38\u89c4\u201d-&gt;\u201c\u9644\u52a0\u5305\u542b\u76ee\u5f55\u201d\uff0c\u65b0\u589e\u503c<code>$(SolutionDir)armadillo\\include;<\/code><br><img decoding=\"async\" src=\"https:\/\/i-blog.csdnimg.cn\/blog_migrate\/24dbd43852976ab7e41be624aa5dc548.png\" alt=\"\u9644\u52a0\u5305\u542b\u76ee\u5f55\"><br>2.4 \u201c\u94fe\u63a5\u5668\u201d-&gt;\u201c\u5e38\u89c4\u201d-&gt;\u201c\u9644\u52a0\u5e93\u76ee\u5f55\u201d\uff0c\u65b0\u589e\u503c<code>$(SolutionDir)armadillo\\examples\\lib_win64;<\/code><br><img decoding=\"async\" src=\"https:\/\/i-blog.csdnimg.cn\/blog_migrate\/7fe5803115a7c7a454158a301e7bd39b.png\" alt=\"\u9644\u52a0\u5e93\u76ee\u5f55\"><br>2.5 \u201c\u94fe\u63a5\u5668\u201d-&gt;\u201c\u8f93\u5165\u201d-&gt;\u201c\u9644\u52a0\u4f9d\u8d56\u9879\u201d\uff0c\u65b0\u589e\u503c<code>lapack_win64_MT.lib;blas_win64_MT.lib;<\/code><br><img decoding=\"async\" src=\"https:\/\/i-blog.csdnimg.cn\/blog_migrate\/abf3dcb7eded4236bdcde05a982fe1b7.png\" alt=\"\u9644\u52a0\u4f9d\u8d56\u9879\"><br>2.6 \u201c\u751f\u6210\u4e8b\u4ef6\u201d-&gt;\u201c\u540e\u671f\u751f\u6210\u4e8b\u4ef6\u201d-&gt;\u201c\u547d\u4ee4\u884c\u201d\uff0c\u65b0\u589e\u503c<code>copy $(SolutionDir)armadillo\\examples\\lib_win64\\*.dll $(OutDir)<\/code><br>\u201c\u751f\u6210\u4e8b\u4ef6\u201d-&gt;\u201c\u540e\u671f\u751f\u6210\u4e8b\u4ef6\u201d-&gt;\u201c\u8bf4\u660e\u201d\uff0c\u65b0\u589e\u503c<code>Copy .DLL to output directory<\/code>\uff08\u8be5\u6b65\u9aa4\u975e\u5fc5\u8981\uff0c\u53ef\u9009\uff09<br><img decoding=\"async\" src=\"https:\/\/i-blog.csdnimg.cn\/blog_migrate\/0cfa6cbc71abec1d8ad004fd8ecfc505.png\" alt=\"\u540e\u671f\u751f\u6210\u4e8b\u4ef6\"><br>\u5bf9\u4e8e\u4e0a\u8ff0\u914d\u7f6e\u7684\u5185\u5bb9\uff0c\u914d\u7f6e\u5b8c\u6210\u540e\u53ef\u4ee5\u5728\u5de5\u7a0b\u7684vcxproj\u6587\u4ef6\u4e2d\u770b\u5230\uff08\u89c1\u5982\u4e0b\u4ee3\u7801\uff09\uff0c\u4e00\u822c\u547d\u540d\u683c\u5f0f\u4e3a<code>$(ProjectName).vcxproj<\/code>\uff08\u4f8b\u5982\u672c\u793a\u4f8b\u7684\u5de5\u7a0b\u540d\u79f0\u4e3a<code>ShortExample<\/code>\uff0c\u5219vcxproj\u6587\u4ef6\u4e3a<code>ShortExample.vcxproj<\/code>\uff09\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\"&gt;\n    &lt;ClCompile&gt;\n      &lt;PrecompiledHeader&gt;\n      &lt;\/PrecompiledHeader&gt;\n      &lt;WarningLevel&gt;Level3&lt;\/WarningLevel&gt;\n      &lt;Optimization&gt;Disabled&lt;\/Optimization&gt;\n      &lt;PreprocessorDefinitions&gt;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)&lt;\/PreprocessorDefinitions&gt;\n      &lt;SDLCheck&gt;true&lt;\/SDLCheck&gt;\n      &lt;AdditionalIncludeDirectories&gt;$(SolutionDir)armadillo\\include;&lt;\/AdditionalIncludeDirectories&gt;\n    &lt;\/ClCompile&gt;\n    &lt;Link&gt;\n      &lt;SubSystem&gt;Console&lt;\/SubSystem&gt;\n      &lt;GenerateDebugInformation&gt;true&lt;\/GenerateDebugInformation&gt;\n      &lt;AdditionalDependencies&gt;lapack_win64_MT.lib;blas_win64_MT.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)&lt;\/AdditionalDependencies&gt;\n      &lt;AdditionalLibraryDirectories&gt;$(SolutionDir)armadillo\\examples\\lib_win64;&lt;\/AdditionalLibraryDirectories&gt;\n    &lt;\/Link&gt;\n    &lt;PostBuildEvent&gt;\n      &lt;Command&gt;copy $(SolutionDir)armadillo\\examples\\lib_win64\\*.dll $(OutDir)&lt;\/Command&gt;\n    &lt;\/PostBuildEvent&gt;\n    &lt;PostBuildEvent&gt;\n      &lt;Message&gt;Copy .DLL to output directory&lt;\/Message&gt;\n    &lt;\/PostBuildEvent&gt;\n  &lt;\/ItemDefinitionGroup&gt;<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u3001\u8fd0\u884c\u7b2c\u4e00\u4e2a\u7a0b\u5e8f<\/h1>\n\n\n\n<h4 class=\"wp-block-heading\">\u6e90\u7801<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream&gt;\n#include &lt;armadillo&gt;\/\/\u5305\u542barmadillo\u5934\u6587\u4ef6\n\nusing namespace std;\nusing namespace arma;\/\/armadillo\u547d\u540d\u7a7a\u95f4\n\nint main()\n{\n    cout &lt;&lt; \"Armadillo version: \" &lt;&lt; arma_version::as_string() &lt;&lt; endl;\n\n    mat A = randu&lt;mat&gt;(4, 5);\/\/4\u884c5\u5217\u77e9\u9635\n    mat B = randu&lt;mat&gt;(4, 5);\n\n    cout &lt;&lt; \"A*B.t():\\n\" &lt;&lt; A*B.t() &lt;&lt; endl;\/\/.t()\u5411\u91cf\u6216\u77e9\u9635\u8f6c\u7f6e\n\n    (A*B.t()).print(\"A*B.t():\");\n\n    system(\"pause\");\n\n    return 0;\n}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u8fd0\u884c\u7ed3\u679c<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>Armadillo version: 9.900.1 (Nocturnal Misbehaviour)\nA*B.t():\n   0.9536   1.0573   1.0669   0.9087\n   0.3911   0.6334   0.6719   0.7834\n   1.7734   2.6922   2.1078   2.4613\n   0.8542   1.1044   0.8725   0.9546\n\nA*B.t():\n   0.9536   1.0573   1.0669   0.9087\n   0.3911   0.6334   0.6719   0.7834\n   1.7734   2.6922   2.1078   2.4613\n   0.8542   1.1044   0.8725   0.9546\n\u8bf7\u6309\u4efb\u610f\u952e\u7ee7\u7eed. . .<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u4e0b\u8f7dArmadillo \u901a\u8fc7\u4ee5\u4e0b\u4e24\u79cd\u9014\u5f84\u4e0b\u8f7dArmadillo C++\u5e93\u6e90\u7801\uff1a \u4e8c\u3001\u914d\u7f6e\u5de5\u7a0b \u672c\u8282\u4ec5\u4ecb\u7ecdW [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-algorithm"],"_links":{"self":[{"href":"https:\/\/chaixiangyu.cn\/index.php?rest_route=\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chaixiangyu.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chaixiangyu.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chaixiangyu.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chaixiangyu.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=30"}],"version-history":[{"count":1,"href":"https:\/\/chaixiangyu.cn\/index.php?rest_route=\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":31,"href":"https:\/\/chaixiangyu.cn\/index.php?rest_route=\/wp\/v2\/posts\/30\/revisions\/31"}],"wp:attachment":[{"href":"https:\/\/chaixiangyu.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chaixiangyu.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chaixiangyu.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}