Skip to content

Commit

Permalink
Formatting, and removed region.
Browse files Browse the repository at this point in the history
  • Loading branch information
colgreen committed Dec 10, 2023
1 parent 3bde4e9 commit f429699
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/SharpNeat.Drawing/Graph/DepthLayoutScheme.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public void Layout(
Size layoutArea,
Span<Point> nodePosByIdx)
{
if(nodePosByIdx.Length != digraph.TotalNodeCount) throw new ArgumentException("Node positions array length doesn't match the number of nodes in the graph.", nameof(nodePosByIdx));
if(nodePosByIdx.Length != digraph.TotalNodeCount)
throw new ArgumentException("Node positions array length doesn't match the number of nodes in the graph.", nameof(nodePosByIdx));

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

// Use previously determined depth info, if provided; otherwise calculate it and return via layoutSchemeData
// parameter for future use.
Expand Down
4 changes: 0 additions & 4 deletions src/SharpNeat.Drawing/Graph/DirectedGraphViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ public sealed class DirectedGraphViewModel
/// </summary>
public Point[] NodePosByIdx { get; }

#region Construction

/// <summary>
/// Construct with the provided digraph, weights, and node IDs.
/// The node positions array is allocated, but must be updated with actual positions outside of this constructor.
Expand Down Expand Up @@ -83,6 +81,4 @@ public DirectedGraphViewModel(
NodeIdByIdx = nodeIdByIdx;
NodePosByIdx = nodePosByIdx;
}

#endregion
}

0 comments on commit f429699

Please sign in to comment.