Enhanced Statistical and Graph Algorithm Implementations#151
Open
Rayzheng227 wants to merge 2 commits intolynxworld:devfrom
Open
Enhanced Statistical and Graph Algorithm Implementations#151Rayzheng227 wants to merge 2 commits intolynxworld:devfrom
Rayzheng227 wants to merge 2 commits intolynxworld:devfrom
Conversation
Added functions for calculating the k-th order moment about the origin and the k-th order central moment for discrete distributions. 增加了计算离散型k阶原点矩和k阶中心距的函数
Added implementations of graph-related algorithms in the database, including the shortest path algorithm Dijkstra, Depth-First Search (DFS), Minimum Spanning Tree algorithm (Prim), PageRank, community detection algorithm Louvain, and the maximum flow algorithm (Ford-Fulkerson algorithm).
HC-teemo
reviewed
Dec 23, 2024
Collaborator
HC-teemo
left a comment
There was a problem hiding this comment.
Please put the code in another new scala file. Also, please add unit tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
提供了高级的统计函数和全新的图论相关算法套件。
Introduces advanced statistical functions and a comprehensive suite of graph algorithms
Statistical Functions
kthCentralMoment: 实现了计算给定数据集的 k 阶中心矩的功能。kthCentralMoment:Implements the calculation of the kth central moment for a given dataset.kthRawMoment: 提供了计算 k 阶原点矩的功能kthRawMoment: Provides the functionality to compute the kth raw moment.Graph Algorithms:
pagerank: 实现了 PageRank 算法,用于计算图中节点的重要性。
pagerank: Implements the PageRank algorithm to calculate the importance of nodes in a graph.
maxFlow: 利用 Edmonds-Karp 算法计算流网络中的最大流。
maxFlow: Utilizes the Edmonds-Karp algorithm to compute the maximum flow in a flow network.
communityDetection: 应用了 Louvain 算法进行图的社区检测。
communityDetection: Applies the Louvain algorithm for community detection in graphs.
此外,还引入了 Graph 类,实现了以下图算法:
Additionally, the Graph class has been introduced, implementing the following graph algorithms:
Dijkstra: 实现了 Dijkstra 算法,用于寻找图中的单源最短路径。
Dijkstra: Implements Dijkstra's algorithm for finding single-source shortest paths in graphs.
PrimMST: 应用了 Prim 算法来构建图的最小生成树。
PrimMST: Applies Prim's algorithm to construct the Minimum Spanning Tree (MST) of a graph.
DFS: 执行图的深度优先搜索遍历。
DFS: Performs depth-first search traversal of the graph.
小组成员及分工
小组名称:ZWZ
成员1:ZSJ: 负责实现统计函数,包括 kthCentralMoment 和 kthRawMoment。
成员2:WZR: 创建了 Graph 类,实现了 Dijkstra、Prim 和 DFS 算法。
成员3:ZR: 添加并实现了 PageRank、最大流和社区检测算法。