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

# Class InfomapImplementation

java.lang.Object
edu.claflin.finder.algo.clustering.struct.infomap_struct.InfomapImplementation

public class InfomapImplementation extends Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `private double`
  `bestBitLength`
  `private RelativeUndirectedBitLength`
  `bitLengthCalculator`
  `private double`
  `codeLengthThreshold`
  `private static final int`
  `MAX_ITERATIONS`
  `private Map<Node,Set<Node>>`
  `moduleMembers`
  `private Map<Node,Integer>`
  `nodeToModule`
  `private final Graph`
  `originalGraph`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InfomapImplementation(Graph graph)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Map<Integer,List<Node>>`
  `cluster()`
  `private void`
  `fine_tuning(Graph g)`
  `double`
  `getBestBitLength()`
  `Map<Integer,List<Node>>`
  `getCommunities()`
  `private int`
  `getNodeModule(Node node)`
  `private double`
  `modularityGain(Node node, int currentModule, int targetModule)`
  `private void`
  `moveNode(Node node, int targetModule)`
  `private void`
  `oneModulePerNode(Graph g)`
  Puts each node in its own module
  `private void`
  `optimize(Graph g, Map<Node,Integer> nodeToModule)`

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

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

- ## Field Details

  - ### MAX_ITERATIONS

    private static final int MAX_ITERATIONS
    See Also:
      - Constant Field Values

  - ### originalGraph

    private final Graph originalGraph

  - ### nodeToModule

    private Map<Node,Integer> nodeToModule

  - ### moduleMembers

    private Map<Node,Set<Node>> moduleMembers

  - ### bitLengthCalculator

    private RelativeUndirectedBitLength bitLengthCalculator

  - ### bestBitLength

    private double bestBitLength

  - ### codeLengthThreshold

    private double codeLengthThreshold

- ## Constructor Details

  - ### InfomapImplementation

    public InfomapImplementation(Graph graph)

- ## Method Details

  - ### cluster

    public Map<Integer,List<Node>> cluster()

  - ### getCommunities

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

  - ### moveNode

    private void moveNode(Node node, int targetModule)

  - ### oneModulePerNode

    private void oneModulePerNode(Graph g)
    Puts each node in its own module

  - ### getNodeModule

    private int getNodeModule(Node node)

  - ### optimize

    private void optimize(Graph g, Map<Node,Integer> nodeToModule)

  - ### fine_tuning

    private void fine_tuning(Graph g)

  - ### modularityGain

    private double modularityGain(Node node, int currentModule, int targetModule)

  - ### getBestBitLength

    public double getBestBitLength()