Pre-Compute weights