From a3dd0cc616491c2dc0b2e32a4f5d59f3163e329a Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Fri, 23 Oct 2026 21:31:15 -0400 Subject: [PATCH] build: remove `jnp-hipo` dependence (a.k.a. HIPO 3) --- common-tools/clas-analysis/pom.xml | 5 - common-tools/clas-detector/pom.xml | 5 +- .../main/java/org/jlab/jnp/matrix/Matrix.java | 53 ++ .../java/org/jlab/jnp/matrix/Matrix5x5.java | 231 +++++ .../org/jlab/jnp/matrix/Matrix5x5_4x4.java | 788 ++++++++++++++++++ common-tools/clas-tracking/pom.xml | 4 - pom.xml | 19 - reconstruction/dc/pom.xml | 4 - reconstruction/eb/pom.xml | 2 +- reconstruction/fmt/pom.xml | 4 - reconstruction/mu/pom.xml | 4 - 11 files changed, 1076 insertions(+), 43 deletions(-) create mode 100644 common-tools/clas-physics/src/main/java/org/jlab/jnp/matrix/Matrix.java create mode 100644 common-tools/clas-physics/src/main/java/org/jlab/jnp/matrix/Matrix5x5.java create mode 100644 common-tools/clas-physics/src/main/java/org/jlab/jnp/matrix/Matrix5x5_4x4.java diff --git a/common-tools/clas-analysis/pom.xml b/common-tools/clas-analysis/pom.xml index dce86297aa..dfd4126df1 100644 --- a/common-tools/clas-analysis/pom.xml +++ b/common-tools/clas-analysis/pom.xml @@ -25,11 +25,6 @@ groot - - org.jlab.jnp - jnp-hipo - - org.jlab.jnp jnp-hipo4 diff --git a/common-tools/clas-detector/pom.xml b/common-tools/clas-detector/pom.xml index 997746fa38..c10feed476 100644 --- a/common-tools/clas-detector/pom.xml +++ b/common-tools/clas-detector/pom.xml @@ -26,8 +26,9 @@ - org.jlab.jnp - jnp-hipo + org.jlab.coda + jevio + jar-with-dependencies diff --git a/common-tools/clas-physics/src/main/java/org/jlab/jnp/matrix/Matrix.java b/common-tools/clas-physics/src/main/java/org/jlab/jnp/matrix/Matrix.java new file mode 100644 index 0000000000..2072794b04 --- /dev/null +++ b/common-tools/clas-physics/src/main/java/org/jlab/jnp/matrix/Matrix.java @@ -0,0 +1,53 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.jlab.jnp.matrix; + +/** + * + * @author gavalian + */ +public class Matrix { + + protected double M[][] = new double[5][5]; + + public Matrix(){ + + } + + public double get(int i, int j){ + return M[i][j]; + } + + public void reset(){ + for(int i = 0; i < 5; i++){ + for(int j = 0; j < 5; j++){ + M[i][j] = 0.0; + } + } + } + + + public void set(double A[][]){ + for(int i = 0; i < 5; i++){ + for(int j = 0; j < 5; j++){ + M[i][j] = A[i][j]; + } + } + } + + public void set(double... values){ + if(values.length<25){ + System.out.println("[jnp::matrix] error *** number of arguments = " + values.length + " , expected 25" ); + } else { + int count = 0; + for(int j = 0; j < 5; j++){ + for(int i = 0; i < 5; i++){ + M[i][j] = values[count]; count++; + } + } + } + } +} diff --git a/common-tools/clas-physics/src/main/java/org/jlab/jnp/matrix/Matrix5x5.java b/common-tools/clas-physics/src/main/java/org/jlab/jnp/matrix/Matrix5x5.java new file mode 100644 index 0000000000..c0b62ae0ba --- /dev/null +++ b/common-tools/clas-physics/src/main/java/org/jlab/jnp/matrix/Matrix5x5.java @@ -0,0 +1,231 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.jlab.jnp.matrix; + +/** + * + * @author gavalian + */ +public class Matrix5x5 { + public static double determinant(double A[][]){ + double D = + + A[0][0]*A[1][1]*A[2][2]*A[3][3]*A[4][4] + A[0][0]*A[1][1]*A[2][3]*A[3][4]*A[4][2] + A[0][0]*A[1][1]*A[2][4]*A[3][2]*A[4][3] +- A[0][0]*A[1][1]*A[2][4]*A[3][3]*A[4][2] - A[0][0]*A[1][1]*A[2][3]*A[3][2]*A[4][4] - A[0][0]*A[1][1]*A[2][2]*A[3][4]*A[4][3] +- A[0][0]*A[2][1]*A[1][2]*A[3][3]*A[4][4] - A[0][0]*A[2][1]*A[1][3]*A[3][4]*A[4][2] - A[0][0]*A[2][1]*A[1][4]*A[3][2]*A[4][3] ++ A[0][0]*A[2][1]*A[1][4]*A[3][3]*A[4][2] + A[0][0]*A[2][1]*A[1][3]*A[3][2]*A[4][4] + A[0][0]*A[2][1]*A[1][2]*A[3][4]*A[4][3] ++ A[0][0]*A[3][1]*A[1][2]*A[2][3]*A[4][4] + A[0][0]*A[3][1]*A[1][3]*A[2][4]*A[4][2] + A[0][0]*A[3][1]*A[1][4]*A[2][2]*A[4][3] +- A[0][0]*A[3][1]*A[1][4]*A[2][3]*A[4][2] - A[0][0]*A[3][1]*A[1][3]*A[2][2]*A[4][4] - A[0][0]*A[3][1]*A[1][2]*A[2][4]*A[4][3] +- A[0][0]*A[4][1]*A[1][2]*A[2][3]*A[3][4] - A[0][0]*A[4][1]*A[1][3]*A[2][4]*A[3][2] - A[0][0]*A[4][1]*A[1][4]*A[2][2]*A[3][3] ++ A[0][0]*A[4][1]*A[1][4]*A[2][3]*A[3][2] + A[0][0]*A[4][1]*A[1][3]*A[2][2]*A[3][4] + A[0][0]*A[4][1]*A[1][2]*A[2][4]*A[3][3] + +- A[1][0]*A[0][1]*A[2][2]*A[3][3]*A[4][4] - A[1][0]*A[0][1]*A[2][3]*A[3][4]*A[4][2] - A[1][0]*A[0][1]*A[2][4]*A[3][2]*A[4][3] ++ A[1][0]*A[0][1]*A[2][4]*A[3][3]*A[4][2] - A[1][0]*A[0][1]*A[2][3]*A[3][2]*A[4][4] - A[1][0]*A[0][1]*A[2][2]*A[3][4]*A[4][3] ++ A[1][0]*A[2][1]*A[0][2]*A[3][3]*A[4][4] + A[1][0]*A[2][1]*A[0][3]*A[3][4]*A[4][2] + A[1][0]*A[2][1]*A[0][4]*A[3][2]*A[4][3] +- A[1][0]*A[2][1]*A[0][4]*A[3][3]*A[4][2] - A[1][0]*A[2][1]*A[0][3]*A[3][2]*A[4][4] - A[1][0]*A[2][1]*A[0][2]*A[3][4]*A[4][3] +- A[1][0]*A[3][1]*A[0][2]*A[2][3]*A[4][4] - A[1][0]*A[3][1]*A[0][3]*A[2][4]*A[4][2] - A[1][0]*A[3][1]*A[0][4]*A[2][2]*A[4][3] ++ A[1][0]*A[3][1]*A[0][4]*A[2][3]*A[4][2] + A[1][0]*A[3][1]*A[0][3]*A[2][2]*A[4][4] + A[1][0]*A[3][1]*A[0][2]*A[2][4]*A[4][3] ++ A[1][0]*A[4][1]*A[0][2]*A[2][3]*A[3][4] + A[1][0]*A[4][1]*A[0][3]*A[2][4]*A[3][2] + A[1][0]*A[4][1]*A[0][4]*A[2][2]*A[3][3] +- A[1][0]*A[4][1]*A[0][4]*A[2][3]*A[3][2] - A[1][0]*A[4][1]*A[0][3]*A[2][2]*A[3][4] - A[1][0]*A[4][1]*A[0][2]*A[2][4]*A[3][3] + ++ A[2][0]*A[0][1]*A[1][2]*A[3][3]*A[4][4] + A[2][0]*A[0][1]*A[1][3]*A[3][4]*A[4][2] + A[2][0]*A[0][1]*A[1][4]*A[3][2]*A[4][3] +- A[2][0]*A[0][1]*A[1][4]*A[3][3]*A[4][2] - A[2][0]*A[0][1]*A[1][3]*A[3][2]*A[4][4] - A[2][0]*A[0][1]*A[1][2]*A[3][4]*A[4][3] +- A[2][0]*A[1][1]*A[0][2]*A[3][3]*A[4][4] - A[2][0]*A[1][1]*A[0][3]*A[3][4]*A[4][2] - A[2][0]*A[1][1]*A[0][4]*A[3][2]*A[4][3] +- A[2][0]*A[1][1]*A[0][4]*A[3][3]*A[4][2] - A[2][0]*A[1][1]*A[0][3]*A[3][2]*A[4][4] - A[2][0]*A[1][1]*A[0][2]*A[3][4]*A[4][3] ++ A[2][0]*A[3][1]*A[0][2]*A[1][3]*A[4][4] + A[2][0]*A[3][1]*A[0][3]*A[1][4]*A[4][2] + A[2][0]*A[3][1]*A[0][4]*A[1][2]*A[4][3] +- A[2][0]*A[3][1]*A[0][4]*A[1][3]*A[4][2] - A[2][0]*A[3][1]*A[0][3]*A[1][2]*A[4][4] - A[2][0]*A[3][1]*A[0][2]*A[1][4]*A[4][3] +- A[2][0]*A[4][1]*A[0][2]*A[1][3]*A[3][4] - A[2][0]*A[4][1]*A[0][3]*A[1][4]*A[3][2] - A[2][0]*A[4][1]*A[0][4]*A[1][2]*A[3][3] ++ A[2][0]*A[4][1]*A[0][4]*A[1][3]*A[3][2] + A[2][0]*A[4][1]*A[0][3]*A[1][2]*A[3][4] + A[2][0]*A[4][1]*A[0][2]*A[1][4]*A[3][3]; + + return D; + } + + public static void transpose(double A[][], double T[][]){ + for(int i = 0; i < 5; i++){ + for(int j = 0; j < 5; j++){ + T[j][i] = A[i][j]; + } + } + } + + public static void add(double A[][], double B[][], double C[][]){ + for(int i = 0; i < 5; i++){ + for(int j = 0; j < 5; j++){ + C[i][j] = A[i][j] + B[i][j]; + } + } + } + + public static double inverseOLD(double A[][], double I[][]){ + //Matrix5x5.transpose(A, I); + double det = Matrix5x5.determinant(A); + if(Math.abs(det)<1e-30) return det; + double factor = 1.0/det; + for(int i = 0; i < 5; i++){ + for(int j = 0; j < 5; j++){ + I[i][j] = A[j][i]*factor; + } + } + return det; + } + + public static void copy(double A[][], double B[][]){ + for(int i = 0; i < 5; i++){ + for(int j = 0; j < 5; j++){ + B[i][j] = A[i][j]; + } + } + } + + public static void copy(Matrix A, Matrix B){ + Matrix5x5.copy(A.M, B.M); + } + + public static double det(Matrix m){ + return Matrix5x5.determinant(m.M); + } + + public static void add(Matrix a, Matrix b, Matrix c){ + Matrix5x5.add(a.M, b.M, c.M); + } + public static double inverse(double A[][], double B[][], double adj[][]){ + + double det = 0.0; + + + adj[0][0] = Matrix5x5_4x4.determinant__00(A); + adj[0][1] = -Matrix5x5_4x4.determinant__01(A); + adj[0][2] = Matrix5x5_4x4.determinant__02(A); + adj[0][3] = -Matrix5x5_4x4.determinant__03(A); + adj[0][4] = Matrix5x5_4x4.determinant__04(A); + + adj[1][0] = -Matrix5x5_4x4.determinant__10(A); + adj[1][1] = Matrix5x5_4x4.determinant__11(A); + adj[1][2] = -Matrix5x5_4x4.determinant__12(A); + adj[1][3] = Matrix5x5_4x4.determinant__13(A); + adj[1][4] = -Matrix5x5_4x4.determinant__14(A); + + adj[2][0] = Matrix5x5_4x4.determinant__20(A); + adj[2][1] = -Matrix5x5_4x4.determinant__21(A); + adj[2][2] = Matrix5x5_4x4.determinant__22(A); + adj[2][3] = -Matrix5x5_4x4.determinant__23(A); + adj[2][4] = Matrix5x5_4x4.determinant__24(A); + + adj[3][0] = -Matrix5x5_4x4.determinant__30(A); + adj[3][1] = Matrix5x5_4x4.determinant__31(A); + adj[3][2] = -Matrix5x5_4x4.determinant__32(A); + adj[3][3] = Matrix5x5_4x4.determinant__33(A); + adj[3][4] = -Matrix5x5_4x4.determinant__34(A); + + adj[4][0] = Matrix5x5_4x4.determinant__40(A); + adj[4][1] = -Matrix5x5_4x4.determinant__41(A); + adj[4][2] = Matrix5x5_4x4.determinant__42(A); + adj[4][3] = -Matrix5x5_4x4.determinant__43(A); + adj[4][4] = Matrix5x5_4x4.determinant__44(A); + + for(int i = 0; i < 5; i++){ + det += A[i][0]*adj[i][0]; + } + + double factor = 1.0/det; + + for(int i = 0; i < 5; i++){ + for(int j = 0; j < 5; j++){ + B[i][j] = factor*adj[j][i]; + } + } + return det; + } + public static double inverse(Matrix source, Matrix inv, Matrix adj){ + double det = Matrix5x5.inverse(source.M, inv.M,adj.M); + return det; + } + + public static void show(Matrix matrix, String format){ + System.out.println("----------- MATRIX ------------"); + + StringBuilder str = new StringBuilder(); + str.append("{\n"); + for(int i = 0; i < 5; i++){ + str.append("{"); +// System.out.println(); + for(int j = 0; j < 5; j++){ + if(j!=0) str.append(","); + str.append(String.format(format, matrix.M[i][j])); + } + str.append(" }"); + if(i!=4) str.append(","); + str.append("\n"); + } + str.append("}\n"); + System.out.println(str.toString()); + } + + public static void show(Matrix matrix){ + Matrix5x5.show(matrix, "%12.6f "); + } + + public static void main(String[] args){ + + double A[][] = new double[][]{ + { 53.4644, -0.0000, 0.0005, -0.0000, -0.0000 }, + {-0.0000 ,4806.6062, -0.0000 , 0.0493, 0.0000 }, + { 0.0005 , -0.0000 , 0.0005 , -0.0000 , -0.0000 }, + { -0.0000 , 0.0493 , -0.0000 , 0.0425 , 0.0000 }, + { -0.0000 , 0.0000 , -0.0000 , 0.0000 , 0.0005} + + }; + + Matrix matrix = new Matrix(); + Matrix matrixS = new Matrix(); + + + /*matrix.set(5.0, -2.0, 2.0, 7.0, 1.0, + 1, 0, 0, 3, 4.5, + -3, 1, 5, 0, 1.5, + 3, -1, -9, 4,2.7, + 4.5,3.0,-1.0,0.0,7.0);*/ + matrixS.set( 53.4644, -0.0000, 0.0005, -0.0000, -0.0000, + -0.0000 ,4806.6062, -0.0000 , 0.0493, 0.0000, + 0.0005 , -0.0000 , 0.0005 , -0.0000 , -0.0000, + -0.0000 , 0.0493 , -0.0000 , 0.0425 , 0.0000 , + -0.0000 , 0.0000 , -0.0000 , 0.0000 , 0.0005); + matrix.set(A); + matrix.set( + 0.221861 , -0.205768 , 0.001885 , -0.002347 , 0.000156 , + -0.075577 , 4.653238 , 0.004701 , 0.056044 , 0.000315 , + 0.000155 , 0.007011 , 0.000012 , 0.000088 , 0.000006 , + -0.000703 , 0.056124 , 0.000061 , 0.000681 , 0.000010 , + 0.000158 , 0.000312 , 0.000006 , 0.000010 , 0.000011 ); + Matrix5x5.show(matrix); + Matrix5x5.show(matrixS); + for(int i = 0; i < 5; i++){ + System.err.println(i + " -> " + A[0][i] + " matrix = " + matrix.get(0, i)); + + } + System.out.println("-------------- END -----------------"); + + + Matrix m_inv = new Matrix(); + Matrix m_add = new Matrix(); + Matrix m_adj = new Matrix(); + // The inverse function returns the determinant + // if determinant is smaller than 1e-30, + // the matrix is not reversed. + double det = Matrix5x5.inverse(matrix, m_inv,m_adj); + + if(Math.abs(det)<1e-30){ + System.out.println("error: can't inverse the matrix...."); + } + System.out.println("determinant = " + det); + Matrix5x5.add(matrix, matrix, m_add); + + Matrix5x5.show(matrix); + Matrix5x5.show(m_add); + Matrix5x5.show(m_inv); + + + } +} diff --git a/common-tools/clas-physics/src/main/java/org/jlab/jnp/matrix/Matrix5x5_4x4.java b/common-tools/clas-physics/src/main/java/org/jlab/jnp/matrix/Matrix5x5_4x4.java new file mode 100644 index 0000000000..9efa969678 --- /dev/null +++ b/common-tools/clas-physics/src/main/java/org/jlab/jnp/matrix/Matrix5x5_4x4.java @@ -0,0 +1,788 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.jlab.jnp.matrix; + +/** + * + * @author gavalian + */ +public class Matrix5x5_4x4 { + public static double determinant__00(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[1][1]>1e-30) + t0 = A[1][1]*( + + A[2][2]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][2]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + + A[4][2]*(A[2][3]*A[3][4]-A[2][4]*A[3][3]) + ); + //if(A[2][1]>1e-30) + t1 = -A[2][1]*( + + A[1][2]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][2]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + + A[4][2]*(A[1][3]*A[3][4] - A[1][4]*A[3][3]) + ); + //if(A[3][1]>1e-30) + t2 = + A[3][1]*( + + A[1][2]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + - A[2][2]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + + A[4][2]*(A[1][3]*A[2][4] - A[1][4]*A[2][3]) + ); + //if(A[4][1]>1e-30) + t3 = - A[4][1]*( + + A[1][2]*(A[2][3]*A[3][4] - A[2][4]*A[3][3]) + - A[2][2]*(A[1][3]*A[3][4] - A[1][4]*A[3][3]) + + A[3][2]*(A[1][3]*A[2][4] - A[1][4]*A[2][3]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__01(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[1][0]>1e-30) + t0 = A[1][0]*( + + A[2][2]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][2]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + + A[4][2]*(A[2][3]*A[3][4]-A[2][4]*A[3][3]) + ); + //if(A[2][0]>1e-30) + t1 = -A[2][0]*( + + A[1][2]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][2]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + + A[4][2]*(A[1][3]*A[3][4] - A[1][4]*A[3][3]) + ); + //if(A[3][0]>1e-30) + t2 = + A[3][0]*( + + A[1][2]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + - A[2][2]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + + A[4][2]*(A[1][3]*A[2][4] - A[1][4]*A[2][3]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[1][2]*(A[2][3]*A[3][4] - A[2][4]*A[3][3]) + - A[2][2]*(A[1][3]*A[3][4] - A[1][4]*A[3][3]) + + A[3][2]*(A[1][3]*A[2][4] - A[1][4]*A[2][3]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__02(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[1][0]>1e-30) + t0 = A[1][0]*( + + A[2][1]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][1]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + + A[4][1]*(A[2][3]*A[3][4]-A[2][4]*A[3][3]) + ); + //if(A[2][0]>1e-30) + t1 = -A[2][0]*( + + A[1][1]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][1]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + + A[4][1]*(A[1][3]*A[3][4] - A[1][4]*A[3][3]) + ); + //if(A[3][0]>1e-30) + t2 = + A[3][0]*( + + A[1][1]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + - A[2][1]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + + A[4][1]*(A[1][3]*A[2][4] - A[1][4]*A[2][3]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[1][1]*(A[2][3]*A[3][4] - A[2][4]*A[3][3]) + - A[2][1]*(A[1][3]*A[3][4] - A[1][4]*A[3][3]) + + A[3][1]*(A[1][3]*A[2][4] - A[1][4]*A[2][3]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__03(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[1][0]>1e-30) + t0 = A[1][0]*( + + A[2][1]*(A[3][2]*A[4][4] - A[3][4]*A[4][2]) + - A[3][1]*(A[2][2]*A[4][4] - A[2][4]*A[4][2]) + + A[4][1]*(A[2][2]*A[3][4]-A[2][4]*A[3][2]) + ); + //if(A[2][0]>1e-30) + t1 = -A[2][0]*( + + A[1][1]*(A[3][2]*A[4][4] - A[3][4]*A[4][2]) + - A[3][1]*(A[1][2]*A[4][4] - A[1][4]*A[4][2]) + + A[4][1]*(A[1][2]*A[3][4] - A[1][4]*A[3][2]) + ); + //if(A[3][0]>1e-30) + t2 = + A[3][0]*( + + A[1][1]*(A[2][2]*A[4][4] - A[2][4]*A[4][2]) + - A[2][1]*(A[1][2]*A[4][4] - A[1][4]*A[4][2]) + + A[4][1]*(A[1][2]*A[2][4] - A[1][4]*A[2][2]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[1][1]*(A[2][2]*A[3][4] - A[2][4]*A[3][2]) + - A[2][1]*(A[1][2]*A[3][4] - A[1][4]*A[3][2]) + + A[3][1]*(A[1][2]*A[2][4] - A[1][4]*A[2][2]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__04(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[1][0]>1e-30) + t0 = A[1][0]*( + + A[2][1]*(A[3][2]*A[4][3] - A[3][3]*A[4][2]) + - A[3][1]*(A[2][2]*A[4][3] - A[2][3]*A[4][2]) + + A[4][1]*(A[2][2]*A[3][3]-A[2][3]*A[3][2]) + ); + //if(A[2][0]>1e-30) + t1 = -A[2][0]*( + + A[1][1]*(A[3][2]*A[4][3] - A[3][3]*A[4][2]) + - A[3][1]*(A[1][2]*A[4][3] - A[1][3]*A[4][2]) + + A[4][1]*(A[1][2]*A[3][3] - A[1][3]*A[3][2]) + ); + //if(A[3][0]>1e-30) + t2 = + A[3][0]*( + + A[1][1]*(A[2][2]*A[4][3] - A[2][3]*A[4][2]) + - A[2][1]*(A[1][2]*A[4][3] - A[1][3]*A[4][2]) + + A[4][1]*(A[1][2]*A[2][3] - A[1][3]*A[2][2]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[1][1]*(A[2][2]*A[3][3] - A[2][3]*A[3][2]) + - A[2][1]*(A[1][2]*A[3][3] - A[1][3]*A[3][2]) + + A[3][1]*(A[1][2]*A[2][3] - A[1][3]*A[2][2]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__10(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][1]>1e-30) + t0 = A[0][1]*( + + A[2][2]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][2]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + + A[4][2]*(A[2][3]*A[3][4]-A[2][4]*A[3][3]) + ); + //if(A[2][1]>1e-30) + t1 = -A[2][1]*( + + A[0][2]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][2]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][2]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + ); + //if(A[3][1]>1e-30) + t2 = + A[3][1]*( + + A[0][2]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + - A[2][2]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][2]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + ); + //if(A[4][1]>1e-30) + t3 = - A[4][1]*( + + A[0][2]*(A[2][3]*A[3][4] - A[2][4]*A[3][3]) + - A[2][2]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + + A[3][2]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__11(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[2][2]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][2]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + + A[4][2]*(A[2][3]*A[3][4]-A[2][4]*A[3][3]) + ); + //if(A[2][0]>1e-30) + t1 = -A[2][0]*( + + A[0][2]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][2]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][2]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + ); + //if(A[3][0]>1e-30) + t2 = + A[3][0]*( + + A[0][2]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + - A[2][2]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][2]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[0][2]*(A[2][3]*A[3][4] - A[2][4]*A[3][3]) + - A[2][2]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + + A[3][2]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__12(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[2][1]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][1]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + + A[4][1]*(A[2][3]*A[3][4]-A[2][4]*A[3][3]) + ); + //if(A[2][0]>1e-30) + t1 = -A[2][0]*( + + A[0][1]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][1]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][1]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + ); + //if(A[3][0]>1e-30) + t2 = + A[3][0]*( + + A[0][1]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + - A[2][1]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][1]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[0][1]*(A[2][3]*A[3][4] - A[2][4]*A[3][3]) + - A[2][1]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + + A[3][1]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__13(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[2][1]*(A[3][2]*A[4][4] - A[3][4]*A[4][2]) + - A[3][1]*(A[2][2]*A[4][4] - A[2][4]*A[4][2]) + + A[4][1]*(A[2][2]*A[3][4]-A[2][4]*A[3][2]) + ); + //if(A[2][0]>1e-30) + t1 = -A[2][0]*( + + A[0][1]*(A[3][2]*A[4][4] - A[3][4]*A[4][2]) + - A[3][1]*(A[0][2]*A[4][4] - A[0][4]*A[4][2]) + + A[4][1]*(A[0][2]*A[3][4] - A[0][4]*A[3][2]) + ); + //if(A[3][0]>1e-30) + t2 = + A[3][0]*( + + A[0][1]*(A[2][2]*A[4][4] - A[2][4]*A[4][2]) + - A[2][1]*(A[0][2]*A[4][4] - A[0][4]*A[4][2]) + + A[4][1]*(A[0][2]*A[2][4] - A[0][4]*A[2][2]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[0][1]*(A[2][2]*A[3][4] - A[2][4]*A[3][2]) + - A[2][1]*(A[0][2]*A[3][4] - A[0][4]*A[3][2]) + + A[3][1]*(A[0][2]*A[2][4] - A[0][4]*A[2][2]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__14(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[2][1]*(A[3][2]*A[4][3] - A[3][3]*A[4][2]) + - A[3][1]*(A[2][2]*A[4][3] - A[2][3]*A[4][2]) + + A[4][1]*(A[2][2]*A[3][3]-A[2][3]*A[3][2]) + ); + //if(A[2][0]>1e-30) + t1 = -A[2][0]*( + + A[0][1]*(A[3][2]*A[4][3] - A[3][3]*A[4][2]) + - A[3][1]*(A[0][2]*A[4][3] - A[0][3]*A[4][2]) + + A[4][1]*(A[0][2]*A[3][3] - A[0][3]*A[3][2]) + ); + //if(A[3][0]>1e-30) + t2 = + A[3][0]*( + + A[0][1]*(A[2][2]*A[4][3] - A[2][3]*A[4][2]) + - A[2][1]*(A[0][2]*A[4][3] - A[0][3]*A[4][2]) + + A[4][1]*(A[0][2]*A[2][3] - A[0][3]*A[2][2]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[0][1]*(A[2][2]*A[3][3] - A[2][3]*A[3][2]) + - A[2][1]*(A[0][2]*A[3][3] - A[0][3]*A[3][2]) + + A[3][1]*(A[0][2]*A[2][3] - A[0][3]*A[2][2]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__20(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][1]>1e-30) + t0 = A[0][1]*( + + A[1][2]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][2]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + + A[4][2]*(A[1][3]*A[3][4]-A[1][4]*A[3][3]) + ); + //if(A[1][1]>1e-30) + t1 = -A[1][1]*( + + A[0][2]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][2]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][2]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + ); + //if(A[3][1]>1e-30) + t2 = + A[3][1]*( + + A[0][2]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + - A[1][2]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][2]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + //if(A[4][1]>1e-30) + t3 = - A[4][1]*( + + A[0][2]*(A[1][3]*A[3][4] - A[1][4]*A[3][3]) + - A[1][2]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + + A[3][2]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__21(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[1][2]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][2]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + + A[4][2]*(A[1][3]*A[3][4]-A[1][4]*A[3][3]) + ); + //if(A[1][0]>1e-30) + t1 = -A[1][0]*( + + A[0][2]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][2]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][2]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + ); + //if(A[3][0]>1e-30) + t2 = + A[3][0]*( + + A[0][2]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + - A[1][2]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][2]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[0][2]*(A[1][3]*A[3][4] - A[1][4]*A[3][3]) + - A[1][2]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + + A[3][2]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__22(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[1][1]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][1]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + + A[4][1]*(A[1][3]*A[3][4]-A[1][4]*A[3][3]) + ); + //if(A[1][0]>1e-30) + t1 = -A[1][0]*( + + A[0][1]*(A[3][3]*A[4][4] - A[3][4]*A[4][3]) + - A[3][1]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][1]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + ); + //if(A[3][0]>1e-30) + t2 = + A[3][0]*( + + A[0][1]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + - A[1][1]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][1]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[0][1]*(A[1][3]*A[3][4] - A[1][4]*A[3][3]) + - A[1][1]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + + A[3][1]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__23(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[1][1]*(A[3][2]*A[4][4] - A[3][4]*A[4][2]) + - A[3][1]*(A[1][2]*A[4][4] - A[1][4]*A[4][2]) + + A[4][1]*(A[1][2]*A[3][4]-A[1][4]*A[3][2]) + ); + //if(A[1][0]>1e-30) + t1 = -A[1][0]*( + + A[0][1]*(A[3][2]*A[4][4] - A[3][4]*A[4][2]) + - A[3][1]*(A[0][2]*A[4][4] - A[0][4]*A[4][2]) + + A[4][1]*(A[0][2]*A[3][4] - A[0][4]*A[3][2]) + ); + //if(A[3][0]>1e-30) + t2 = + A[3][0]*( + + A[0][1]*(A[1][2]*A[4][4] - A[1][4]*A[4][2]) + - A[1][1]*(A[0][2]*A[4][4] - A[0][4]*A[4][2]) + + A[4][1]*(A[0][2]*A[1][4] - A[0][4]*A[1][2]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[0][1]*(A[1][2]*A[3][4] - A[1][4]*A[3][2]) + - A[1][1]*(A[0][2]*A[3][4] - A[0][4]*A[3][2]) + + A[3][1]*(A[0][2]*A[1][4] - A[0][4]*A[1][2]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__24(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[1][1]*(A[3][2]*A[4][3] - A[3][3]*A[4][2]) + - A[3][1]*(A[1][2]*A[4][3] - A[1][3]*A[4][2]) + + A[4][1]*(A[1][2]*A[3][3]-A[1][3]*A[3][2]) + ); + //if(A[1][0]>1e-30) + t1 = -A[1][0]*( + + A[0][1]*(A[3][2]*A[4][3] - A[3][3]*A[4][2]) + - A[3][1]*(A[0][2]*A[4][3] - A[0][3]*A[4][2]) + + A[4][1]*(A[0][2]*A[3][3] - A[0][3]*A[3][2]) + ); + //if(A[3][0]>1e-30) + t2 = + A[3][0]*( + + A[0][1]*(A[1][2]*A[4][3] - A[1][3]*A[4][2]) + - A[1][1]*(A[0][2]*A[4][3] - A[0][3]*A[4][2]) + + A[4][1]*(A[0][2]*A[1][3] - A[0][3]*A[1][2]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[0][1]*(A[1][2]*A[3][3] - A[1][3]*A[3][2]) + - A[1][1]*(A[0][2]*A[3][3] - A[0][3]*A[3][2]) + + A[3][1]*(A[0][2]*A[1][3] - A[0][3]*A[1][2]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__30(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][1]>1e-30) + t0 = A[0][1]*( + + A[1][2]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + - A[2][2]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + + A[4][2]*(A[1][3]*A[2][4]-A[1][4]*A[2][3]) + ); + //if(A[1][1]>1e-30) + t1 = -A[1][1]*( + + A[0][2]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + - A[2][2]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][2]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + ); + //if(A[2][1]>1e-30) + t2 = + A[2][1]*( + + A[0][2]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + - A[1][2]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][2]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + //if(A[4][1]>1e-30) + t3 = - A[4][1]*( + + A[0][2]*(A[1][3]*A[2][4] - A[1][4]*A[2][3]) + - A[1][2]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + + A[2][2]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__31(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[1][2]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + - A[2][2]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + + A[4][2]*(A[1][3]*A[2][4]-A[1][4]*A[2][3]) + ); + //if(A[1][0]>1e-30) + t1 = -A[1][0]*( + + A[0][2]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + - A[2][2]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][2]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + ); + //if(A[2][0]>1e-30) + t2 = + A[2][0]*( + + A[0][2]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + - A[1][2]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][2]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[0][2]*(A[1][3]*A[2][4] - A[1][4]*A[2][3]) + - A[1][2]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + + A[2][2]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__32(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[1][1]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + - A[2][1]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + + A[4][1]*(A[1][3]*A[2][4]-A[1][4]*A[2][3]) + ); + //if(A[1][0]>1e-30) + t1 = -A[1][0]*( + + A[0][1]*(A[2][3]*A[4][4] - A[2][4]*A[4][3]) + - A[2][1]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][1]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + ); + //if(A[2][0]>1e-30) + t2 = + A[2][0]*( + + A[0][1]*(A[1][3]*A[4][4] - A[1][4]*A[4][3]) + - A[1][1]*(A[0][3]*A[4][4] - A[0][4]*A[4][3]) + + A[4][1]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[0][1]*(A[1][3]*A[2][4] - A[1][4]*A[2][3]) + - A[1][1]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + + A[2][1]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__33(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[1][1]*(A[2][2]*A[4][4] - A[2][4]*A[4][2]) + - A[2][1]*(A[1][2]*A[4][4] - A[1][4]*A[4][2]) + + A[4][1]*(A[1][2]*A[2][4]-A[1][4]*A[2][2]) + ); + //if(A[1][0]>1e-30) + t1 = -A[1][0]*( + + A[0][1]*(A[2][2]*A[4][4] - A[2][4]*A[4][2]) + - A[2][1]*(A[0][2]*A[4][4] - A[0][4]*A[4][2]) + + A[4][1]*(A[0][2]*A[2][4] - A[0][4]*A[2][2]) + ); + //if(A[2][0]>1e-30) + t2 = + A[2][0]*( + + A[0][1]*(A[1][2]*A[4][4] - A[1][4]*A[4][2]) + - A[1][1]*(A[0][2]*A[4][4] - A[0][4]*A[4][2]) + + A[4][1]*(A[0][2]*A[1][4] - A[0][4]*A[1][2]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[0][1]*(A[1][2]*A[2][4] - A[1][4]*A[2][2]) + - A[1][1]*(A[0][2]*A[2][4] - A[0][4]*A[2][2]) + + A[2][1]*(A[0][2]*A[1][4] - A[0][4]*A[1][2]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__34(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[1][1]*(A[2][2]*A[4][3] - A[2][3]*A[4][2]) + - A[2][1]*(A[1][2]*A[4][3] - A[1][3]*A[4][2]) + + A[4][1]*(A[1][2]*A[2][3]-A[1][3]*A[2][2]) + ); + //if(A[1][0]>1e-30) + t1 = -A[1][0]*( + + A[0][1]*(A[2][2]*A[4][3] - A[2][3]*A[4][2]) + - A[2][1]*(A[0][2]*A[4][3] - A[0][3]*A[4][2]) + + A[4][1]*(A[0][2]*A[2][3] - A[0][3]*A[2][2]) + ); + //if(A[2][0]>1e-30) + t2 = + A[2][0]*( + + A[0][1]*(A[1][2]*A[4][3] - A[1][3]*A[4][2]) + - A[1][1]*(A[0][2]*A[4][3] - A[0][3]*A[4][2]) + + A[4][1]*(A[0][2]*A[1][3] - A[0][3]*A[1][2]) + ); + //if(A[4][0]>1e-30) + t3 = - A[4][0]*( + + A[0][1]*(A[1][2]*A[2][3] - A[1][3]*A[2][2]) + - A[1][1]*(A[0][2]*A[2][3] - A[0][3]*A[2][2]) + + A[2][1]*(A[0][2]*A[1][3] - A[0][3]*A[1][2]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__40(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][1]>1e-30) + t0 = A[0][1]*( + + A[1][2]*(A[2][3]*A[3][4] - A[2][4]*A[3][3]) + - A[2][2]*(A[1][3]*A[3][4] - A[1][4]*A[3][3]) + + A[3][2]*(A[1][3]*A[2][4]-A[1][4]*A[2][3]) + ); + //if(A[1][1]>1e-30) + t1 = -A[1][1]*( + + A[0][2]*(A[2][3]*A[3][4] - A[2][4]*A[3][3]) + - A[2][2]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + + A[3][2]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + ); + //if(A[2][1]>1e-30) + t2 = + A[2][1]*( + + A[0][2]*(A[1][3]*A[3][4] - A[1][4]*A[3][3]) + - A[1][2]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + + A[3][2]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + //if(A[3][1]>1e-30) + t3 = - A[3][1]*( + + A[0][2]*(A[1][3]*A[2][4] - A[1][4]*A[2][3]) + - A[1][2]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + + A[2][2]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__41(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[1][2]*(A[2][3]*A[3][4] - A[2][4]*A[3][3]) + - A[2][2]*(A[1][3]*A[3][4] - A[1][4]*A[3][3]) + + A[3][2]*(A[1][3]*A[2][4]-A[1][4]*A[2][3]) + ); + //if(A[1][0]>1e-30) + t1 = -A[1][0]*( + + A[0][2]*(A[2][3]*A[3][4] - A[2][4]*A[3][3]) + - A[2][2]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + + A[3][2]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + ); + //if(A[2][0]>1e-30) + t2 = + A[2][0]*( + + A[0][2]*(A[1][3]*A[3][4] - A[1][4]*A[3][3]) + - A[1][2]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + + A[3][2]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + //if(A[3][0]>1e-30) + t3 = - A[3][0]*( + + A[0][2]*(A[1][3]*A[2][4] - A[1][4]*A[2][3]) + - A[1][2]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + + A[2][2]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__42(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[1][1]*(A[2][3]*A[3][4] - A[2][4]*A[3][3]) + - A[2][1]*(A[1][3]*A[3][4] - A[1][4]*A[3][3]) + + A[3][1]*(A[1][3]*A[2][4]-A[1][4]*A[2][3]) + ); + //if(A[1][0]>1e-30) + t1 = -A[1][0]*( + + A[0][1]*(A[2][3]*A[3][4] - A[2][4]*A[3][3]) + - A[2][1]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + + A[3][1]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + ); + //if(A[2][0]>1e-30) + t2 = + A[2][0]*( + + A[0][1]*(A[1][3]*A[3][4] - A[1][4]*A[3][3]) + - A[1][1]*(A[0][3]*A[3][4] - A[0][4]*A[3][3]) + + A[3][1]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + //if(A[3][0]>1e-30) + t3 = - A[3][0]*( + + A[0][1]*(A[1][3]*A[2][4] - A[1][4]*A[2][3]) + - A[1][1]*(A[0][3]*A[2][4] - A[0][4]*A[2][3]) + + A[2][1]*(A[0][3]*A[1][4] - A[0][4]*A[1][3]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__43(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[1][1]*(A[2][2]*A[3][4] - A[2][4]*A[3][2]) + - A[2][1]*(A[1][2]*A[3][4] - A[1][4]*A[3][2]) + + A[3][1]*(A[1][2]*A[2][4]-A[1][4]*A[2][2]) + ); + //if(A[1][0]>1e-30) + t1 = -A[1][0]*( + + A[0][1]*(A[2][2]*A[3][4] - A[2][4]*A[3][2]) + - A[2][1]*(A[0][2]*A[3][4] - A[0][4]*A[3][2]) + + A[3][1]*(A[0][2]*A[2][4] - A[0][4]*A[2][2]) + ); + //if(A[2][0]>1e-30) + t2 = + A[2][0]*( + + A[0][1]*(A[1][2]*A[3][4] - A[1][4]*A[3][2]) + - A[1][1]*(A[0][2]*A[3][4] - A[0][4]*A[3][2]) + + A[3][1]*(A[0][2]*A[1][4] - A[0][4]*A[1][2]) + ); + //if(A[3][0]>1e-30) + t3 = - A[3][0]*( + + A[0][1]*(A[1][2]*A[2][4] - A[1][4]*A[2][2]) + - A[1][1]*(A[0][2]*A[2][4] - A[0][4]*A[2][2]) + + A[2][1]*(A[0][2]*A[1][4] - A[0][4]*A[1][2]) + ); + return t0 + t1 + t2 + t3; + } + public static double determinant__44(double A[][]){ + double t0 = 0.0; + double t1 = 0.0; + double t2 = 0.0; + double t3 = 0.0; + //if(A[0][0]>1e-30) + t0 = A[0][0]*( + + A[1][1]*(A[2][2]*A[3][3] - A[2][3]*A[3][2]) + - A[2][1]*(A[1][2]*A[3][3] - A[1][3]*A[3][2]) + + A[3][1]*(A[1][2]*A[2][3]-A[1][3]*A[2][2]) + ); + //if(A[1][0]>1e-30) + t1 = -A[1][0]*( + + A[0][1]*(A[2][2]*A[3][3] - A[2][3]*A[3][2]) + - A[2][1]*(A[0][2]*A[3][3] - A[0][3]*A[3][2]) + + A[3][1]*(A[0][2]*A[2][3] - A[0][3]*A[2][2]) + ); + //if(A[2][0]>1e-30) + t2 = + A[2][0]*( + + A[0][1]*(A[1][2]*A[3][3] - A[1][3]*A[3][2]) + - A[1][1]*(A[0][2]*A[3][3] - A[0][3]*A[3][2]) + + A[3][1]*(A[0][2]*A[1][3] - A[0][3]*A[1][2]) + ); + //if(A[3][0]>1e-30) + t3 = - A[3][0]*( + + A[0][1]*(A[1][2]*A[2][3] - A[1][3]*A[2][2]) + - A[1][1]*(A[0][2]*A[2][3] - A[0][3]*A[2][2]) + + A[2][1]*(A[0][2]*A[1][3] - A[0][3]*A[1][2]) + ); + return t0 + t1 + t2 + t3; + } +} diff --git a/common-tools/clas-tracking/pom.xml b/common-tools/clas-tracking/pom.xml index 6de3ed7f02..de23f6ed04 100644 --- a/common-tools/clas-tracking/pom.xml +++ b/common-tools/clas-tracking/pom.xml @@ -18,10 +18,6 @@ org.apache.commons commons-math3 - - org.jlab.jnp - jnp-hipo - org.ejml ejml-simple diff --git a/pom.xml b/pom.xml index 75d44e91f3..0337c9b06c 100644 --- a/pom.xml +++ b/pom.xml @@ -184,12 +184,6 @@ 14.0 - - org.jlab.jnp - jnp-hipo - 2.0-SNAPSHOT - - org.jlab.jnp jnp-hipo4 @@ -255,19 +249,6 @@ import - - - net.objecthunter - exp4j - 0.4.8 - -