/********************************************************************* * Example Java class, implementing the area calculation of the * Polygon example as black box Java functions, both with and without * returning self-calculated derivatives * * @author Z.Csizmadia, (c) 2018 Fair Isaac Corporation *********************************************************************/ public class Polygon { public static double CalculateArea(double[] rho, double[] theta) { double area = 0; int N = rho.length; assert rho.length == theta.length; // Calculate the area for (int i=1;i