C# Class ScrewTurn.Wiki.SearchEngine.Relevance

Represents the relevance of a search result with two states: non-finalized and finalized. When the state is non-finalized, the value of the relevance has an unknown meaning. When the state is finalized, the value of the relevance is a percentage value representing the relevance of a search result.
All members are not thread-safe.
Afficher le fichier Open project: mono/ScrewTurnWiki Class Usage Examples

Protected Properties

Свойство Type Description
isFinalized bool
value float

Méthodes publiques

Méthode Description
Finalize ( float total ) : void

Finalizes the value of the relevance.

The method sets the finalized value of the relevance to value / total * 100.

NormalizeAfterFinalization ( float factor ) : void

Normalizes the relevance after finalization.

Relevance ( ) : System

Initializes a new instance of the Relevance class.

Relevance ( float value ) : System

Initializes a new instance of the Relevance class.

SetValue ( float value ) : void

Sets the non-finalized value of the relevance.

Method Details

Finalize() public méthode

Finalizes the value of the relevance.
The method sets the finalized value of the relevance to value / total * 100.
If is less than zero. If is true ( was called).
public Finalize ( float total ) : void
total float The global relevance value.
Résultat void

NormalizeAfterFinalization() public méthode

Normalizes the relevance after finalization.
If is false ( was not called).
public NormalizeAfterFinalization ( float factor ) : void
factor float The normalization factor.
Résultat void

Relevance() public méthode

Initializes a new instance of the Relevance class.
public Relevance ( ) : System
Résultat System

Relevance() public méthode

Initializes a new instance of the Relevance class.
If is less than zero.
public Relevance ( float value ) : System
value float The initial relevance value, non-finalized.
Résultat System

SetValue() public méthode

Sets the non-finalized value of the relevance.
If is less than zero. If is true ( was called).
public SetValue ( float value ) : void
value float The value.
Résultat void

Property Details

isFinalized protected_oe property

A value indicating whether the relevance value is finalized.
protected bool isFinalized
Résultat bool

value protected_oe property

The value of the relevance.
protected float value
Résultat float