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

Rename private members to follow naming convention

parent 34dafa97
No related branches found
No related tags found
1 merge request!28Rework the algorithm that chooses colors for DOT output
......@@ -8,8 +8,8 @@ namespace SparseTransform.Convert
public class ColoredDotWriter : DotWriter
{
private IGraph _coloredGraph;
private bool textcolor;
private string[] dictColor = new string[65];
private bool _textcolor;
private string[] _dictColor = new string[65];
/// <summary>
/// Constructor constructing a color-dictionary for coloring purpose.
......@@ -18,7 +18,7 @@ namespace SparseTransform.Convert
public ColoredDotWriter(IGraph graph, bool textColor)
{
this._coloredGraph = graph;
this.textcolor = textColor;
this._textcolor = textColor;
for (int i = 0; i <= 3; i++)
{
......@@ -26,7 +26,7 @@ namespace SparseTransform.Convert
{
for (int k = 0; k <= 4; k++)
{
dictColor[i * 16 + j * 4 + k] = ("#" + (255 - i * 60).ToString("X2") + (255 - j * 60).ToString("X2") + (255 - k * 60).ToString("X2"));
_dictColor[i * 16 + j * 4 + k] = ("#" + (255 - i * 60).ToString("X2") + (255 - j * 60).ToString("X2") + (255 - k * 60).ToString("X2"));
}
}
}
......@@ -40,13 +40,13 @@ namespace SparseTransform.Convert
/// <returns></returns>
public override String NodeLabel(GraphNode node, String prefix)
{
if (textcolor || node.Color > 64)
if (_textcolor || node.Color > 64)
{
return "\t" + prefix + node.Index + " [shape=circle, style=filled, label=\"" + prefix + node.Index + "\\n Farbe " + node.Color + "\"]";
}
else
{
return "\t" + prefix + node.Index + " [shape=circle, style=filled, fillcolor=\"" + dictColor[node.Color] + "\"]";
return "\t" + prefix + node.Index + " [shape=circle, style=filled, fillcolor=\"" + _dictColor[node.Color] + "\"]";
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment