用于clojure的apache-commons-matrix与core.matrix玩得不好?

发布于 2025-01-25 14:29:58 字数 2054 浏览 0 评论 0 原文

我正在尝试使用 https://github.com/adereth/adereth/apache-commons-commons-matrix-matrix < /a> to 通过Maven Repo访问Apache Commons数学的功能

我的主要指南是马特·阿德雷斯(Matt Adereth) http:http:// adereth .github.io/blog/2013/11/08/core-dot-matrix-plus-apache-commons-math/ ,从2013年开始!惊喜,惊喜,似乎有一些代码 腐烂。

MVN存储

  1. 库中的代码缺少扩展名(扩展协议MP/PMATRIXMULTIPLY) github repo中存在 https://github.com/ Adereth/Apache-Commons-Matrix/blob/ef1e2bccbee7f8b8f59fbfdfe7639c239c23f6c406f/src/src/apache_commons_matrix/core.clj#l192

  2. Matt的指南建议使用(m/set-current-implentation:apache-commons),但 clojure.core.matrix.implementations/nowle-implementations 具有 它的条目:Commons-Math-Math apache-commons-matrix.core

  3. (m/set-current-implementation:commons-math)抛出 不同的错误:

     错误加载core.matrix实现:apache-commons-matrix.core
     #错误 {
     :导致太多的论点要投掷,投掷期望一个可投掷的实例
     :通过
     [{:类型clojure.lang.compiler $ compilerexception
     :消息语法错误编译抛出(apache_commons_matrix/core.clj:19:13)。
     :data#:clojure.error {:stape:compile-syntax-check,:line 19,:第13列,:source apache_commons_matrix/core.clj,:symbol throw}
     :at [clojure.lang.compiler Analyzeseq compiler.java 7132]}
     

    的确,引用的行使用看起来像是一个不好的电话 clojure'(throw)

     (throw(ex-info“ apache commons数学矩阵仅支持多达2个维度”){:请求形状dims})
     

任何试图使这种潜在有用的Interop工作的人吗?

I'm trying to use https://github.com/adereth/apache-commons-matrix to
access the functionality of Apache Commons Math, via the Maven repo
https://mvnrepository.com/artifact/org.apache.commons/commons-math3 .

My main guide is Matt Adereth's
http://adereth.github.io/blog/2013/11/08/core-dot-matrix-plus-apache-commons-math/
, from 2013!? Surprise, surprise, there seems to have been some code
rot. Several issues in particular:

  1. The code in the mvn repo is missing an extension (extend-protocol mp/PMatrixMultiply) present in the github repo here
    https://github.com/adereth/apache-commons-matrix/blob/ef1e2bccbee7f8b8f5d9fbfdfe7639c23f6c406f/src/apache_commons_matrix/core.clj#L192 ?

  2. Matt's guide suggests using (m/set-current-implementation :apache-commons), but
    clojure.core.matrix.implementations/KNOWN-IMPLEMENTATIONS has as
    its entry :commons-math apache-commons-matrix.core

  3. But (m/set-current-implementation :commons-math) throws a
    different error:

     Error loading core.matrix implementation:  apache-commons-matrix.core
     #error {
     :cause Too many arguments to throw, throw expects a single Throwable instance
     :via
     [{:type clojure.lang.Compiler$CompilerException
     :message Syntax error compiling throw at (apache_commons_matrix/core.clj:19:13).
     :data #:clojure.error{:phase :compile-syntax-check, :line 19, :column 13, :source apache_commons_matrix/core.clj, :symbol throw}
     :at [clojure.lang.Compiler analyzeSeq Compiler.java 7132]}
    

    indeed, the referenced line uses what looks like a bad call to
    clojure' (throw):

     (throw (ex-info "Apache Commons Math matrices only supports up to 2 dimensions") {:requested-shape dims})
    

anyone trying to make this potentially useful interop work?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文