More flexible generic weighted projection. Addresses #732
Merge pull request #770 from jtorrents/generic-projection

More flexible generic weighted projection. Addresses #732