Class GraphLogger
Object
GraphLogger
A logger for graph operations, using a
DescribeGraph to generate descriptions.-
Constructor Summary
ConstructorsConstructorDescriptionGraphLogger(DescribeGraph describeGraph, Logger logger) Creates a newGraphLoggerinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoiddescribeEdge(ObjectVertex src, ObjectVertex dest, ObjectVertex merged, double priority, boolean doMerge) Logs a description of a potential edge merge.voiddescribeMerge(ObjectVertex omMerged, TypedEdge<ObjectVertex, PrioritisedVertex> bestImprovement) Logs a description of a merge operation that has been decided upon.Gets the error reporter associated with the logger.voidLogs a description of the entire graph.
-
Constructor Details
-
GraphLogger
Creates a newGraphLoggerinstance.- Parameters:
describeGraph- TheDescribeGraphused to generate descriptions of graph elements.logger- TheLoggerused 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 sourceObjectVertexdest- the destinationObjectVertexmerged- the resulting mergedObjectVertexpriority- the priority of the mergedoMerge- 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 mergedObjectVertexbestImprovement- theTypedEdgerepresenting the best improvement for merging
-
logDescription
public void logDescription()Logs a description of the entire graph. -
getErrorReporter
Gets the error reporter associated with the logger.- Returns:
- the
ErrorReporterfor reporting errors
-