Skip to content
Snippets Groups Projects
Commit 34dafa97 authored by Paul Nitzke's avatar Paul Nitzke
Browse files

Add graph to constructor and store it

* Required for getting the number of colors used in coloring
parent ae071454
No related branches found
No related tags found
1 merge request!28Rework the algorithm that chooses colors for DOT output
......@@ -40,7 +40,7 @@ namespace SparseTransform
}
else
color.PartialD2Color((BipartiteGraph)graph);
ColoredDotWriter writer = new ColoredDotWriter(textColor);
ColoredDotWriter writer = new ColoredDotWriter(graph, textColor);
return writer.Write(graph);
}
......
......@@ -7,6 +7,7 @@ namespace SparseTransform.Convert
/// </summary>
public class ColoredDotWriter : DotWriter
{
private IGraph _coloredGraph;
private bool textcolor;
private string[] dictColor = new string[65];
......@@ -14,8 +15,9 @@ namespace SparseTransform.Convert
/// Constructor constructing a color-dictionary for coloring purpose.
/// </summary>
/// <param name="textColor">decision whether the labels should be colored or labelled.</param>
public ColoredDotWriter(bool textColor)
public ColoredDotWriter(IGraph graph, bool textColor)
{
this._coloredGraph = graph;
this.textcolor = textColor;
for (int i = 0; i <= 3; i++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment