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)
    • circleLayout

      public static void circleLayout(Graph graph, int centerx, int centery, int radius)
      Arranges the nodes in the graph in a circle.
      Parameters:
      radius - The radius of the circle in pixels; a good default is 150.
      centerx - The x coordinate for the center of the layout.
      centery - The y coordinate for the center of the layout.
    • 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.