localRetention function

Local retention of a connectivity matrix