Skip to content

Commit 684919b

Browse files
committed
GraphML deserialization use IMutableVertexAndEdgeSet rather than IMutableVertexAndEdgeListGraph.
This allow to use GraphML serialization extensions on undirected graphs.
1 parent 24a34bc commit 684919b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/QuikGraph.Serialization/GraphMLExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public static void DeserializeFromGraphML<TVertex, TEdge, TGraph>(
168168
[NotNull] IdentifiableVertexFactory<TVertex> vertexFactory,
169169
[NotNull] IdentifiableEdgeFactory<TVertex, TEdge> edgeFactory)
170170
where TEdge : IEdge<TVertex>
171-
where TGraph : IMutableVertexAndEdgeListGraph<TVertex, TEdge>
171+
where TGraph : IMutableVertexAndEdgeSet<TVertex, TEdge>
172172
{
173173
var serializer = new GraphMLDeserializer<TVertex, TEdge, TGraph>();
174174
serializer.Deserialize(reader, graph, vertexFactory, edgeFactory);
@@ -198,7 +198,7 @@ public static void DeserializeFromGraphML<TVertex, TEdge, TGraph>(
198198
[NotNull] IdentifiableVertexFactory<TVertex> vertexFactory,
199199
[NotNull] IdentifiableEdgeFactory<TVertex, TEdge> edgeFactory)
200200
where TEdge : IEdge<TVertex>
201-
where TGraph : IMutableVertexAndEdgeListGraph<TVertex, TEdge>
201+
where TGraph : IMutableVertexAndEdgeSet<TVertex, TEdge>
202202
{
203203
if (reader is null)
204204
throw new ArgumentNullException(nameof(reader));
@@ -247,7 +247,7 @@ public static void DeserializeFromGraphML<TVertex, TEdge, TGraph>(
247247
[NotNull] IdentifiableVertexFactory<TVertex> vertexFactory,
248248
[NotNull] IdentifiableEdgeFactory<TVertex, TEdge> edgeFactory)
249249
where TEdge : IEdge<TVertex>
250-
where TGraph : IMutableVertexAndEdgeListGraph<TVertex, TEdge>
250+
where TGraph : IMutableVertexAndEdgeSet<TVertex, TEdge>
251251
{
252252
if (string.IsNullOrEmpty(filePath))
253253
throw new ArgumentException("Must provide a file path.", nameof(filePath));
@@ -284,7 +284,7 @@ public static void DeserializeAndValidateFromGraphML<TVertex, TEdge, TGraph>(
284284
[NotNull] IdentifiableVertexFactory<TVertex> vertexFactory,
285285
[NotNull] IdentifiableEdgeFactory<TVertex, TEdge> edgeFactory)
286286
where TEdge : IEdge<TVertex>
287-
where TGraph : IMutableVertexAndEdgeListGraph<TVertex, TEdge>
287+
where TGraph : IMutableVertexAndEdgeSet<TVertex, TEdge>
288288
{
289289
if (reader is null)
290290
throw new ArgumentNullException(nameof(reader));

0 commit comments

Comments
 (0)