Implementation of City Block distance (also known as Manhattan distance) - the absolute value of the difference of
each direction is summed. The resulting unbounded distance is then mapped between 0 and 1.
Inheritance Hierarchy
NReco.CF.Taste.Impl.Similarity AbstractItemSimilarity
NReco.CF.Taste.Impl.Similarity CityBlockSimilarity
Namespace: NReco.CF.Taste.Impl.Similarity
Assembly: NReco.Recommender (in NReco.Recommender.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
The CityBlockSimilarity type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| CityBlockSimilarity | Initializes a new instance of the CityBlockSimilarity class |
Methods
| Name | Description | |
|---|---|---|
| AllSimilarItemIDs | (Inherited from AbstractItemSimilarity.) | |
| Equals | (Inherited from Object.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| ItemSimilarities | (Overrides AbstractItemSimilarity ItemSimilarities(Int64, Int64 ).) | |
| ItemSimilarity | (Overrides AbstractItemSimilarity ItemSimilarity(Int64, Int64).) | |
| Refresh | ||
| SetPreferenceInferrer | ||
| ToString | Returns a string that represents the current object. (Inherited from Object.) | |
| UserSimilarity |
See Also