An implementation of the ALIAS method for Weighted Random Distributions