CityBlockSimilarity ClassNReco.Recommender Class Library
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

System Object
  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

public sealed class CityBlockSimilarity : AbstractItemSimilarity, 
	IUserSimilarity, IRefreshable

The CityBlockSimilarity type exposes the following members.

Constructors

  NameDescription
Public methodCityBlockSimilarity
Initializes a new instance of the CityBlockSimilarity class
Top
Methods

  NameDescription
Public methodAllSimilarItemIDs (Inherited from AbstractItemSimilarity.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodItemSimilarities (Overrides AbstractItemSimilarity ItemSimilarities(Int64,  Int64 ).)
Public methodItemSimilarity (Overrides AbstractItemSimilarity ItemSimilarity(Int64, Int64).)
Public methodRefresh
Public methodSetPreferenceInferrer
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUserSimilarity
Top
See Also