Persistent homology and partial matching of shapes