public static int JumpPointGibbs(int point, Random r, Matrix GoalFunc) { RandomLi rl = new RandomLi(r); int[] gfsize = GoalFunc.getSize(); double[] varprob = new double[gfsize[1]]; for (int i = 0; i < gfsize[1]; i++) { varprob[i] = GoalFunc.get(new int[] { 0, i }); } return rl.NextfromProbMass(varprob); }