@@ -752,33 +752,32 @@ public void addSubRedundanceAndCofactor2Deflection(Point deflectionPoint, boolea
752
752
deflectionY .setMaximumTolerableBias (nabla0 .get (1 ));
753
753
}
754
754
else {
755
- Vector nabla0 = new DenseVector (nabla , true );
756
- double normNabla = nabla0 .norm (Vector .Norm .Two );
757
- if (normNabla < SQRT_EPS ) {
758
- for (int j =0 ; j <dim ; j ++)
759
- nabla0 .set (j , confidenceRegion .getMinimalDetectableBias (j ));
760
- }
761
- else {
762
- Qnn .mult (Pv , nabla );
763
- double nablaCoVarNable = Math .abs (nabla .dot (Pv0 ));
764
- ((VerticalDeflectionX )deflectionX ).setNablaCoVarNabla ( nablaCoVarNable );
755
+ Qnn .mult (Pv , nabla );
756
+ double normNabla = nabla .norm (Vector .Norm .Two );
757
+ double nablaCoVarNable = Math .abs (nabla .dot (Pv0 ));
758
+ ((VerticalDeflectionX )deflectionX ).setNablaCoVarNabla ( nablaCoVarNable );
765
759
766
- nabla = nabla .scale (-1.0 );
767
- deflectionX .setGrossError (nabla .get (0 ));
768
- deflectionY .setGrossError (nabla .get (1 ));
760
+ nabla = nabla .scale (-1.0 );
761
+ deflectionX .setGrossError (nabla .get (0 ));
762
+ deflectionY .setGrossError (nabla .get (1 ));
769
763
770
- //Qll_P.mult(nabla, ep);
764
+ //Qll_P.mult(nabla, ep);
771
765
772
- Vector subPsubPQvvPNabla = new DenseVector (dim );
773
- subPsubPQvvP .mult (nabla , subPsubPQvvPNabla );
766
+ Vector subPsubPQvvPNabla = new DenseVector (dim );
767
+ subPsubPQvvP .mult (nabla , subPsubPQvvPNabla );
774
768
775
- // Bestimme Nabla auf der Grenzwertellipse mit nabla0*Pnn*nabla0 == 1
776
- Vector PQvvPnabla0 = new DenseVector (nabla0 );
777
- PR .mult (nabla0 , PQvvPnabla0 );
778
- double nQn0 = nabla0 .dot (PQvvPnabla0 );
769
+ // Bestimme Nabla auf der Grenzwertellipse mit nabla0*Pnn*nabla0 == 1
770
+ Vector nabla0 = new DenseVector (nabla , true );
771
+ Vector PQvvPnabla0 = new DenseVector (nabla0 );
772
+ PR .mult (nabla0 , PQvvPnabla0 );
773
+ double nQn0 = nabla0 .dot (PQvvPnabla0 );
774
+ if (normNabla < SQRT_EPS || nQn0 <= 0 ) {
775
+ for (int j =0 ; j <dim ; j ++)
776
+ nabla0 .set (j , confidenceRegion .getMinimalDetectableBias (j ));
777
+ }
778
+ else {
779
779
for (int j =0 ; j <dim ; j ++)
780
- if (nQn0 > 0 )
781
- nabla0 .set (j , nabla0 .get (j )/Math .sqrt (nQn0 ));
780
+ nabla0 .set (j , nabla0 .get (j )/Math .sqrt (nQn0 ));
782
781
}
783
782
//deflectionX.setMinimalDetectableBias(nabla0.get(0));
784
783
//deflectionY.setMinimalDetectableBias(nabla0.get(1));
@@ -963,33 +962,31 @@ public void addSubRedundanceAndCofactor2Point(Point point, boolean restoreUncert
963
962
point .setInfluenceOnNetworkDistortion (efsp );
964
963
}
965
964
else {
966
- double efsp = 0 ;
965
+ Qnn .mult (Pv , nabla );
966
+ point .setNablaCoVarNabla ( Math .abs (nabla .dot (Pv0 )) );
967
+ nabla = nabla .scale (-1.0 );
968
+ point .setGrossErrors ( Matrices .getArray (nabla ) );
969
+ Qll_P .mult (nabla , ep );
970
+ point .setInfluencesOnPointPosition ( Matrices .getArray (ep ) );
971
+
972
+ Vector subPsubPQvvPNabla = new DenseVector (dim );
973
+ subPsubPQvvP .mult (nabla , subPsubPQvvPNabla );
974
+ double efsp = Math .sqrt (Math .abs (subPsubPQvvPNabla .dot (nabla )));
975
+
976
+ // Bestimme Nabla auf der Grenzwertellipse mit nabla0*Pnn*nabla0 == 1
967
977
Vector nabla0 = new DenseVector (nabla , true );
968
- double normNabla = nabla0 .norm (Vector .Norm .Two );
969
- if (normNabla < SQRT_EPS ) {
970
- for (int j =0 ; j <dim ; j ++)
971
- nabla0 .set (j , confidenceRegion .getMinimalDetectableBias (j ));
972
- }
973
- else {
974
- Qnn .mult (Pv , nabla );
975
- point .setNablaCoVarNabla ( Math .abs (nabla .dot (Pv0 )) );
976
- nabla = nabla .scale (-1.0 );
977
- point .setGrossErrors ( Matrices .getArray (nabla ) );
978
- Qll_P .mult (nabla , ep );
979
- point .setInfluencesOnPointPosition ( Matrices .getArray (ep ) );
980
-
981
- Vector subPsubPQvvPNabla = new DenseVector (dim );
982
- subPsubPQvvP .mult (nabla , subPsubPQvvPNabla );
983
- efsp = Math .sqrt (Math .abs (subPsubPQvvPNabla .dot (nabla )));
984
-
985
- // Bestimme Nabla auf der Grenzwertellipse mit nabla0*Pnn*nabla0 == 1
986
- Vector PQvvPnabla0 = new DenseVector (nabla0 );
987
- PR .mult (nabla0 , PQvvPnabla0 );
988
- double nQn0 = nabla0 .dot (PQvvPnabla0 );
989
- for (int j =0 ; j <dim ; j ++)
990
- if (nQn0 > 0 )
991
- nabla0 .set (j , nabla0 .get (j )/Math .sqrt (nQn0 ));
992
- }
978
+ Vector PQvvPnabla0 = new DenseVector (nabla0 );
979
+ PR .mult (nabla0 , PQvvPnabla0 );
980
+ double nQn0 = nabla0 .dot (PQvvPnabla0 );
981
+ double normNabla = nabla .norm (Vector .Norm .Two );
982
+ if (normNabla < SQRT_EPS || nQn0 <= 0 ) {
983
+ for (int j =0 ; j <dim ; j ++)
984
+ nabla0 .set (j , confidenceRegion .getMinimalDetectableBias (j ));
985
+ }
986
+ else {
987
+ for (int j =0 ; j <dim ; j ++)
988
+ nabla0 .set (j , nabla0 .get (j )/Math .sqrt (nQn0 ));
989
+ }
993
990
//point.setMinimalDetectableBiases(Matrices.getArray(nabla0));
994
991
point .setMaximumTolerableBiases ( Matrices .getArray (nabla0 ) );
995
992
point .setInfluenceOnNetworkDistortion (efsp );
@@ -1905,8 +1902,7 @@ else if (mxy >= 0) {
1905
1902
}
1906
1903
}
1907
1904
}
1908
-
1909
-
1905
+
1910
1906
if (this .congruenceAnalysis && numberOfStrainEquations > 0 ) {
1911
1907
row = N .numRows () - numberOfStrainEquations ;
1912
1908
@@ -3049,28 +3045,26 @@ else if (r==2 || dim == 1)
3049
3045
point .setMaximumTolerableBiases (Matrices .getArray (nabla0 ));
3050
3046
}
3051
3047
else {
3048
+ Qnn .mult (BTPv , nabla );
3049
+ double normNabla = nabla .norm (Vector .Norm .Two );
3050
+ point .setNablaCoVarNabla ( Math .abs (nabla .dot (BTPv )) );
3051
+ point .setGrossErrors ( Matrices .getArray (nabla .scale (-1.0 )) );
3052
+
3053
+ // Bestimme Nabla auf der Grenzwertellipse mit nabla0*Pnn*nabla0 == 1
3052
3054
Vector nabla0 = new DenseVector (nabla , true );
3053
- double normNabla = nabla0 .norm (Vector .Norm .Two );
3054
- if (normNabla < SQRT_EPS ) {
3055
+ Vector PQvvPnabla0 = new DenseVector (nabla0 );
3056
+ BTPQvvPB .mult (nabla0 , PQvvPnabla0 );
3057
+ double nQn0 = nabla0 .dot (PQvvPnabla0 );
3058
+ if (normNabla < SQRT_EPS || nQn0 <= 0 ) {
3055
3059
for (int j =0 ; j <dim ; j ++)
3056
3060
nabla0 .set (j , confidenceRegion .getMinimalDetectableBias (j ));
3057
3061
}
3058
3062
else {
3059
- Qnn .mult (BTPv , nabla );
3060
- point .setNablaCoVarNabla ( Math .abs (nabla .dot (BTPv )) );
3061
- point .setGrossErrors ( Matrices .getArray (nabla .scale (-1.0 )) );
3062
-
3063
- // Bestimme Nabla auf der Grenzwertellipse mit nabla0*Pnn*nabla0 == 1
3064
- Vector PQvvPnabla0 = new DenseVector (nabla0 );
3065
- BTPQvvPB .mult (nabla0 , PQvvPnabla0 );
3066
- double nQn0 = nabla0 .dot (PQvvPnabla0 );
3067
- if (nQn0 > 0 ) {
3068
- for (int j =0 ; j <dim ; j ++)
3069
- nabla0 .set (j , nabla0 .get (j )/Math .sqrt (nQn0 ));
3070
- //point.setMinimalDetectableBiases(Matrices.getArray(nabla0));
3071
- point .setMaximumTolerableBiases (Matrices .getArray (nabla0 ));
3072
- }
3063
+ for (int j =0 ; j <dim ; j ++)
3064
+ nabla0 .set (j , nabla0 .get (j )/Math .sqrt (nQn0 ));
3073
3065
}
3066
+ //point.setMinimalDetectableBiases(Matrices.getArray(nabla0));
3067
+ point .setMaximumTolerableBiases (Matrices .getArray (nabla0 ));
3074
3068
}
3075
3069
}
3076
3070
@@ -3541,7 +3535,7 @@ else if (colP1 < 0) {
3541
3535
}
3542
3536
3543
3537
double nabla [] = new double [dim ];
3544
- double grzw [] = new double [dim ];
3538
+ double mdb [] = new double [dim ];
3545
3539
double normNabla = 0 ;
3546
3540
if (dim != 1 ) {
3547
3541
nabla [0 ] = p0 .getX () - p1 .getX ();
@@ -3580,9 +3574,9 @@ else if (colP1 < 0) {
3580
3574
Vector PxxNabla0 = new DenseVector (nabla0 , true );
3581
3575
tiePxx .mult (nabla0 , PxxNabla0 );
3582
3576
double nPn0 = nabla0 .dot (PxxNabla0 );
3583
- for ( int j = 0 ; j < dim ; j ++ ) {
3584
- if ( nPn0 > 0 )
3585
- grzw [j ] = sqrtLambda * nabla0 .get (j )/Math .sqrt (nPn0 );
3577
+ if ( nPn0 > 0 ) {
3578
+ for ( int j = 0 ; j < dim ; j ++ )
3579
+ mdb [j ] = sqrtLambda * nabla0 .get (j )/Math .sqrt (nPn0 );
3586
3580
}
3587
3581
tie .setTeststatisticValues (tPrio , tPost );
3588
3582
}
@@ -3598,9 +3592,9 @@ else if (colP1 < 0) {
3598
3592
tie .setConfidenceRegion (confidenceRegion );
3599
3593
if (normNabla < SQRT_EPS ) { // this.estimationType == EstimationType.SIMULATION) {
3600
3594
for (int i =0 ; i <dim ; i ++) {
3601
- grzw [i ] = sqrtLambda *confidenceRegion .getMinimalDetectableBias (i );
3595
+ mdb [i ] = sqrtLambda *confidenceRegion .getMinimalDetectableBias (i );
3602
3596
if (this .estimationType != EstimationType .SIMULATION )
3603
- nabla [i ] = grzw [i ];
3597
+ nabla [i ] = mdb [i ];
3604
3598
}
3605
3599
}
3606
3600
}
@@ -3609,7 +3603,7 @@ else if (colP1 < 0) {
3609
3603
e .printStackTrace ();
3610
3604
}
3611
3605
3612
- tie .setMinimalDetectableBiases (grzw );
3606
+ tie .setMinimalDetectableBiases (mdb );
3613
3607
tie .setGrossErrors (nabla );
3614
3608
tie .setSigma (sigma );
3615
3609
@@ -3787,10 +3781,10 @@ else if (r==2 || dim == 1)
3787
3781
Vector PQvvPnabla0 = new DenseVector (nabla0 );
3788
3782
BTPQvvPB .mult (nabla0 , PQvvPnabla0 );
3789
3783
double nQn0 = nabla0 .dot (PQvvPnabla0 );
3790
- for ( int j = 0 ; j < dim ; j ++)
3791
- if ( nQn0 > 0 )
3784
+ if ( nQn0 > 0 ) {
3785
+ for ( int j = 0 ; j < dim ; j ++ )
3792
3786
nabla0 .set (j , sqrtLambdaTie * nabla0 .get (j )/Math .sqrt (nQn0 ));
3793
-
3787
+ }
3794
3788
tie .setMinimalDetectableBiases (Matrices .getArray (nabla0 ));
3795
3789
tie .setGrossErrors (Matrices .getArray (nabla ));
3796
3790
0 commit comments