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

# Class RelativeUndirectedBitLength

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

public class RelativeUndirectedBitLength extends Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `(package private) List<Edge>`
  `edges`
  `private Graph`
  `g`
  `private Map<Integer,Double>`
  `moduleExitWeights`
  `private Map<Integer,Double>`
  `moduleWeights`
  `(package private) List<Node>`
  `nodes`
  `(package private) Map<Node,Integer>`
  `nodeToModule`
  `private List<Double>`
  `relativeWeights`
  `private double`
  `totalExitWeight`
  `private double`
  `totalWeight`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RelativeUndirectedBitLength(Graph graph, Map<Node,Integer> nodeToModule)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `calculateModuleExitWeights()`
  `void`
  `calculateModuleWeights()`
  `double`
  `calculateNewModule(Map<Node,Integer> ntm)`
  `void`
  `calculateRelativeWeights()`
  `void`
  `calculateTotalExitWeight()`
  `void`
  `calculateTotalWeight()`
  `static RelativeUndirectedBitLength`
  `fromNodeToModule(Graph graph, Map<Node,Integer> nodeToModule)`
  `private static Map<Node,Integer>`
  `generateNodeToModule(Map<Integer,List<Node>> modules)`
  `double`
  `getBitLength()`
  `private static double`
  `log2(double x)`
  `static void`
  `main(String[] args)`
  `void`
  `setNodeToModule(Map<Node,Integer> nodeToModule)`
  `private static double`
  `sum(Map<Integer,Double> moduleWeights, Map<Integer,Double> moduleExitWeights)`

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

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

- ## Field Details

  - ### g

    private Graph g

  - ### edges

    List<Edge> edges

  - ### nodes

    List<Node> nodes

  - ### nodeToModule

    Map<Node,Integer> nodeToModule

  - ### totalWeight

    private double totalWeight

  - ### relativeWeights

    private List<Double> relativeWeights

  - ### moduleWeights

    private Map<Integer,Double> moduleWeights

  - ### moduleExitWeights

    private Map<Integer,Double> moduleExitWeights

  - ### totalExitWeight

    private double totalExitWeight

- ## Constructor Details

  - ### RelativeUndirectedBitLength

    public RelativeUndirectedBitLength(Graph graph, Map<Node,Integer> nodeToModule)

- ## Method Details

  - ### fromNodeToModule

    public static RelativeUndirectedBitLength fromNodeToModule(Graph graph, Map<Node,Integer> nodeToModule)

  - ### setNodeToModule

    public void setNodeToModule(Map<Node,Integer> nodeToModule)

  - ### calculateNewModule

    public double calculateNewModule(Map<Node,Integer> ntm)

  - ### calculateRelativeWeights

    public void calculateRelativeWeights()

  - ### calculateTotalWeight

    public void calculateTotalWeight()

  - ### calculateModuleWeights

    public void calculateModuleWeights()

  - ### getBitLength

    public double getBitLength()

  - ### calculateModuleExitWeights

    public void calculateModuleExitWeights()

  - ### calculateTotalExitWeight

    public void calculateTotalExitWeight()

  - ### generateNodeToModule

    private static Map<Node,Integer> generateNodeToModule(Map<Integer,List<Node>> modules)

  - ### log2

    private static double log2(double x)

  - ### sum

    private static double sum(Map<Integer,Double> moduleWeights, Map<Integer,Double> moduleExitWeights)

  - ### main

    public static void main(String[] args)