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.
显示文件 Open project: mono/ScrewTurnWiki Class Usage Examples

Protected Properties

Property Type Description
isFinalized bool
value float

Public Methods

Method 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 method

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.
return void

NormalizeAfterFinalization() public method

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

Relevance() public method

Initializes a new instance of the Relevance class.
public Relevance ( ) : System
return System

Relevance() public method

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.
return System

SetValue() public method

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.
return void

Property Details

isFinalized protected_oe property

A value indicating whether the relevance value is finalized.
protected bool isFinalized
return bool

value protected_oe property

The value of the relevance.
protected float value
return float