Skip to content

Commit

Permalink
remove double vector length
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonmowry committed Jan 21, 2025
1 parent 249ab28 commit 5623f95
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dbscan
Submodule dbscan updated 1 files
+15 −15 makefile
2 changes: 1 addition & 1 deletion framework-open
7 changes: 6 additions & 1 deletion scripts/average_outgoing.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ main() {
fi
local network="${1}"

echo "Average Fan-out:" "$(jq '(.Edges | length) / (.Nodes | length)' "${network}")"
average=$(jq '(.Edges | length) / (.Nodes | length)' "${network}")
median=$(jq '(.Nodes | length) as $nlen | [.Edges[].from] | sort | group_by(.) | map(length) | .[(length / 2) - 1]' "${network}")
# histogram=$(jq '.Edges as $e | [.Nodes | map(.id) | map({id: ., outgoingEdges: ( . as $id | [$e[] | select(.from == $id)] | length) }) | .[].outgoingEdges]' "${network}")

echo "Average Fan-out:" "${average}"
echo "Median Fan-out:" "${median}"
}

main "${@}"

0 comments on commit 5623f95

Please sign in to comment.