Package edu.claflin.finder.algo.clustering.struct.louvain_struct

# Class LouvainAlgorithm

java.lang.Object
edu.claflin.finder.algo.clustering.struct.louvain_struct.LouvainAlgorithm

public final class LouvainAlgorithm extends Object

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `private class`
  `LouvainAlgorithm.GroupData`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `private double[][]`
  `adjacencyMatrix`
  `private HashMap<Integer,List<Node>>`
  `communities`
  `private Graph`
  `graph`
  `private HashMap<Integer,ArrayList<Integer>>`
  `groupMap`
  `private int[]`
  `groupVector`
  `private int`
  `nodeCount`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LouvainAlgorithm(Graph g)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `private boolean`
  `existsNeighbor(int group1, int group2)`
  `private double[][]`
  `getAdjacencyMatrix()`
  `HashMap<Integer,List<Node>>`
  `getCommunities()`
  `private boolean`
  `mergeGroups()`
  `private double`
  `modularityDelta(int group1, int group2)`
  `private void`
  `normalizeGroupVector()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### graph

    private Graph graph

  - ### nodeCount

    private int nodeCount

  - ### groupVector

    private int[] groupVector

  - ### adjacencyMatrix

    private double[][] adjacencyMatrix

  - ### communities

    private HashMap<Integer,List<Node>> communities

  - ### groupMap

    private HashMap<Integer,ArrayList<Integer>> groupMap

- ## Constructor Details

  - ### LouvainAlgorithm

    public LouvainAlgorithm(Graph g)

- ## Method Details

  - ### mergeGroups

    private boolean mergeGroups()

  - ### existsNeighbor

    private boolean existsNeighbor(int group1, int group2)

  - ### getAdjacencyMatrix

    private double[][] getAdjacencyMatrix()

  - ### modularityDelta

    private double modularityDelta(int group1, int group2)

  - ### normalizeGroupVector

    private void normalizeGroupVector()

  - ### getCommunities

    public HashMap<Integer,List<Node>> getCommunities()