Kemsekov / GraphSharp

GraphSharp is a tool to study and use knowledge of graph theory in C#!
MIT License
37 stars 5 forks source link

Minimize all interfaces #69

Closed Kemsekov closed 1 year ago

Kemsekov commented 1 year ago

Remove all additional data from INode and IEdge to just contains minimum possible data

Kemsekov commented 1 year ago

It would just take too much to redo all of this... I prefer to land implementation of properties getter/setters to nodes and edges themselfs. Like you could pass a reference to dictionary with colors of nodes to each node itself. Yeah, this implementation sucks because you cannot just pass different weights, colors, positions to any method working with corresponding properties right away, but well you could make a mediator for all nodes and edges that will be able to give and set any kind of data, and change data inside of single mediator so it will change properties of all nodes and edges themselfs as well. There is a way to do work-around with this. I prefer simplicity so currently just assume you will store all data about node and edge in themselfs.