Skip to content

Commit c940dc1

Browse files
Official open source
* Correction document * Publish to maven * Publish first package
1 parent 20e4445 commit c940dc1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+352
-155
lines changed

README-Chinese.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,21 @@
1313
您可以通过maven将算术之星(ASMB)集成到您的项目中,maven的配置如下所示。您可以将其添加到maven项目中,也可以从Releases下载并手动将其集成到项目中。
1414

1515
```
16-
Waiting
16+
<repositories>
17+
<repository>
18+
<id>a</id>
19+
<name>sonatype</name>
20+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
21+
</repository>
22+
</repositories>
23+
24+
<dependencies>
25+
<dependency>
26+
<groupId>io.github.BeardedManZhao</groupId>
27+
<artifactId>algorithmStar</artifactId>
28+
<version>1.0-SNAPSHOT</version>
29+
</dependency>
30+
</dependencies>
1731
```
1832

1933
### API使用示例

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,21 @@ You can integrate Arithmetic Star into your project through maven, and the confi
1616
can add it to your maven project, or you can download it from Releases and manually integrate it into your project.
1717

1818
```
19-
Waiting
19+
<repositories>
20+
<repository>
21+
<id>a</id>
22+
<name>sonatype</name>
23+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
24+
</repository>
25+
</repositories>
26+
27+
<dependencies>
28+
<dependency>
29+
<groupId>io.github.BeardedManZhao</groupId>
30+
<artifactId>algorithmStar</artifactId>
31+
<version>1.0-SNAPSHOT</version>
32+
</dependency>
33+
</dependencies>
2034
```
2135

2236
### Use API examples

src_code/.idea/artifacts/algorithmStar_jar.xml

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src_code/pom.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@
6161

6262
<!-- 添加项目信息-->
6363
<scm>
64-
<connection>https://github.com/BeardedManZhao/dataTear.git</connection>
65-
<developerConnection>scm:git:ssh://git@github.com:BeardedManZhao/dataTear.git</developerConnection>
66-
<url>https://github.com/BeardedManZhao/dataTear</url>
64+
<connection>https://github.com/BeardedManZhao/algorithmStar.git</connection>
65+
<developerConnection>scm:git:ssh://git@github.com:BeardedManZhao/algorithmStar.git</developerConnection>
66+
<url>https://github.com/BeardedManZhao/algorithmStar</url>
6767
</scm>
6868

6969
<profiles>
@@ -73,7 +73,6 @@
7373
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
7474
</properties>
7575

76-
<!--注意,此id必须与setting.xml中指定的一致,不要自作聪明改它名字-->
7776
<id>ossrh</id>
7877
<activation>
7978
<activeByDefault>true</activeByDefault>
@@ -144,7 +143,6 @@
144143

145144
<distributionManagement>
146145
<snapshotRepository>
147-
<!--注意,此id必须与setting.xml中指定的一致-->
148146
<id>ossrh</id>
149147
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
150148
</snapshotRepository>

