我在我的项目中使用稀疏矩阵。要构建稀疏矩阵,我正在使用通用Java矩阵包。我将所有依赖项添加到pom.xml文件中。我的pom.xml文件就是这样。
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-core</artifactId>
<version>0.3.0</version>
<dependencies>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-gui</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-commonsmath</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-complete</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-ehcache</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-ejml</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-elasticsearch</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-examples</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-hadoop</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-itext</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-jackcess</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-jama</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-jblas</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-jdbc</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-jetty</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-jfreechart</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-jmatio</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-jsch</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-jsci</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-jscience</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-jung</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-la4j</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-lucene</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-mail</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-mtj</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-ojalgo</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-parallelcolt</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-pdfbox</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-poi</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-vecmath</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-json</artifactId>
<version>0.3.0</version>
</dependency>
</dependencies>
我自己添加了此依赖项。 ujmp.org网站中的所有依赖项均从该文档中添加。添加所有依赖项后,仍然存在一个错误Error:(30, 16) java: package org.json does not exist.Error:(75, 40) java: cannot find symbol
symbol: class JSONTokener
location: class org.ujmp.core.util.JsonUtil. Error:(72, 38) java: cannot find symbol
symbol: class JSONTokener
location: class org.ujmp.core.util.JsonUtil
所以我认为在我的pom.xml文件中添加json依赖关系应该可以消除该错误。
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-json</artifactId>
<version>0.3.0</version>
</dependency>
但错误未消除,无法识别版本0.3.0。它以红色标志显示。所以我该怎么做?我正在使用Intellij Idea。在UJMP官方网站上没有为json添加依赖项。请给我一个建议。
答案 0 :(得分:1)
删除:
<groupId>org.ujmp</groupId>
<artifactId>ujmp-core</artifactId>
<version>0.3.0</version>
添加依赖项:
<dependency>
<groupId>org.ujmp</groupId>
<artifactId>ujmp-core</artifactId>
<version>0.3.0</version>
</dependency>