Package network

Class Codec

java.lang.Object
network.Codec

public class Codec
extends java.lang.Object
encodes and decodes graphs in the Edge Vector format
  • Constructor Summary

    Constructors
    Constructor Description
    Codec()  
  • Method Summary

    Modifier and Type Method Description
    int coder​(int a, int b)
    on input of two nodes, you get the place of their edge on the vector
    int[] decoder​(int q)
    on input of one place of the vector that denotes one edge of the graph you get the two nodes that define the edge

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Codec

      public Codec()
  • Method Details

    • coder

      public int coder​(int a, int b)
      on input of two nodes, you get the place of their edge on the vector
    • decoder

      public int[] decoder​(int q)
      on input of one place of the vector that denotes one edge of the graph you get the two nodes that define the edge