// Path: src/main/java/com/maxdemarzi/processing/NodeCounter.java
// public class NodeCounter {
//     public int getNodeCount(GraphDatabaseService db) {
//         Result result = db.execute( "MATCH (n) RETURN max(id(n)) AS maxId" );
//         return ((Number) result.next().get( "maxId" )).intValue() + 1;
// 
//     }
//     public int getRelationshipCount(GraphDatabaseService db) {
//         Result result = db.execute( "MATCH ()-[r]->() RETURN max(id(r)) AS maxId" );
//         return ((Number) result.next().get( "maxId" )).intValue() + 1;
//     }
// }
// 
// Path: src/main/java/com/maxdemarzi/processing/Utils.java
// public static SingleSourceShortestPath<Double> getSingleSourceShortestPath(RelationshipType relationshipType)
// {
//     return new SingleSourceShortestPathDijkstra<Double>( 0.0, null,
//             new CostEvaluator<Double>()
//             {
//                 public Double getCost( Relationship relationship,
//                                        Direction direction )
//                 {
//                     return 1.0;
//                 }
//             }, new org.neo4j.graphalgo.impl.util.DoubleAdder(),
//             new org.neo4j.graphalgo.impl.util.DoubleComparator(),
//             Direction.BOTH, relationshipType );
// }


import com.maxdemarzi.processing.NodeCounter;
import org.neo4j.graphalgo.impl.centrality.BetweennessCentrality;
import org.neo4j.graphalgo.impl.shortestpath.SingleSourceShortestPath;
import org.neo4j.graphdb.*;
import java.util.HashSet;
import java.util.Set;
import static com.maxdemarzi.processing.Utils.getSingleSourceShortestPath;
package com.maxdemarzi.processing.centrality;




public class Betweenness implements Centrality {
    private final GraphDatabaseService db;
    private final int nodeCount;
    private BetweennessCentrality<Double> betweennessCentrality;

    public Betweenness(GraphDatabaseService db){
        this.db = db;
// Path: src/main/java/com/maxdemarzi/processing/NodeCounter.java
// public class NodeCounter {
//     public int getNodeCount(GraphDatabaseService db) {
//         Result result = db.execute( "MATCH (n) RETURN max(id(n)) AS maxId" );
//         return ((Number) result.next().get( "maxId" )).intValue() + 1;
// 
//     }
//     public int getRelationshipCount(GraphDatabaseService db) {
//         Result result = db.execute( "MATCH ()-[r]->() RETURN max(id(r)) AS maxId" );
//         return ((Number) result.next().get( "maxId" )).intValue() + 1;
//     }
// }
// 
// Path: src/main/java/com/maxdemarzi/processing/Utils.java
// public static SingleSourceShortestPath<Double> getSingleSourceShortestPath(RelationshipType relationshipType)
// {
//     return new SingleSourceShortestPathDijkstra<Double>( 0.0, null,
//             new CostEvaluator<Double>()
//             {
//                 public Double getCost( Relationship relationship,
//                                        Direction direction )
//                 {
//                     return 1.0;
//                 }
//             }, new org.neo4j.graphalgo.impl.util.DoubleAdder(),
//             new org.neo4j.graphalgo.impl.util.DoubleComparator(),
//             Direction.BOTH, relationshipType );
// }


// Path: src/main/java/com/maxdemarzi/processing/centrality/Betweenness.java
import com.maxdemarzi.processing.NodeCounter;
import org.neo4j.graphalgo.impl.centrality.BetweennessCentrality;
import org.neo4j.graphalgo.impl.shortestpath.SingleSourceShortestPath;
import org.neo4j.graphdb.*;
import java.util.HashSet;
import java.util.Set;
import static com.maxdemarzi.processing.Utils.getSingleSourceShortestPath;

package com.maxdemarzi.processing.centrality;




public class Betweenness implements Centrality {
    private final GraphDatabaseService db;
    private final int nodeCount;
    private BetweennessCentrality<Double> betweennessCentrality;

    public Betweenness(GraphDatabaseService db){
        this.db = db;
        this.nodeCount = new NodeCounter().getNodeCount(db);