示例#1
0
            private void DecorateEdge(Dot.Edge dotEdge, NodePair <Node, Edge> pair, Label?label, EdgeStatus edgeStatus, Recorder <Graph, Node, Edge, Label> .RecordOptions options)
            {
                if (EdgeDiff.Commons.TryGetValue(pair, out var common))
                {
                    groupMap.TryGetValue(common.labelGroup.Group, out var labels);
                    // reverseGroupMap.TryGetValue(common.labelKey.Label, out var groups);

                    if (labels?.Count == 1)
                    {
                        dotEdge.Label = $"{common.labelGroup.Group}";
                    }
                    else
                    {
                        dotEdge.Label     = $"{common.labelGroup.Group}:[{common.labelKey.Label}]";
                        dotEdge.FontColor = Visualizer.ErrorColor;
                    }
                }
                else if (EdgeDiff.ExpectedOnlys.TryGetValue(pair, out var expectedOnly))
                {
                    dotEdge.Label     = $"{expectedOnly.Group} / ?";
                    dotEdge.FontColor = Visualizer.ErrorColor;
                }
            }
示例#2
0
            private void DecoreateSubgraph(Diff <UnorderedNTuple <int>, UnorderedNTuple <Label> > subgraphDiff, Dot.Edge dotEdge, NodePair <Node, UnorderedNTuple <Label> > pair, Label label, EdgeStatus edgeStatus, Recorder <Graph, Node, Edge, Label> .RecordOptions options)
            {
                if (subgraphDiff.Commons.TryGetValue(pair, out var common))
                {
                    groupMap.TryGetValue(common.labelGroup.Group, out var labels);

                    if (labels?.Count == 1)
                    {
                        dotEdge.Label = @$ "{common.labelGroup.Group}
{{{string.Join(", ", common.labelGroup.Children)}}}";
                    }
                    else
                    {
                        dotEdge.Label     = $"{common.labelGroup.Group}:[{common.labelKey.Label}]";
                        dotEdge.FontColor = Visualizer.ErrorColor;
                    }
                }
                else if (subgraphDiff.ExpectedOnlys.TryGetValue(pair, out var expectedOnly))
                {
                    dotEdge.Label     = @$ "{expectedOnly.Group} / ?
{{{string.Join(", ", common.labelGroup.Children)}}}";
                    dotEdge.FontColor = Visualizer.ErrorColor;
                }
                else if (subgraphDiff.Unmatches.TryGetValue(pair, out var unmatch))
                {
                    dotEdge.Label     = @$ "{unmatch.labelGroup.Group}
{{{string.Join(", ", unmatch.labelGroup.Children)}}} / {{{string.Join(", ", pair.Via.Select(sl => ResolveLabelGroup(sl)))}}}";