@@ -42,29 +42,19 @@ public Matcher(RoadMap map, IGraphRouter<Road, RoadPoint> router, Func<Road, dou
4242 }
4343
4444 /// <summary>
45- /// Gets standard deviation in meters of gaussian distribution that defines emission probabilities.
46- /// </summary>
47- /// <returns>Standard deviation in meters of gaussian distribution that defines emission probabilities.</returns>
48- public double GetSigma ( )
49- {
50- return Math . Sqrt ( this . _sig2 ) ;
51- }
52- 53- 54- /// <summary>
55- /// Sets standard deviation in meters of gaussian distribution for defining emission
45+ /// Gets or sets standard deviation in meters of gaussian distribution for defining emission
5646 /// probabilities (default is 5 meters).
5747 /// </summary>
58- /// <param name="sigma">Standard deviation in meters of gaussian distribution for defining emission
59- /// probabilities (default is 5 meters).
60- /// </param>
61- public void SetSigma ( double sigma )
48+ public double Sigma
6249 {
63- this . _sig2 = Math . Pow ( sigma , 2 ) ;
64- this . _sqrt_2pi_sig2 = Math . Sqrt ( 2d * Math . PI * _sig2 ) ;
50+ get => Math . Sqrt ( this . _sig2 ) ;
51+ set
52+ {
53+ this . _sig2 = Math . Pow ( value , 2 ) ;
54+ this . _sqrt_2pi_sig2 = Math . Sqrt ( 2d * Math . PI * _sig2 ) ;
55+ }
6556 }
6657
67- 6858 /// <summary>
6959 /// <para>
7060 /// Get or sets lambda parameter of negative exponential distribution defining transition probabilities
@@ -103,7 +93,7 @@ public override (MatcherCandidate, double)[] Candidates(
10393 {
10494 var pointExisted = map . TryGetValue ( predecessor . RoadPoint . Edge . Id , out var point ) ;
10595 if ( pointExisted && point . Edge != null
106- && _spatial . Distance ( point . Coordinate , predecessor . RoadPoint . Coordinate ) < this . GetSigma ( )
96+ && _spatial . Distance ( point . Coordinate , predecessor . RoadPoint . Coordinate ) < this . Sigma
10797 && ( ( point . Edge . Headeing == Heading . Forward
10898 && point . Fraction < predecessor . RoadPoint . Fraction )
10999 || ( point . Edge . Headeing == Heading . Backward
0 commit comments