Given a valid SFG, then a PG (presedence graph) should be able to be generated. The PG should describe the order of how operations are done given input and output in a SFG.
Thinking on how the code for this should be implemented and was choosing between having the code in the SFG class or in a new class called Precedence Graph, and decided that having it in a new class would probably be cleaner and more nice since the SFG class already is pretty large in the amount of lines of code.
It seems that in a normal SFG such as the material that this test case uses then output ports represent "nodes" and the operations which they travel through to manipulate the value are "edges", this is the reverse of how we normally view "edges" and "nodes" but I don't think that it matters that much since it only changes how they are represented graphically. Perhaps some functionality to name output ports and adding their names to output in some way would be good though.
Added another test case where the second register element is replaced with a Constant operation to test that all operations with no inputs are handled correctly.
Also add working implementation of the PrecedenceGraph constructor that correctly constructs the precedence graph from an SFG.
Will now move the code to the SFG since it was decided that it would better fit.
Just realised that currently the dependency of outputs isn't really handled, if an operation with two outputs but they have different dependencies then they will be bundled into the same dependencies anyway.