Added a pdist-like approach to save memory
Merge pull request #2 from asiviero/master

Added a pdist-like approach to save memory