Functions

Added all the functions used by Nevo’s algorithm