anchor.diff:          | x when con = 0 -> if mat = operator mat then Condition.De0 else Condition.In0
           | x when con = 1 -> if mat = operator mat then Condition.De1 else Condition.In1
           | x when con = 2 -> if mat = operator mat then Condition.De2 else Condition.In2
  +        | x when con = 3 -> if mat = operator mat then Condition.De3 else Condition.In3
  +        | x when con = 4 -> if mat = operator mat then Condition.De4 else Condition.In4
   
       type TempClassResult = {
           //spline function values at knots
  
positive.code:         | In0 //monotonically increasing
          | In1 //1 maximum
          | In2 //2 maxima
          | De0 //monotonically decreasing
          | De1 //1 minimum
          | De2 //2 minima
          | Complex //more complex
  
      let getParentShape (x:Vector<float>) (a:Vector<float>) (c:Vector<float>) =
  
negative.code:         let trd1 =(In2,splineIncreasing x_values (vector y_values) wMat 2) |> fun (shapeClass,(constraintMatrices,result)) -> shapeClass,result //(cl, createTempClassResultSimple x.TraceA x.TraceC x.Error (x.GCV*1.08) x.Lambda x.Ctemp x.AICc x.SplineFunction)
          let trd2 =(De2,splineDecreasing x_values (vector y_values) wMat 2) |> fun (shapeClass,(constraintMatrices,result)) -> shapeClass,result //(cl, createTempClassResultSimple x.TraceA x.TraceC x.Error (x.GCV*1.08) x.Lambda x.Ctemp x.AICc x.SplineFunction)
          let besttrd = [trd1;trd2] |> List.minBy (fun (cl,x) -> x.AICc)
          //splines with three extremum
          let qua1 =(In3,splineIncreasing x_values (vector y_values) wMat 3) |> fun (shapeClass,(constraintMatrices,result)) -> shapeClass,result //(cl, createTempClassResultSimple x.TraceA x.TraceC x.Error (x.GCV*1.06) x.Lambda x.Ctemp x.AICc x.SplineFunction)
          let qua2 =(De3,splineDecreasing x_values (vector y_values) wMat 3) |> fun (shapeClass,(constraintMatrices,result)) -> shapeClass,result //(cl, createTempClassResultSimple x.TraceA x.TraceC x.Error (x.GCV*1.06) x.Lambda x.Ctemp x.AICc x.SplineFunction)
          let bestqua = [qua1;qua2] |> List.minBy (fun (cl,x) -> x.AICc)                                                               
          //splines with four extrema                                                                                                                                             
          let qui1 =(In4,splineIncreasing x_values (vector y_values) wMat 4) |> fun (shapeClass,(constraintMatrices,result)) -> shapeClass,result //(cl, createTempClassResultSimple x.TraceA x.TraceC x.Error (x.GCV*1.08) x.Lambda x.Ctemp x.AICc x.SplineFunction)
          let qui2 =(De4,splineDecreasing x_values (vector y_values) wMat 4) |> fun (shapeClass,(constraintMatrices,result)) -> shapeClass,result //(cl, createTempClassResultSimple x.TraceA x.TraceC x.Error (x.GCV*1.08) x.Lambda x.Ctemp x.AICc x.SplineFunction)
          let bestqui = [qui1;qui2] |> List.minBy (fun (cl,x) -> x.AICc)
  
          //selection of optimal shape possibility by model selection via AICc 
          [bestfst;bestsnd;besttrd;bestqua;bestqui]
          |> List.minBy (fun (cl,result) -> result.AICc)
          |> fun (cl,result) -> if result.AICc < initialSelectionCriterion then (cl,result) else Complex,result        
  
  