Closed Kemsekov closed 6 months ago
Actually, I have been thinking over it and doing some stuff, and the the end I just abstracted away all properties of node and edge into dictionary under each node and edge, which is more convenient and allows to store any information needed, and I am pretty much happy rn how it works
1) Divide all functional of algorithms into inheritance chain.
Aka add algorithm base class, interfaces, so there could be different spanning tree implementations that works on same interface.
Do not contain all implementations in same partial class, keep the class and methods, but move implementations aside into dedicated classes.
Your code base is just unmovable, when needed to use different implementations, all algorithms is basically hardcoded.
2) Basic functional for edge source and node source should not be implemented from static extensions.
Following same logic, when you will need to override some graph logic, you will not be able to.
3) Algorithm and it's result must reside in different classes. Like
GreedyColoring
must have methodColor()
that returnsColoringResult
instance3) in theory, you should fix your tests mess, but it is not so important now.