Commit 00ee02bf by Tobias WEBER

### testing

parent 44915573
 ... ... @@ -11,6 +11,14 @@ public class Calc /** * r_i = x_i + y_i */ /*@ requires x.length == y.length; ensures \result.length == x.length; ensures (\forall int i; 0<=i && i<\result.length; \result[i] - (x[i] + y[i]) < 1e-6 || -(\result[i] - (x[i] + y[i])) < 1e-6); @*/ public static double[] add(double[] x, double[] y) throws Exception { ... ... @@ -29,6 +37,14 @@ public class Calc /** * r_i = x_i - y_i */ /*@ requires x.length == y.length; ensures \result.length == x.length; ensures (\forall int i; 0<=i && i<\result.length; \result[i] - (x[i] - y[i]) < 1e-6 || -(\result[i] - (x[i] - y[i])) < 1e-6); @*/ public static double[] sub(double[] x, double[] y) throws Exception { ... ... @@ -47,6 +63,13 @@ public class Calc /** * r_i = x_i * d */ /*@ ensures \result.length == x.length; ensures (\forall int i; 0<=i && i<\result.length; \result[i] - x[i]*d < 1e-6 || -(\result[i] - x[i]*d) < 1e-6); @*/ public static double[] mul(double[] x, double d) throws Exception { ... ... @@ -63,6 +86,13 @@ public class Calc /** * r_i = d * x_i */ /*@ ensures \result.length == x.length; ensures (\forall int i; 0<=i && i<\result.length; \result[i] - x[i]*d < 1e-6 || -(\result[i] - x[i]*d) < 1e-6); @*/ public static double[] mul(double d, double[] x) throws Exception { ... ... @@ -73,6 +103,13 @@ public class Calc /** * r_i = x_i / d */ /*@ ensures \result.length == x.length; ensures (\forall int i; 0<=i && i<\result.length; \result[i] - x[i]/d < 1e-6 || -(\result[i] - x[i]/d) < 1e-6); @*/ public static double[] div(double[] x, double d) throws Exception { ... ... @@ -294,7 +331,7 @@ public class Calc { if(_j == j) continue; R[_i2][_j2] = M[_i][_j]; ++_j2; } ... ... @@ -312,7 +349,7 @@ public class Calc for(int i=0; i
 ... ... @@ -48,7 +48,7 @@ public class TasCalc lattice[1] * cs[2], lattice[1] * s2, 0. }, }, { lattice[2] * cs[1], lattice[2] * (cs[0]-cs[1]*cs[2]) / s2, ... ... @@ -95,7 +95,7 @@ public class TasCalc U_invA[1][i] = orient2_invA[i]; U_invA[2][i] = orientup_invA[i]; } double[][] UB = Calc.dot(U_invA, B); return UB; } ... ... @@ -138,7 +138,7 @@ public class TasCalc double c = (ki*ki + kf*kf - Q*Q) / (2.*ki*kf); return Math.acos(c); } /** * scattering triangle ... ... @@ -160,7 +160,7 @@ public class TasCalc double c = (ki*ki + Q*Q - kf*kf) / (2.*ki*Q); return sense * Math.acos(c); } /** * scattering triangle ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment