lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject svn commit: r1375259 - /incubator/lucene.net/trunk/src/contrib/Spatial/BBox/AreaSimilarity.cs
Date Mon, 20 Aug 2012 21:52:17 GMT
Author: synhershko
Date: Mon Aug 20 21:52:16 2012
New Revision: 1375259

URL: http://svn.apache.org/viewvc?rev=1375259&view=rev
Log:
Minor

Modified:
    incubator/lucene.net/trunk/src/contrib/Spatial/BBox/AreaSimilarity.cs

Modified: incubator/lucene.net/trunk/src/contrib/Spatial/BBox/AreaSimilarity.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Spatial/BBox/AreaSimilarity.cs?rev=1375259&r1=1375258&r2=1375259&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Spatial/BBox/AreaSimilarity.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Spatial/BBox/AreaSimilarity.cs Mon Aug 20 21:52:16
2012
@@ -53,24 +53,14 @@ namespace Lucene.Net.Spatial.BBox
 	   /**
 		* Properties associated with the query envelope
 		*/
-		private Rectangle queryExtent;
-		private double queryArea;
+		private readonly Rectangle queryExtent;
+		private readonly double queryArea;
 
-		private double targetPower;
-		private double queryPower;
+		private readonly double targetPower;
+		private readonly double queryPower;
 
 		public AreaSimilarity(Rectangle queryExtent, double queryPower, double targetPower)
 		{
-			Init(queryExtent, queryPower, targetPower);
-		}
-
-		public AreaSimilarity(Rectangle queryExtent)
-		{
-			Init(queryExtent, 2.0, 0.5);
-		}
-
-		public void Init(Rectangle queryExtent, double queryPower, double targetPower)
-		{
 			this.queryExtent = queryExtent;
 			this.queryArea = queryExtent.GetArea();
 
@@ -85,6 +75,10 @@ namespace Lucene.Net.Spatial.BBox
 			//  }
 		}
 
+		public AreaSimilarity(Rectangle queryExtent) : this(queryExtent, 2.0, 0.5)
+		{
+		}
+
 		public String GetDelimiterQueryParameters()
 		{
 			return queryExtent + ";" + queryPower + ";" + targetPower;



Mime
View raw message