Support reference weight vector

It requires Groogna 4.0.4 or later.