Implementation of skeleton approximation algorithm