Add new function for block--by-block computation avoiding edge effects.
Fix comment.