I've just noticed that you ignore the parameter to `init()` here, and in all the other weighting schemes you have added.

That's a bug - you need to take this parameter and multiply all weight values returned by this object by it - it's used to implement OP_SCALE_WEIGHT, so currently that won't work properly with the new weighting schemes.