Class DescribeGraph

Object
DescribeGraph

public class DescribeGraph extends Object
Builds string-descriptions of a NeighborGraph.

This class provides methods to generate string descriptions of a NeighborGraph, its vertices, edges, and potential merges.

  • Constructor Details

    • DescribeGraph

      public DescribeGraph(NeighborGraph graph, boolean includePayload)
      Creates a new DescribeGraph instance.
      Parameters:
      graph - Graph the NeighborGraph to describe.
      includePayload - Whether to include payload values in the log messages.
  • Method Details

    • describe

      public String describe()
      Generates a string describing the entire graph (vertices and edges).
      Returns:
      a multi-line string description of the graph
    • describeEdge

      public String describeEdge(ObjectVertex source, ObjectVertex destination, ObjectVertex merged, double priority, boolean doMerge)
      Generates a string to describe a potential merge.
      Parameters:
      source - the source ObjectVertex
      destination - the destination ObjectVertex
      merged - the resulting merged ObjectVertex
      priority - the priority of the merge
      doMerge - whether the merge will be performed
      Returns:
      a string description of the potential merge
    • describeMerge

      public String describeMerge(ObjectVertex merged, TypedEdge<ObjectVertex,PrioritisedVertex> bestImprovement)
      Describes a merge operation that has been decided upon.
      Parameters:
      merged - the resulting merged ObjectVertex
      bestImprovement - the TypedEdge representing the best improvement for merging
      Returns:
      a string description of the merge operation