Class LayoutUtil

java.lang.Object
edu.cmu.tetrad.graph.LayoutUtil

public class LayoutUtil extends Object
  • Constructor Details

    • LayoutUtil

      public LayoutUtil()
  • Method Details

    • kamadaKawaiLayout

      public static void kamadaKawaiLayout(Graph graph, boolean randomlyInitialized, double naturalEdgeLength, double springConstant, double stopEnergy)
    • fruchtermanReingoldLayout

      public static void fruchtermanReingoldLayout(Graph graph)
    • arrangeByLayout

      public static void arrangeByLayout(Graph graph, HashMap<String,PointXy> layout)
    • defaultLayout

      public static void defaultLayout(Graph graph)
      Arranges the nodes in the graph in a circle if there are 20 or fewer nodes, otherwise arranges them in a square.
      Parameters:
      graph - the graph to be arranged.
    • squareLayout

      public static void squareLayout(Graph graph)
    • layoutByCausalOrder

      public static void layoutByCausalOrder(Graph graph)
    • arrangeBySourceGraph

      public static boolean arrangeBySourceGraph(Graph resultGraph, Graph sourceGraph)
      Arranges the nodes in the result graph according to their positions in the source graph.
      Returns:
      true if all the nodes were arranged, false if not.