Lucene.Net  3.0.3
Lucene.Net is a port of the Lucene search engine library, written in C# and targeted at .NET runtime users.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
Public Member Functions | List of all members
Lucene.Net.Spatial.BBox.AreaSimilarity Class Reference

The algorithm is implemented as envelope on envelope overlays rather than complex polygon on complex polygon overlays. Spatial relevance scoring algorithm:
queryArea = the area of the input query envelope
targetArea = the area of the target envelope (per Lucene document)
intersectionArea = the area of the intersection for the query/target envelopes
queryPower = the weighting power associated with the query envelope (default = 1.0)
targetPower = the weighting power associated with the target envelope (default = 1.0)
queryRatio = intersectionArea / queryArea;
targetRatio = intersectionArea / targetArea;
queryFactor = Math.pow(queryRatio,queryPower);
targetFactor = Math.pow(targetRatio,targetPower);
score = queryFactor /// targetFactor; Based on Geoportal's SpatialRankingValueSource. More...

Inherits Lucene.Net.Spatial.BBox.BBoxSimilarity.

Public Member Functions

 AreaSimilarity (Rectangle queryExtent, double queryPower, double targetPower)
 
 AreaSimilarity (Rectangle queryExtent)
 
String GetDelimiterQueryParameters ()
 
double Score (Rectangle target, Explanation exp)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 

Detailed Description

The algorithm is implemented as envelope on envelope overlays rather than complex polygon on complex polygon overlays.

Spatial relevance scoring algorithm:


queryArea = the area of the input query envelope
targetArea = the area of the target envelope (per Lucene document)
intersectionArea = the area of the intersection for the query/target envelopes
queryPower = the weighting power associated with the query envelope (default = 1.0)
targetPower = the weighting power associated with the target envelope (default = 1.0)


queryRatio = intersectionArea / queryArea;
targetRatio = intersectionArea / targetArea;
queryFactor = Math.pow(queryRatio,queryPower);
targetFactor = Math.pow(targetRatio,targetPower);
score = queryFactor /// targetFactor;

Based on Geoportal's SpatialRankingValueSource.

.experimental

Definition at line 50 of file AreaSimilarity.cs.

Constructor & Destructor Documentation

Lucene.Net.Spatial.BBox.AreaSimilarity.AreaSimilarity ( Rectangle  queryExtent,
double  queryPower,
double  targetPower 
)

Definition at line 61 of file AreaSimilarity.cs.

Lucene.Net.Spatial.BBox.AreaSimilarity.AreaSimilarity ( Rectangle  queryExtent)

Definition at line 77 of file AreaSimilarity.cs.

Member Function Documentation

override bool Lucene.Net.Spatial.BBox.AreaSimilarity.Equals ( object  obj)

Definition at line 219 of file AreaSimilarity.cs.

String Lucene.Net.Spatial.BBox.AreaSimilarity.GetDelimiterQueryParameters ( )

Definition at line 82 of file AreaSimilarity.cs.

override int Lucene.Net.Spatial.BBox.AreaSimilarity.GetHashCode ( )

Definition at line 226 of file AreaSimilarity.cs.

double Lucene.Net.Spatial.BBox.AreaSimilarity.Score ( Rectangle  target,
Explanation  exp 
)

Implements Lucene.Net.Spatial.BBox.BBoxSimilarity.

Definition at line 87 of file AreaSimilarity.cs.


The documentation for this class was generated from the following file: