periphery and centre functions for graphs added.

Test cases not written yet.