Object
GraphLogger

public class GraphLogger extends Object
A logger for graph operations, using a DescribeGraph to generate descriptions.
  • Constructor Details

    • GraphLogger

      public GraphLogger(DescribeGraph describeGraph, Logger logger)
      Creates a new GraphLogger instance.
      Parameters:
      describeGraph - The DescribeGraph used to generate descriptions of graph elements.
      logger - The Logger used to output messages.
  • Method Details

    • describeEdge

      public void describeEdge(ObjectVertex src, ObjectVertex dest, ObjectVertex merged, double priority, boolean doMerge)
      Logs a description of a potential edge merge.
      Parameters:
      src - the source ObjectVertex
      dest - the destination ObjectVertex
      merged - the resulting merged ObjectVertex
      priority - the priority of the merge
      doMerge - whether the merge will be performed
    • describeMerge

      public void describeMerge(ObjectVertex omMerged, TypedEdge<ObjectVertex,PrioritisedVertex> bestImprovement)
      Logs a description of a merge operation that has been decided upon.
      Parameters:
      omMerged - the resulting merged ObjectVertex
      bestImprovement - the TypedEdge representing the best improvement for merging
    • logDescription

      public void logDescription()
      Logs a description of the entire graph.
    • getErrorReporter

      public ErrorReporter getErrorReporter()
      Gets the error reporter associated with the logger.
      Returns:
      the ErrorReporter for reporting errors