X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemia%2FEEOver.fs;h=2bd13b2f6faeb744e0f0d62bfb83bf985965df11;hp=5a3c9e4c580be0c6f6feb74a71c8503a261d1bb1;hb=81d1b86719a1ebaf649c1de4c1364603155a53e1;hpb=aaa250fab2ac3227bf45704355d389bc1a4ee7fc diff --git a/Parasitemia/Parasitemia/EEOver.fs b/Parasitemia/Parasitemia/EEOver.fs index 5a3c9e4..2bd13b2 100644 --- a/Parasitemia/Parasitemia/EEOver.fs +++ b/Parasitemia/Parasitemia/EEOver.fs @@ -69,7 +69,6 @@ let private istanpt (x: float) (y: float) (a1: float) (b1: float) (aa: float) (b then TANGENT_POINT else INTERSECTION_POINT - let private twointpts (x: float[]) (y: float[]) (a1: float) (b1: float) (phi_1: float) (a2: float) (b2: float) (h2_tr: float) (k2_tr: float) (phi_2: float) (aa: float) (bb: float) (cc: float) (dd: float) (ee: float) (ff: float) = if abs x.[0] > a1 then x.[0] <- if x.[0] < 0.0 then -a1 else a1 @@ -181,7 +180,6 @@ let private twointpts (x: float[]) (y: float[]) (a1: float) (b1: float) (phi_1: area1 + area2 - let private threeintpts (xint: float[]) (yint: float[]) (a1: float) (b1: float) (phi_1: float) (a2: float) (b2: float) (h2_tr: float) (k2_tr: float) (phi_2: float) (aa: float) (bb: float) (cc: float) (dd: float) (ee: float) (ff: float) : float = let mutable tanpts = 0 let mutable tanindex = 0 @@ -218,7 +216,7 @@ let private fourintpts (xint: float[]) (yint: float[]) (a1: float) (b1: float) ( let theta = Array.zeroCreate 4 - for i in 0..3 do + for i in 0 .. 3 do if abs xint.[i] > a1 then xint.[i] <- if xint.[i] < 0.0 then -a1 else a1 @@ -229,7 +227,7 @@ let private fourintpts (xint: float[]) (yint: float[]) (a1: float) (b1: float) ( printf "k=%d: Theta = %f, xint=%f, yint=%f\n" k theta.[k] xint.[k] yint.[k] #endif - for j in 1..3 do + for j in 1 .. 3 do let tmp0 = theta.[j] let tmp1 = xint.[j] let tmp2 = yint.[j] @@ -334,7 +332,6 @@ let private fourintpts (xint: float[]) (yint: float[]) (a1: float) (b1: float) ( area1 + area2 + area3 + area4 + area5 - let private quadroots (p: float[]) (r: float[,]) = let mutable b = -p.[1] / (2.0 * p.[0]) let c = p.[2] / p.[0] @@ -429,7 +426,6 @@ let private cubicroots (p: float[]) (r: float[,]) = for k in 1..3 do r.[2, k] <- 0.0 - let private biquadroots (p: float[]) (r: float[,]) = if p.[0] <> 1.0 then @@ -446,7 +442,7 @@ let private biquadroots (p: float[]) (r: float[,]) = a <- a - d let mutable quadExecuted = false - let quad () = + let inline quad () = if not quadExecuted then p.[2] <- c / b