[Question] StressCentrality algorithm
Problem Type (问题类型)
algorithm (算法相关问题)
Before submit
- [X] 我已经确认现有的 Server-Issues 与 Computer-Issues 中没有相同 / 重复问题
Environment (环境信息)
- Server Version: v1.0.x
- Computer Version: v1.0.x
- Scheduler: K8s V1.xx
- Data Size: xx vertices, xx edges
Your Question (问题描述)
Hello developer, I noticed that there is source code for the StressCentrality algorithm in the HugeGraph source code, but I couldn't find the StressCentrality algorithm in the official documentation. Is this algorithm provided to the public?
Yes, the StressCentrality algorithm is provided to the public as it is included in the HugeGraph source code. The source code for the StressCentralityAlgorithmV2 class is available in the HugeGraph repository under the path hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/cent/StressCentralityAlgorithmV2.java [1].
To continue talking to Dosu, mention @dosu.
I want to invoke the StressCentrality algorithm, but I can't do it in Hubble. What do I need to do to invoke this algorithm?
To invoke the StressCentrality algorithm in HugeGraph, you need to use the appropriate parameters and their formats. Here are the required parameters:
-
direction: The direction of the edges to traverse (type:Directions). -
label: The label of the edges to traverse (type:String). -
depth: The maximum depth to traverse (type:int). -
degree: The maximum degree of vertices to traverse (type:long). -
sample: The number of vertices to sample (type:long). -
withBoundary: Whether to include boundary vertices (type:boolean). -
sourceLabel: The label of the source vertices (type:String). -
sourceSample: The number of source vertices to sample (type:long). -
sourceCLabel: The label of the source vertices for centrality (type:String). -
topN: The number of top vertices to return based on stress centrality (type:long).
Here is an example of how you might call the stressCentrality method programmatically:
public Object stressCentrality(Directions direction,
String label,
int depth,
long degree,
long sample,
boolean withBoundary,
String sourceLabel,
long sourceSample,
String sourceCLabel,
long topN) {
// Implementation details
}
If you are using Hubble and cannot find the algorithm, ensure that your HugeGraph server and Hubble are up-to-date. You might also need to check if there are any specific configurations required in the HugeGraph configuration files to enable the StressCentrality algorithm, although this information wasn't found in the repository [1][2].
To continue talking to Dosu, mention @dosu.
Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label