Skip to content

Commit 31cf9eb

Browse files
1.28 版本更新 (#15)
* update * update * update * update * update * update * update * update * update * 1.26版本发布 * 1.27 版本发布 * update * 1.28 版本发布
1 parent d176f28 commit 31cf9eb

File tree

15 files changed

+885
-213
lines changed

15 files changed

+885
-213
lines changed

README-Chinese.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ AS库目录有多个版本,如果希望查询不同版本的更新日志以及
2323
<dependency>
2424
<groupId>io.github.BeardedManZhao</groupId>
2525
<artifactId>algorithmStar</artifactId>
26-
<version>1.27</version>
26+
<version>1.28</version>
2727
</dependency>
2828
</dependencies>
2929
```
@@ -114,6 +114,26 @@ AS库在针对数据库,Spark等各种平台对接的时候,需要使用到
114114

115115
## API使用示例
116116

117+
### 下载所有帮助文档
118+
119+
您可以在加载好 AS 库之后,使用下面的代码将所有帮助文档下载到本地,其中有一些示例代码,引导您进行使用,您可以根据自己的需求进行修改。
120+
121+
```java
122+
package zhao.algorithmMagic;
123+
124+
import zhao.algorithmMagic.core.AlgorithmStar;
125+
import zhao.algorithmMagic.core.HelpFactory;
126+
127+
public class MAIN1 {
128+
public static void main(String[] args) {
129+
// 获取帮助信息工厂类
130+
final HelpFactory helpFactory = AlgorithmStar.helpFactory();
131+
// 下载帮助文档 到 C:\Users\zhao\Desktop\fsdownload 目录中
132+
helpFactory.saveHelpFile(HelpFactory.ALL, "C:\\Users\\zhao\\Desktop\\fsdownload");
133+
}
134+
}
135+
```
136+
117137
### 特征计算算法组件
118138

119139
特征计算组件常用于特征工程,是机器学习任务中计算时的主力军,度量算法,分类算法等皆可以使用这种组件计算方式。在算法之星中的特征工程计算,就是基于组件的计算,您可以直接获取到组件对象,并调用组件函数,也可以使用算术之星的门户类进行特征工程。

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,26 @@ need to, you can refer to the following configuration.
129129

130130
## Use API examples
131131

132+
### Download help documents
133+
134+
After loading the AS library, you can use the following code to download all the help documents to your local computer. There are some sample codes to guide you in using them, and you can make modifications according to your own needs.
135+
136+
```java
137+
package zhao.algorithmMagic;
138+
139+
import zhao.algorithmMagic.core.AlgorithmStar;
140+
import zhao.algorithmMagic.core.HelpFactory;
141+
142+
public class MAIN1 {
143+
public static void main(String[] args) {
144+
// 获取帮助信息工厂类
145+
final HelpFactory helpFactory = AlgorithmStar.helpFactory();
146+
// 下载帮助文档 到 C:\Users\zhao\Desktop\fsdownload 目录中
147+
helpFactory.saveHelpFile(HelpFactory.ALL, "C:\\Users\\zhao\\Desktop\\fsdownload");
148+
}
149+
}
150+
```
151+
132152
### Feature calculation algorithm component
133153

134154
Feature computing components are often used in feature engineering, and are the main force of computing in machine

src_code/README-Chinese.md

Lines changed: 41 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -7,126 +7,72 @@
77
</a>
88

99
### 更新日志
10-
* 框架版本:1.26 - 1.27
11-
* 从 1.27 版本开始,AlgorithmStar 门户类中也添加了针对操作数的创建支持,让一些创建操作变的简单且易用,您可以搭配着门户类实现更方便的操作数创建操作。
1210

13-
### 复数创建
11+
* 框架版本:1.27 - 1.28
12+
* 新增分数操作数计算组件,支持对于分数操作数的创建以及计算操作
1413

1514
```java
1615
package zhao.algorithmMagic;
1716

1817
import zhao.algorithmMagic.core.AlgorithmStar;
19-
import zhao.algorithmMagic.core.ComplexNumberFactory;
20-
import zhao.algorithmMagic.operands.ComplexNumber;
18+
import zhao.algorithmMagic.core.FractionFactory;
19+
import zhao.algorithmMagic.operands.fraction.Fraction;
2120

2221
public class MAIN1 {
2322
public static void main(String[] args) {
24-
// 使用 AS 门户类获取到复数工厂
25-
final ComplexNumberFactory complexNumberFactory = AlgorithmStar.complexNumberFactory();
26-
// 获取到第一个复数
27-
final ComplexNumber parse1 = complexNumberFactory.parse("1 + 2i");
28-
// 获取到第二个复数
29-
final ComplexNumber parse2 = complexNumberFactory.parse(1, 2);
30-
// 计算出两个的乘法
23+
// 获取分数操作数工厂
24+
final FractionFactory fractionFactory = AlgorithmStar.fractionFactory();
25+
// 准备三个操作数
26+
final Fraction parse1 = fractionFactory.parse(1, 2);
27+
final Fraction parse2 = fractionFactory.parse(2);
28+
final Fraction parse3 = fractionFactory.parse("1 / 2");
29+
30+
System.out.println("打印三个分数");
31+
System.out.println(parse1);
32+
System.out.println(parse2);
33+
System.out.println(parse3);
34+
35+
System.out.println("全部通分 分别将分母变为 10 5 1 在这里我们将第一个分数保存一下 稍后用于约分");
36+
final Fraction cf1 = parse1.cf(10);
37+
System.out.println(cf1);
38+
System.out.println(parse2.cf(5));
39+
System.out.println(parse3.cf(1));
40+
41+
System.out.println("将被通分的 cf1 进行约分 不出意外的话 这里打印的值为 1 / 2");
42+
System.out.println(cf1.simplify());
43+
44+
System.out.println("在这里将 parse1 以及 parse2 进行加减乘除计算");
45+
System.out.println(parse1.add(parse2));
46+
System.out.println(parse1.diff(parse2));
3147
System.out.println(parse1.multiply(parse2));
32-
}
33-
}
34-
35-
```
36-
37-
#### 向量创建
38-
39-
```java
40-
package zhao.algorithmMagic;
48+
System.out.println(parse1.divide(parse2));
4149

42-
import zhao.algorithmMagic.core.AlgorithmStar;
43-
import zhao.algorithmMagic.core.VectorFactory;
44-
import zhao.algorithmMagic.operands.vector.DoubleVector;
45-
import zhao.algorithmMagic.operands.vector.IntegerVector;
46-
47-
public class MAIN1 {
48-
public static void main(String[] args) {
49-
// 使用 AS 门户类获取到向量工厂
50-
final VectorFactory vectorFactory = AlgorithmStar.vectorFactory();
51-
// 创建一个整形向量
52-
final IntegerVector integerVector = vectorFactory.parseVector(
53-
1, 2, 3, 4
54-
);
55-
// 创建一个浮点向量
56-
final DoubleVector doubleVector = vectorFactory.parseVector(
57-
1.0, 2, 3, 4
58-
);
59-
System.out.println(integerVector);
60-
System.out.println(doubleVector);
50+
System.out.println("在这里将 parse1 做为Java中的数值类型进行使用");
51+
System.out.println(parse1.doubleValue());
6152
}
6253
}
6354
```
6455

65-
#### 矩阵创建
56+
* 新增帮助信息的获取,您可以直接通过下面的方式获取到帮助文档,其中有更全的API说明
6657

6758
```java
6859
package zhao.algorithmMagic;
6960

7061
import zhao.algorithmMagic.core.AlgorithmStar;
71-
import zhao.algorithmMagic.core.MatixFactory;
72-
import zhao.algorithmMagic.operands.matrix.DoubleMatrix;
73-
import zhao.algorithmMagic.operands.matrix.IntegerMatrix;
62+
import zhao.algorithmMagic.core.HelpFactory;
7463

7564
public class MAIN1 {
7665
public static void main(String[] args) {
77-
// 使用 AS 门户类获取到矩阵工厂
78-
final MatixFactory matixFactory = AlgorithmStar.matixFactory();
79-
// 创建一个整形矩阵
80-
final IntegerMatrix integerMatrix = matixFactory.parseMatrix(
81-
new int[]{1, 2, 3, 4},
82-
new int[]{1, 2, 3, 4}
83-
);
84-
// 创建一个浮点矩阵
85-
final DoubleMatrix doubleMatrix = matixFactory.parseMatrix(
86-
new double[]{1, 2, 3, 4},
87-
new double[]{1, 2, 3, 4}
66+
// 获取帮助信息工厂类
67+
final HelpFactory helpFactory = AlgorithmStar.helpFactory();
68+
// 下载帮助文档 到 C:\Users\zhao\Desktop\fsdownload 目录中
69+
final String path = helpFactory.saveHelpFile(
70+
HelpFactory.ALL,
71+
"C:\\Users\\zhao\\Desktop\\fsdownload"
8872
);
89-
System.out.println(integerMatrix);
90-
System.out.println(doubleMatrix);
73+
System.out.println("文件已保存到:" + path);
9174
}
9275
}
93-
94-
```
95-
96-
#### ColorMatrix 构建
97-
98-
```java
99-
package zhao.algorithmMagic;
100-
101-
import zhao.algorithmMagic.core.AlgorithmStar;
102-
import zhao.algorithmMagic.operands.matrix.ColorMatrix;
103-
104-
import java.net.MalformedURLException;
105-
import java.net.URL;
106-
107-
public class MAIN1 {
108-
public static void main(String[] args) throws MalformedURLException {
109-
// 准备一张图的 URL
110-
final URL url = new URL("http://diskmirror.lingyuzhao.top/1/Binary/%E3%80%8AalgorithmStar%20%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E3%80%8B%E7%9A%84%E5%B0%81%E9%9D%A2.jpg");
111-
// 使用 AS 门户类将 URL 解析为 图片
112-
final ColorMatrix colorMatrix = AlgorithmStar.matixFactory().parseImage(
113-
// 设置图片矩阵的类型
114-
ColorMatrix.class,
115-
// 设置构造操作中需要使用的参数
116-
new Object[]{
117-
// 第一个代表的是图片的URL 第二个代表的是图片的大小 在这里我们没有对图的大小进行设置
118-
// 就相当于是 ColorMatrix.parse(url) 或者 ColorMatrix.parse(url, new int[]{})
119-
// 不得不承认,在这里创建 比 使用 ColorMatrix 有些麻烦
120-
url, new int[]{}
121-
},
122-
// 设置构造操作中需要使用的每个参数的类型
123-
new Class<?>[]{URL.class, int[].class},
124-
false
125-
);
126-
colorMatrix.show("res");
127-
}
128-
}
129-
13076
```
13177

132-
### Version update date : 2024-01-03
78+
### Version update date : 2024-01-09

src_code/README.md

Lines changed: 11 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -7,129 +7,27 @@
77
</a>
88

99
### Update log:
10-
11-
* Framework version: 1. 26 - 1. 27
12-
* Starting from version 1.27, the AlgorithmStar portal class has also added support for creating operands, making some
13-
creation operations simple and easy to use. You can use the portal class to achieve more convenient operand creation
14-
operations.
15-
16-
### 复数创建
10+
* Framework version: 1.27 - 1.28
11+
* New component for calculating fraction operands, supporting the creation and calculation of fraction operands
1712

1813
```java
1914
package zhao.algorithmMagic;
2015

2116
import zhao.algorithmMagic.core.AlgorithmStar;
22-
import zhao.algorithmMagic.core.ComplexNumberFactory;
23-
import zhao.algorithmMagic.operands.ComplexNumber;
17+
import zhao.algorithmMagic.core.HelpFactory;
2418

2519
public class MAIN1 {
2620
public static void main(String[] args) {
27-
// 使用 AS 门户类获取到复数工厂
28-
final ComplexNumberFactory complexNumberFactory = AlgorithmStar.complexNumberFactory();
29-
// 获取到第一个复数
30-
final ComplexNumber parse1 = complexNumberFactory.parse("1 + 2i");
31-
// 获取到第二个复数
32-
final ComplexNumber parse2 = complexNumberFactory.parse(1, 2);
33-
// 计算出两个的乘法
34-
System.out.println(parse1.multiply(parse2));
35-
}
36-
}
37-
38-
```
39-
40-
#### 向量创建
41-
42-
```java
43-
package zhao.algorithmMagic;
44-
45-
import zhao.algorithmMagic.core.AlgorithmStar;
46-
import zhao.algorithmMagic.core.VectorFactory;
47-
import zhao.algorithmMagic.operands.vector.DoubleVector;
48-
import zhao.algorithmMagic.operands.vector.IntegerVector;
49-
50-
public class MAIN1 {
51-
public static void main(String[] args) {
52-
// 使用 AS 门户类获取到向量工厂
53-
final VectorFactory vectorFactory = AlgorithmStar.vectorFactory();
54-
// 创建一个整形向量
55-
final IntegerVector integerVector = vectorFactory.parseVector(
56-
1, 2, 3, 4
21+
// 获取帮助信息工厂类
22+
final HelpFactory helpFactory = AlgorithmStar.helpFactory();
23+
// 下载帮助文档 到 C:\Users\zhao\Desktop\fsdownload 目录中
24+
final String path = helpFactory.saveHelpFile(
25+
HelpFactory.ALL,
26+
"C:\\Users\\zhao\\Desktop\\fsdownload"
5727
);
58-
// 创建一个浮点向量
59-
final DoubleVector doubleVector = vectorFactory.parseVector(
60-
1.0, 2, 3, 4
61-
);
62-
System.out.println(integerVector);
63-
System.out.println(doubleVector);
28+
System.out.println("文件已保存到:" + path);
6429
}
6530
}
6631
```
6732

68-
#### 矩阵创建
69-
70-
```java
71-
package zhao.algorithmMagic;
72-
73-
import zhao.algorithmMagic.core.AlgorithmStar;
74-
import zhao.algorithmMagic.core.MatixFactory;
75-
import zhao.algorithmMagic.operands.matrix.DoubleMatrix;
76-
import zhao.algorithmMagic.operands.matrix.IntegerMatrix;
77-
78-
public class MAIN1 {
79-
public static void main(String[] args) {
80-
// 使用 AS 门户类获取到矩阵工厂
81-
final MatixFactory matixFactory = AlgorithmStar.matixFactory();
82-
// 创建一个整形矩阵
83-
final IntegerMatrix integerMatrix = matixFactory.parseMatrix(
84-
new int[]{1, 2, 3, 4},
85-
new int[]{1, 2, 3, 4}
86-
);
87-
// 创建一个浮点矩阵
88-
final DoubleMatrix doubleMatrix = matixFactory.parseMatrix(
89-
new double[]{1, 2, 3, 4},
90-
new double[]{1, 2, 3, 4}
91-
);
92-
System.out.println(integerMatrix);
93-
System.out.println(doubleMatrix);
94-
}
95-
}
96-
97-
```
98-
99-
#### ColorMatrix 构建
100-
101-
```java
102-
package zhao.algorithmMagic;
103-
104-
import zhao.algorithmMagic.core.AlgorithmStar;
105-
import zhao.algorithmMagic.operands.matrix.ColorMatrix;
106-
107-
import java.net.MalformedURLException;
108-
import java.net.URL;
109-
110-
public class MAIN1 {
111-
public static void main(String[] args) throws MalformedURLException {
112-
// 准备一张图的 URL
113-
final URL url = new URL("http://diskmirror.lingyuzhao.top/1/Binary/%E3%80%8AalgorithmStar%20%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E3%80%8B%E7%9A%84%E5%B0%81%E9%9D%A2.jpg");
114-
// 使用 AS 门户类将 URL 解析为 图片
115-
final ColorMatrix colorMatrix = AlgorithmStar.matixFactory().parseImage(
116-
// 设置图片矩阵的类型
117-
ColorMatrix.class,
118-
// 设置构造操作中需要使用的参数
119-
new Object[]{
120-
// 第一个代表的是图片的URL 第二个代表的是图片的大小 在这里我们没有对图的大小进行设置
121-
// 就相当于是 ColorMatrix.parse(url) 或者 ColorMatrix.parse(url, new int[]{})
122-
// 不得不承认,在这里创建 比 使用 ColorMatrix 有些麻烦
123-
url, new int[]{}
124-
},
125-
// 设置构造操作中需要使用的每个参数的类型
126-
new Class<?>[]{URL.class, int[].class},
127-
false
128-
);
129-
colorMatrix.show("res");
130-
}
131-
}
132-
133-
```
134-
135-
### Version update date : 2024-01-03
33+
### Version update date : 2024-01-09

src_code/pom.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>io.github.BeardedManZhao</groupId>
77
<artifactId>algorithmStar</artifactId>
8-
<version>1.27</version>
8+
<version>1.28</version>
99
<packaging>jar</packaging>
1010
<name>algorithmStar</name>
1111
<description>algorithmStar-java</description>
@@ -34,6 +34,13 @@
3434

3535
<dependencies>
3636

37+
<!-- 此依赖用来进行帮助信息的查阅 -->
38+
<dependency>
39+
<groupId>io.github.BeardedManZhao</groupId>
40+
<artifactId>gravel-Grammar</artifactId>
41+
<version>1.0.20230927</version>
42+
</dependency>
43+
3744
<!-- 使用 log4j2 的适配器进行绑定 -->
3845
<dependency>
3946
<groupId>org.apache.logging.log4j</groupId>

0 commit comments

Comments
 (0)