I was checking on the web, but I didn't find an answer.
Do you guys know if in NetworkX is possible to define a node as a subgraph?
Let me pose the question better: I have a graph composed of some nodes that are shapes (square, circle, triangle, etc.). I want now to define each node as a subgraph. The nodes of the subgraph should be the corner points of the shape (for triangle: subgraph of 3 nodes since there are 3 corner points). And this subgraph creation, of course, should not affect the starting graph.
Example:
- DiGraph composed of 2 nodes: "square" and "triangle".
- Edge between "square" and "triangle"
- Node "square" is a subgraph containing 4 nodes (1 for each corner point);
- Edges connecting these nodes;
- Node "triangle" is a subgraph containing 3 nodes (1 for each corner point);
- Edges connecting these nodes.
Is it possible to do it in NetworkX? Any help or suggestion is apreciated.