private List<Color> getDominantClustersInNeighbourhood(Node node) {
        NodeIterator neighborNodes = this.LPAClusteringEngine.getGraph().getNeighbors(node).iterator();
        Map<Color, Double> neighborClusterWeights = new HashMap<Color, Double>();
        
        // Calculating clusters weights in the processed node's neighbourhood.
        while(neighborNodes.hasNext() && !this.LPAClusteringEngine.getIsCancelled()) {
            Node currentNeighbor = neighborNodes.next();
            Color neighborCluster = this.LPAClusteringEngine.getNodeClusterMapping().get(currentNeighbor);
            
            double clusterWeight = this.LPAClusteringEngine.getGraph().getEdge(node, currentNeighbor).getWeight();
            
            if (neighborClusterWeights.containsKey(neighborCluster)) {
                clusterWeight += neighborClusterWeights.get(neighborCluster);
            }
            neighborClusterWeights.put(neighborCluster, clusterWeight);
        }
        
        // returning the clusters
        ArrayList<Color> result = new ArrayList<Color>();
        
        if (neighborClusterWeights.isEmpty()){ // disconnected node, must be assigned to its own cluster.
            Color prevailingCluster = this.LPAClusteringEngine.getNodeClusterMapping().get(node);
            result.add(prevailingCluster);
            return result;
        }
        
        // selecting the dominant clusters based on the combined weight of the edges linking their members to the processed node.
        double maxWeight = Collections.max(neighborClusterWeights.values());
        for (Map.Entry<Color, Double> neighborClusterWeight:neighborClusterWeights.entrySet()) {
            double currentWeight = neighborClusterWeight.getValue();
            if (currentWeight == maxWeight) {
                result.add(neighborClusterWeight.getKey());
            }
        }
        return result;
    }