lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [07/22] lucenenet git commit: Lucene.Net.Queries.Function.ValueSources.ScaleFloatFunction.ScaleInfo refactor: changed internal fields into auto-implemented properties
Date Sat, 28 Jan 2017 10:15:50 GMT
Lucene.Net.Queries.Function.ValueSources.ScaleFloatFunction.ScaleInfo refactor: changed internal
fields into auto-implemented properties


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/d11d4da7
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/d11d4da7
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/d11d4da7

Branch: refs/heads/api-work
Commit: d11d4da756b82b6ee19120028204dc0ef21b47aa
Parents: d0f7e40
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sat Jan 28 07:57:54 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sat Jan 28 07:57:54 2017 +0700

----------------------------------------------------------------------
 .../Function/ValueSources/ScaleFloatFunction.cs         | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d11d4da7/src/Lucene.Net.Queries/Function/ValueSources/ScaleFloatFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/ScaleFloatFunction.cs b/src/Lucene.Net.Queries/Function/ValueSources/ScaleFloatFunction.cs
index ed74f76..4953c60 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/ScaleFloatFunction.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/ScaleFloatFunction.cs
@@ -56,8 +56,8 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
         private class ScaleInfo
         {
-            internal float minVal; // LUCENENET TODO: Make property
-            internal float maxVal; // LUCENENET TODO: Make property
+            internal float MinVal { get; set; }
+            internal float MaxVal { get; set; }
         }
 
         private ScaleInfo CreateScaleInfo(IDictionary context, AtomicReaderContext readerContext)
@@ -98,7 +98,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
                 minVal = maxVal = 0;
             }
 
-            var scaleInfo = new ScaleInfo { minVal = minVal, maxVal = maxVal };
+            var scaleInfo = new ScaleInfo { MinVal = minVal, MaxVal = maxVal };
             context[this] = scaleInfo;
             return scaleInfo;
         }
@@ -112,9 +112,9 @@ namespace Lucene.Net.Queries.Function.ValueSources
                 scaleInfo = CreateScaleInfo(context, readerContext);
             }
 
-            float scale = (scaleInfo.maxVal - scaleInfo.minVal == 0) ? 0 : (max - min) /
(scaleInfo.maxVal - scaleInfo.minVal);
-            float minSource = scaleInfo.minVal;
-            float maxSource = scaleInfo.maxVal;
+            float scale = (scaleInfo.MaxVal - scaleInfo.MinVal == 0) ? 0 : (max - min) /
(scaleInfo.MaxVal - scaleInfo.MinVal);
+            float minSource = scaleInfo.MinVal;
+            float maxSource = scaleInfo.MaxVal;
 
             var vals = source.GetValues(context, readerContext);
             return new FloatDocValuesAnonymousInnerClassHelper(this, this, scale, minSource,
maxSource, vals);


Mime
View raw message