src_code/src/main/java/zhao/algorithmMagic/Integrator/Route2DDrawingIntegrator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ public String getImageOutPath() {
239239
* Set the image output path.
240240
*
241241
* @param imageOutPath Set the image output path.
242+
* @return chain call
242243
*/
243244
public Route2DDrawingIntegrator setImageOutPath(String imageOutPath) {
244245
this.imageOutPath = imageOutPath;

src_code/src/main/java/zhao/algorithmMagic/Integrator/launcher/Route2DDrawingLauncher2.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ public interface Route2DDrawingLauncher2 extends Route2DDrawingLauncher {
2424
* @param route2DDrawingIntegrator 绘图集成器对象,您可以再附加任务中对集成器进行灵活操作!
2525
* <p>
2626
* Drawing integrator object, you can flexibly operate the integrator in additional tasks!
27-
* @apiNote 第二版启动器接口中的特有函数, 允许用户在实现2维绘图接口的时候获取到绘图笔对象, 用户将此接口当作父类去使用, 绘图器会自动分析您的接口版本.
28-
* <p>
29-
* The unique function in the second version of the launcher interface allows the user to obtain the drawing pen object when implementing the 2D drawing interface. The user uses this interface as a parent class, and the drawer will automatically analyze your interface version.
27+
* <p>
28+
* 第二版启动器接口中的特有函数, 允许用户在实现2维绘图接口的时候获取到绘图笔对象, 用户将此接口当作父类去使用, 绘图器会自动分析您的接口版本.
29+
* <p>
30+
* The unique function in the second version of the launcher interface allows the user to obtain the drawing pen object when implementing the 2D drawing interface. The user uses this interface as a parent class, and the drawer will automatically analyze your interface version.
3031
*/
3132
void AdditionalTasks1(Graphics2D graphics2D, Route2DDrawingIntegrator route2DDrawingIntegrator);
3233

@@ -39,9 +40,10 @@ public interface Route2DDrawingLauncher2 extends Route2DDrawingLauncher {
3940
* @param route2DDrawingIntegrator 绘图集成器对象,您可以再附加任务中对集成器进行灵活操作!
4041
* <p>
4142
* Drawing integrator object, you can flexibly operate the integrator in additional tasks!
42-
* @apiNote 第二版启动器接口中的特有函数, 允许用户在实现2维绘图接口的时候获取到绘图笔对象, 用户将此接口当作父类去使用, 绘图器会自动分析您的接口版本.
43-
* <p>
44-
* The unique function in the second version of the launcher interface allows the user to obtain the drawing pen object when implementing the 2D drawing interface. The user uses this interface as a parent class, and the drawer will automatically analyze your interface version.
43+
* <p>
44+
* 第二版启动器接口中的特有函数, 允许用户在实现2维绘图接口的时候获取到绘图笔对象, 用户将此接口当作父类去使用, 绘图器会自动分析您的接口版本.
45+
* <p>
46+
* The unique function in the second version of the launcher interface allows the user to obtain the drawing pen object when implementing the 2D drawing interface. The user uses this interface as a parent class, and the drawer will automatically analyze your interface version.
4547
*/
4648
void AdditionalTasks2(Graphics2D graphics2D, Route2DDrawingIntegrator route2DDrawingIntegrator);
4749
}

src_code/src/main/java/zhao/algorithmMagic/algorithm/differenceAlgorithm/BrayCurtisDistance.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,13 @@ protected BrayCurtisDistance(String AlgorithmName) {
4040
* Get the class object of the algorithm.
4141
*
4242
* @param Name 该算法的名称
43-
* @return 算法类对象
43+
* @param <II> 该算法用来处理的整形坐标是什么数据类型
44+
* <p>
45+
* What data type is the integer coordinate used by this algorithm?
46+
* @param <DD> 该算法用来处理的浮点坐标是什么数据类型
47+
* <p>
48+
* What data type is the floating point coordinate used by this algorithm
49+
* @return 您需要的算法类对象
4450
* @throws TargetNotRealizedException 当您传入的算法名称对应的组件不能被成功提取的时候会抛出异常
4551
* <p>
4652
* An exception will be thrown when the component corresponding to the algorithm name you passed in cannot be successfully extracted
@@ -51,8 +57,8 @@ public static <II extends IntegerCoordinates<II> & Coordinate<II>, DD extends Fl
5157
if (operationAlgorithm instanceof BrayCurtisDistance<?, ?>) {
5258
return ASClass.transform(operationAlgorithm);
5359
} else {
54-
throw new TargetNotRealizedException("您提取的[" + Name + "]算法被找到了,但是它不属于ChebyshevDistance类型,请您为这个算法重新定义一个名称。\n" +
55-
"The [" + Name + "] algorithm you ParameterCombination has been found, but it does not belong to the ChebyshevDistance type. Please redefine a name for this algorithm.");
60+
throw new TargetNotRealizedException("您提取的[" + Name + "]算法被找到了,但是它不属于BrayCurtisDistance类型,请您为这个算法重新定义一个名称。\n" +
61+
"The [" + Name + "] algorithm you ParameterCombination has been found, but it does not belong to the BrayCurtisDistance type. Please redefine a name for this algorithm.");
5662
}
5763
} else {
5864
BrayCurtisDistance<II, DD> brayCurtisDistance = new BrayCurtisDistance<>(Name);

src_code/src/main/java/zhao/algorithmMagic/algorithm/differenceAlgorithm/EditDistance.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static EditDistance getInstance(String Name) {
4545
return ASClass.transform(operationAlgorithm);
4646
} else {
4747
throw new TargetNotRealizedException("您提取的[" + Name + "]算法被找到了,但是它不属于EditDistance类型,请您为这个算法重新定义一个名称。\n" +
48-
"The [" + Name + "] algorithm you extracted has been found, but it does not belong to the Cosine Distance type. Please redefine a name for this algorithm.");
48+
"The [" + Name + "] algorithm you extracted has been found, but it does not belong to the EditDistance type. Please redefine a name for this algorithm.");
4949
}
5050
} else {
5151
EditDistance EditDistance = new EditDistance(Name);
@@ -119,7 +119,10 @@ public boolean init() {
119119
* @param value1 差异参数1
120120
* @param value2 差异参数2
121121
* @return 差异系数
122-
* @apiNote 这里是将两个字符串之间的最小编辑次数。除以两个字符串长度的乘积
122+
* <p>
123+
* 这里是将两个字符串之间的最小编辑次数。除以两个字符串长度的乘积
124+
* <p>
125+
* Here is the minimum number of edits to place between two strings. Divide by the product of the lengths of the two strings
123126
*/
124127
@Override
125128
public double getDifferenceRatio(String value1, String value2) {

src_code/src/main/java/zhao/algorithmMagic/algorithm/differenceAlgorithm/HammingDistance.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static HammingDistance getInstance(String Name) {
4444
return ASClass.transform(operationAlgorithm);
4545
} else {
4646
throw new TargetNotRealizedException("您提取的[" + Name + "]算法被找到了,但是它不属于HammingDistance类型,请您为这个算法重新定义一个名称。\n" +
47-
"The [" + Name + "] algorithm you extracted has been found, but it does not belong to the Cosine Distance type. Please redefine a name for this algorithm.");
47+
"The [" + Name + "] algorithm you extracted has been found, but it does not belong to the HammingDistance type. Please redefine a name for this algorithm.");
4848
}
4949
} else {
5050
HammingDistance HammingDistance = new HammingDistance(Name);
@@ -118,7 +118,10 @@ public boolean init() {
118118
* @param value1 差异参数1
119119
* @param value2 差异参数2
120120
* @return 差异系数 数值越小,差异越小
121-
* @apiNote 这里的实现就是将两个字符串之间的不同处的数量 / 两个字符串的总数量
121+
* <p>
122+
* 这里的实现就是将两个字符串之间的不同处的数量 / 两个字符串的总数量
123+
* <p>
124+
* The implementation here is to convert the number of differences between the two strings divide by total number of the two strings
122125
*/
123126
@Override
124127
public double getDifferenceRatio(String value1, String value2) {

src_code/src/main/java/zhao/algorithmMagic/algorithm/distanceAlgorithm/CanberraDistance.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ protected CanberraDistance(String AlgorithmName) {
4141
* Get the class object of the algorithm.
4242
*
4343
* @param Name 该算法的名称
44+
* @param <II> 该算法用来处理的整形坐标是什么数据类型
45+
* <p>
46+
* What data type is the integer coordinate used by this algorithm?
47+
* @param <DD> 该算法用来处理的浮点坐标是什么数据类型
48+
* <p>
49+
* What data type is the floating point coordinate used by this algorithm
4450
* @return 算法类对象
4551
* @throws TargetNotRealizedException 当您传入的算法名称对应的组件不能被成功提取的时候会抛出异常
4652
* <p>

0 commit comments

Comments
 (0)