CXXGraph icon indicating copy to clipboard operation
CXXGraph copied to clipboard

Mixed Type Graph

Open ZigRazor opened this issue 2 years ago • 4 comments

          I Think it's also useful work on mixed type graph (a graph that can contains different type of node or edges).

But it can be another issue.

Originally posted by @ZigRazor in https://github.com/ZigRazor/CXXGraph/issues/284#issuecomment-1546608478

ZigRazor avatar May 15 '23 09:05 ZigRazor

I was thinking about this. Maybe this could be done by adding a layer of inheritance to the Nodes, similar to the structure of the Edges. We could simplify Node so that it only contains the node indexes (and is not templated any more), and then define another class (DataNode maybe?) which is defined as:

template <typename T>
class DataNode : public Node {};

So in this way all the different types of nodes would be derived from the same base class, and we should be able to use different node types in the same graph.

Let me know what you think.

sbaldu avatar Oct 09 '23 08:10 sbaldu

Good Idea! I think we can proced. This is possible also because we already have an API break, so next release can contains this interface changes! What do you think @nrkramer?

ZigRazor avatar Oct 09 '23 08:10 ZigRazor

Good Idea! I think we can proced.

If you want I can work on this.

sbaldu avatar Oct 09 '23 13:10 sbaldu

Good Idea! I think we can proced.

If you want I can work on this.

Yes, you can work on it!

ZigRazor avatar Oct 09 '23 13:10 ZigRazor