(points)
| 8822 | } |
| 8823 | |
| 8824 | function circumcenter(points) { |
| 8825 | if(points.length === 0) { |
| 8826 | return [] |
| 8827 | } |
| 8828 | var D = points[0].length |
| 8829 | var result = dup([D]) |
| 8830 | var weights = barycentricCircumcenter(points) |
| 8831 | for(var i=0; i<points.length; ++i) { |
| 8832 | for(var j=0; j<D; ++j) { |
| 8833 | result[j] += points[i][j] * weights[i] |
| 8834 | } |
| 8835 | } |
| 8836 | return result |
| 8837 | } |
| 8838 | |
| 8839 | circumcenter.barycenetric = barycentricCircumcenter |
| 8840 | module.exports = circumcenter |
no test coverage detected
searching dependent graphs…