C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
isFinalized bool
value float

Открытые методы

Метод Описание
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.

Описание методов

Finalize() публичный Метод

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.
Результат void

NormalizeAfterFinalization() публичный Метод

Normalizes the relevance after finalization.
If is false ( was not called).
public NormalizeAfterFinalization ( float factor ) : void
factor float The normalization factor.
Результат void

Relevance() публичный Метод

Initializes a new instance of the Relevance class.
public Relevance ( ) : System
Результат System

Relevance() публичный Метод

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.
Результат System

SetValue() публичный Метод

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.
Результат void

Описание свойств

isFinalized защищенное свойство

A value indicating whether the relevance value is finalized.
protected bool isFinalized
Результат bool

value защищенное свойство

The value of the relevance.
protected float value
Результат float