19 using Lucene.Net.Index;
20 using Lucene.Net.Search.Function;
22 namespace Lucene.Net.Spatial.Util
27 protected readonly
float m;
28 protected readonly
float a;
29 protected readonly
float b;
53 _enclosingInstance = enclosingInstance;
57 public override float FloatVal(
int doc)
59 return _enclosingInstance.a / (_enclosingInstance.m * vals.FloatVal(doc) + _enclosingInstance.b);
62 public override string ToString(
int doc)
64 return _enclosingInstance.a +
"/("
65 + _enclosingInstance.m +
"*float(" + vals.
ToString(doc) +
')'
66 +
'+' + _enclosingInstance.b +
')';
72 var vals = source.GetValues(reader);
76 public override string Description()
79 + m +
"*float(" + source.Description() +
")"
83 public override bool Equals(
object o)
87 return this.m == other.m
90 && this.source.Equals(other.source);
93 public override int GetHashCode()
95 int h = (int) BitConverter.DoubleToInt64Bits(a) + (int) BitConverter.DoubleToInt64Bits(m);
96 h ^= (h << 13) | (int)((uint)h >> 20);
97 return h + ((int) BitConverter.DoubleToInt64Bits(b)) + source.GetHashCode();