new Ratio(weights)
Create a ratio.
Parameters:
Name | Type | Description |
---|---|---|
weights |
Object.<string, integer> | Map representing pairs of key and weight. |
Example
new Ratio({key1: 1, key2: 2}); // => Ratio's instance