[英]Using Apache Commons Math in Eclipse
I am new to Java and Eclipse but familiar with other languages. 我是Java和Eclipse的新手,但熟悉其他语言。
I want to use 我想用
public static Iterator<int[]> combinationsIterator(int n, int k)
I found it on http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math3/util/CombinatoricsUtils.html 我在http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math3/util/CombinatoricsUtils.html上找到了它
I have Eclipse installed but I don't know where to go from here. 我已经安装了Eclipse,但是我不知道从这里去哪里。 What do I import?
我要导入什么? What do I have to reference in the header of my code before I can use
combinationsIterator
? 在可以使用
combinationsIterator
之前,必须在代码的标题中引用什么? Thank you. 谢谢。
You have to go download the jar (for their website and add it to Eclipe's classpath. 您必须下载jar(针对其网站)并将其添加到Eclipe的classpath中。
You want the Math package, which can be downloaded here . 您需要Math软件包,可以在此处下载。
To add it to the classpath, go to Eclipse, right click on your project, go to Properties -> Java Build Path -> Libraries -> Add External Jar and select the jar you downloaded. 要将其添加到类路径,请转到Eclipse,右键单击您的项目,然后依次转到“属性”->“ Java构建路径”->“库”->“添加外部Jar”,然后选择您下载的jar。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.