/* SCCS %W% - %G% - %U% */ // Copyright: Copyright (c) 1997 University of Southern California Brain Project. // Copyright: This software may be freely copied provided the toplevel // Copyright: COPYRIGHT file is included with each such copy. // Copyright: Email nsl@java.usc.edu. //////////////////////////////////////////////////////////// // // Inverse routines // // package nslj.src.math; import nslj.src.lang.*; public class NslInverse { private static final double TINY=1.0e-20; private static int LUDecomposition(double[][] a, int[] index) { int i, imax, j, k, d, n; double big, dum, sum, temp; double vv[]; n = a.length; d = 1; vv = new double[n]; for (i=0; i big) big=temp; } if (big == 0.0) { System.err.println("Singular matrix in rutine NslInverse"); } vv[i] = 1.0/big; } imax=0; for (j=0; j= big) { big = dum; imax = i; } } if (j != imax) { for (k=0; k=0; i--) { sum=b[i]; for (j=i+1; j