Skip to content

Conversation

@zqqcee
Copy link

@zqqcee zqqcee commented Sep 13, 2023

No description provided.

};

/**
* 获取指定节点的边,包括出边和入边
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释改一下~

* @param edges 图中的所有边数据
*/
export const getEdgesByNodeId = (nodeId: NodeID, edges: Edge<{ [key: string]: any }>[]): Edge<{ [key: string]: any }>[] => {
return edges.filter((edge) => edge.source === nodeId || edge.target === nodeId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不过 graphlib 的 graph 应该有一个 API 叫 getRelatedEdges,应该能干这个函数的事儿?

@@ -0,0 +1,46 @@
/**
* 并查集 Disjoint set to support quick union
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

英文注释~

}
}

// whether a and b are connected, i.e. a and b have the same root
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

把之前不规范的函数注释也顺便改改~

@Yanyan-Wang
Copy link
Contributor

antvis/G6#4928

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants