simogeo/geostats — pull request #18 by cricri (2014-04-10 09:34:15+00:00)
Title: fix the quantiles computation

Some bugs in getClassQuantile:

```javascript
var v = [1,2,3,4,5,6,7,8,9,10,11,12];
var classifier = new geostats(v);

classifier.getClassQuantile(8)
// [ '1', '3', '5', '7', '9', '11', undefined, undefined, '12' ]

classifier.getClassQuantile(12)
// [ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '12' ]
```

The meaning of the bounds is not clear for me. Are the bounds included in the class or not?

I dont want to break you api. I have added a method ````getQuantiles```` which returns the quantiles of the data, and ````getClassQuantile```` returns as before the bounds, ie the smallest data, the quantiles and the greatest data. On large datasets, the difference wont be noticeable.

With the patch:
````javascript
classifier.getClassQuantile(8)
// [ '1', '2', '4', '5', '7', '8', '10', '11', '12' ]

classifier.getClassQuantile(12)
// [ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12' ]

classifier.getClassQuantile(5)
// before: [ '1', '3', '5', '7', '9', '12' ]
// patch: [ '1', '3', '5', '8', '10', '12' ]
````