Skip to content

Commit f429699

Browse files
committed
Formatting, and removed region.
1 parent 3bde4e9 commit f429699

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Diff for: src/SharpNeat.Drawing/Graph/DepthLayoutScheme.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ public void Layout(
5252
Size layoutArea,
5353
Span<Point> nodePosByIdx)
5454
{
55-
if(nodePosByIdx.Length != digraph.TotalNodeCount) throw new ArgumentException("Node positions array length doesn't match the number of nodes in the graph.", nameof(nodePosByIdx));
55+
if(nodePosByIdx.Length != digraph.TotalNodeCount)
56+
throw new ArgumentException("Node positions array length doesn't match the number of nodes in the graph.", nameof(nodePosByIdx));
5657

5758
// Determine depth of each node.
5859
LightweightList<int>[] nodesByLayer = BuildNodesByLayer(digraph);
@@ -68,7 +69,8 @@ public void Layout(
6869
Span<Point> nodePosByIdx,
6970
ref object? layoutSchemeData)
7071
{
71-
if(nodePosByIdx.Length != digraph.TotalNodeCount) throw new ArgumentException("Node positions array length doesn't match the number of nodes in the graph.", nameof(nodePosByIdx));
72+
if(nodePosByIdx.Length != digraph.TotalNodeCount)
73+
throw new ArgumentException("Node positions array length doesn't match the number of nodes in the graph.", nameof(nodePosByIdx));
7274

7375
// Use previously determined depth info, if provided; otherwise calculate it and return via layoutSchemeData
7476
// parameter for future use.

Diff for: src/SharpNeat.Drawing/Graph/DirectedGraphViewModel.cs

-4
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ public sealed class DirectedGraphViewModel
3030
/// </summary>
3131
public Point[] NodePosByIdx { get; }
3232

33-
#region Construction
34-
3533
/// <summary>
3634
/// Construct with the provided digraph, weights, and node IDs.
3735
/// The node positions array is allocated, but must be updated with actual positions outside of this constructor.
@@ -83,6 +81,4 @@ public DirectedGraphViewModel(
8381
NodeIdByIdx = nodeIdByIdx;
8482
NodePosByIdx = nodePosByIdx;
8583
}
86-
87-
#endregion
8884
}

0 commit comments

Comments
 (0)