Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def rosen(point: PointND): Double = {
- val c: Double = point.getDim / 2
- val dimR = c.asInstanceOf[Int]
- for (i <- 0 until dimR) {
- r = r + (100 * (Math.pow(point.getData(2*i), 2) - point
- .getData(2*i+1)) + Math.pow( Math.pow(point.getData(2*i), 2)-
- 1, 2))
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement