RandomWeightUtil

RandomWeightUtil

new RandomWeightUtil()

Source:
Author:
  • ycx
: 简单实现的随机权重工具类 todo

Methods

add(obj, weight) → {RandomWeightUtil}

Source:
添加权重对象
Parameters:
Name Type Description
obj Object 对象
weight number 权重值 需要配置 整数
Returns:
Type
RandomWeightUtil

clear() → {Object}

Source:
Returns:
Type
Object

next() → {Object}

Source:
Author:
  • ycx 获取下一个随机权重对象
Returns:
Type
Object