Skip to content

Commit 44dfc6f

Browse files
committed
Add centrality summary containing all values
1 parent 2fa1342 commit 44dfc6f

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Centrality Summary
2+
3+
MATCH (codeUnit)
4+
WHERE (codeUnit.incomingDependencies > 0 OR codeUnit.outgoingDependencies > 0)
5+
AND $dependencies_projection_node IN LABELS(codeUnit)
6+
RETURN coalesce(codeUnit.fqn, codeUnit.fileName, codeUnit.signature, codeUnit.name) AS name
7+
,coalesce(codeUnit.name, replace(last(split(codeUnit.fileName, '/')), '.jar', '')) AS shortName
8+
,codeUnit.centralityPageRank AS pageRank
9+
,codeUnit.centralityArticleRank AS articleRank
10+
,codeUnit.centralityBetweenness AS betweenness
11+
,codeUnit.centralityCostEffectiveLazyForward AS costEffectiveLazyForward
12+
,codeUnit.centralityHarmonic AS harmonicCloseness
13+
,codeUnit.centralityCloseness AS closeness
14+
,codeUnit.centralityHyperlinkInducedTopicSearchAuthority AS hyperlinkInducedTopicSearchAuthority
15+
,codeUnit.centralityHyperlinkInducedTopicSearchHub AS hyperlinkInducedTopicSearchHub
16+
,codeUnit.incomingDependencies AS incomingDependencies
17+
,codeUnit.outgoingDependencies AS outgoingDependencies

scripts/reports/CentralityCsv.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,14 @@ centralityWithHyperlinkInducedTopicSearchHITS() {
338338
execute_cypher "${CENTRALITY_CYPHER_DIR}/Centrality_1d_Label_Add.cypher" "${@}" "${writePropertyName}Hub"
339339
}
340340

341+
listAllResults() {
342+
local CENTRALITY_CYPHER_DIR="$CYPHER_DIR/Centrality"
343+
344+
local nodeLabel
345+
nodeLabel=$( extractQueryParameter "dependencies_projection_node" "${@}" )
346+
execute_cypher "${CENTRALITY_CYPHER_DIR}/Centrality_10_Summary.cypher" "${@}" > "${FULL_REPORT_DIRECTORY}/${nodeLabel}_Centrality_All.csv"
347+
}
348+
341349
# Run all contained centrality algorithms.
342350
#
343351
# Required Parameters:
@@ -355,6 +363,7 @@ runCentralityAlgorithms() {
355363
time centralityWithHarmonic "${@}"
356364
time centralityWithCloseness "${@}"
357365
time centralityWithHyperlinkInducedTopicSearchHITS "${@}"
366+
listAllResults "${@}"
358367
}
359368

360369
# ---------------------------------------------------------------

0 commit comments

Comments
 (0)