weighted diagraph