Class GraphLogger
Object
GraphLogger
A logger for graph operations, using a
DescribeGraph
to generate descriptions.-
Constructor Summary
ConstructorsConstructorDescriptionGraphLogger
(DescribeGraph describeGraph, Logger logger) Creates a newGraphLogger
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
describeEdge
(ObjectVertex src, ObjectVertex dest, ObjectVertex merged, double priority, boolean doMerge) Logs a description of a potential edge merge.void
describeMerge
(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.void
Logs a description of the entire graph.
-
Constructor Details
-
GraphLogger
Creates a newGraphLogger
instance.- Parameters:
describeGraph
- TheDescribeGraph
used to generate descriptions of graph elements.logger
- TheLogger
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 sourceObjectVertex
dest
- the destinationObjectVertex
merged
- the resulting mergedObjectVertex
priority
- 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 mergedObjectVertex
bestImprovement
- theTypedEdge
representing 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
ErrorReporter
for reporting errors
-