class HarmonicCentralityProc extends AlgoBaseProc<HarmonicCentrality, HarmonicCentrality, HarmonicCentralityConfig> {

    @Procedure(name = "gds.alpha.closeness.harmonic.stream", mode = READ)
    @Description(DESCRIPTION)
    public Stream<StreamResult> stream(
        @Name(value = "graphName") Object graphNameOrConfig,
        @Name(value = "configuration", defaultValue = "{}") Map<String, Object> configuration
    ) {
        var computationResult = compute(graphNameOrConfig, configuration);

        var algorithm = computationResult.algorithm();
        var graph = computationResult.graph();

        if (graph.isEmpty()) {
            graph.release();
            return Stream.empty();
        }

        return LongStream.range(0, graph.nodeCount())
            .boxed()
            .map(nodeId -> new StreamResult(graph.toOriginalNodeId(nodeId), algorithm.getCentralityScore(nodeId)));
    }

}