XFEExtension
【DLL】XFE各类拓展是一个C#的DLL库,旨在优化C#代码中常用语句的使用,并提供更简洁的访问方式,同时提供Xunit测试框架,快速搭建服务器/客户端,免费ChatGPTAPI接口,免费通讯服务器,XFE下载器,新增格式等
关注
0
Fork
0
Star
0
返回提交历史
Deleted
XFE各类拓展/ArrysExtention.cs
+0
-65
XFEstudio/XFEExtension
Delete XFE各类拓展/ArrysExtention.cs
b798c68
代码差异
1 个文件
+0
-65
@@ -1,65 +0,0 @@
1
using System;
2
3
namespace XFE各类拓展.ArrysExtension
4
{
5
namespace AI
6
{
7
/// <summary>
8
/// 对神经网络算法的数组矩阵的拓展
9
/// </summary>
10
public static class MatrixOfArrysExtension
11
{
12
/// <summary>
13
/// 以矩阵形式打印数组
14
/// </summary>
15
/// <typeparam name="T"></typeparam>
16
/// <param name="arrays"></param>
17
public static void OutPutInMatrix<T>(this T[] arrays)
18
{
19
int i;
20
Console.Write("[");
21
for (i = 0; i < arrays.GetLength(0) - 1; i++)
22
{
23
Console.Write($"{arrays[i]}\t");
24
}
25
Console.Write($"{arrays[i]}]\n");
26
}
27
/// <summary>
28
/// 以矩阵形式打印数组
29
/// </summary>
30
/// <typeparam name="T"></typeparam>
31
/// <param name="arrays"></param>
32
public static void OutPutInMatrix<T>(this T[][] arrays)
33
{
34
for (int i = 0; i < arrays.GetLength(0); i++)
35
{
36
int j;
37
Console.Write("[");
38
for (j = 0; j < arrays.GetLength(1) - 1; j++)
39
{
40
Console.Write($"{arrays[i][j]}\t");
41
}
42
Console.Write($"{arrays[i][j++]}]\n");
43
}
44
}
45
/// <summary>
46
/// 以矩阵形式打印数组
47
/// </summary>
48
/// <typeparam name="T"></typeparam>
49
/// <param name="arrays"></param>
50
public static void OutPutInMatrix<T>(this T[,] arrays)
51
{
52
for (int i = 0; i < arrays.GetLength(0); i++)
53
{
54
int j;
55
Console.Write("[");
56
for (j = 0; j < arrays.GetLength(1) - 1; j++)
57
{
58
Console.Write($"{arrays[i, j]}\t");
59
}
60
Console.Write($"{arrays[i, j++]}]\n");
61
}
62
}
63
}
64
}
65
}