Describe the bug
Documentation about edgeCapacity is leading into belief that it is equivalent to vertexCapacity while it actually results in allocation of "edgeCapacity" entries for each vertex.
To Reproduce
Steps to reproduce the behavior:
var graph = new BidirectionalGraph<SegmentVertex, SegmentEdge<TSegment>>(allowParallelEdges: true, vertexCapacity: segments.Length, edgeCapacity: segments.Length);
. . .
graph.AddVertexRange(vertices); // <<<< OOM because it allocates 2 * segments.Length * segment.Length objects
// 2x because it allocates in and out collections
// segment.Length * segment.Length because for each vertex it allocates edgeCapacity expected edges.
Expected behavior
A clear and concise description of what edgeCapacity is for - expected valency of vertices.
Describe the bug Documentation about edgeCapacity is leading into belief that it is equivalent to vertexCapacity while it actually results in allocation of "edgeCapacity" entries for each vertex.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what edgeCapacity is for - expected valency of vertices.