I'm trying to implement this algorithm implementation on weighted graph. Does the library support it? If yes, how can I use that feature?