Deserializing\Serializing Custom Vertices

Topics: graph, serialization
Jun 16, 2015 at 5:51 PM
I have a custom Vertex
Class PocVertex
        public string member1
        public string  member2
         public string member10

public class POCEdge<TVertex> : Edge<TVertex>
        public string Tag { get; set; }

        public SysEdge(TVertex source, TVertex target)
            : base(source, target) { }

        public SysEdge(TVertex source, TVertex target, string tag)
            : this(source, target)
            Tag = tag;
I am having trouble deserializing, here is my code
AdjacencyGraph<POCVertex, POCEdge<POCVertex>> deserializedGraph 
                                    = new AdjacencyGraph<POCVertex, POCEdge<POCVertex>>();

XmlReader xreader = XmlReader.Create(XMLPath);
                IdentifiableVertexFactory<POCVertex> vertexFactory = new IdentifiableVertexFactory<POCVertex>();
                IdentifiableEdgeFactory<POCVertex, POCEdge<POCVertex>> edgeFactory;

                GraphMLExtensions.DeserializeFromGraphML<POCVertex, POCEdge<POCVertex>,
                    AdjacencyGraph<POCVertex, POCEdge<POCVertex>>>(deserializedGraph, xreader, vertexFactory, edgeFactory);
Can you please explain what does "IdentifiableVertexFactory" and "IdentifiableEdgeFactory" do, how should I use them here?
Jun 16, 2015 at 11:50 PM
Hi, if i remember correctly factories should implement methods to generate vertex and edge classes you use. Create custom factory classes for vertices and edges and use them in Deserialize method.
Jun 17, 2015 at 7:18 AM
Thanks, I got that resolved. Also, while using custom vertex and edges, do I need implement "IEqualityComparer" in order to use functions like
graph.TryGetOutEdges() and "HoffmanPavleyRankedShortestPathAlgorithm"?
Jun 17, 2015 at 3:35 PM
  What would be the best approach to update node\vertex.
Example : If I update a member of Vertex custom class.
Can you please suggest?
Jun 29, 2015 at 11:14 AM
I'm not a big expert in Quickgraph, you can look in the sources for method implementations to see what they use.

Not sure what you mean by updating, you just select vertex from the list and update data in it. If you need to use new data in calculations you just call corresponding method to regenerate results.