C# Класс Metrics.QualityCalculator

This static class contains methods to calculate various component of the Quality Coefficient
Показать файл Открыть проект

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

Метод Описание
calculateFileQuality ( String filepath ) : QualityCoefficient

Calculates only the File Quality component of the Quality Coefficient

calculatePeerQuality ( int buffered, int queueSize ) : QualityCoefficient

Calculates only the Peer Quality component of the Quality Coefficient

calculateQualityCoefficient ( String searchString, String tags, int buffered, int queueSize, String filepath ) : QualityCoefficient

Calculates all components of the Quality Coefficient. This method extact file quality information directly from the file itself.

calculateQualityCoefficient ( String searchString, String tags, int buffered, int queueSize, int bitrate, int channelmode, int samplerate ) : QualityCoefficient

Calculates all components of the Quality Coefficient. This method needs file quality information to be passed as arguments.

calculateSearchAffinity ( String searchString, String tags ) : QualityCoefficient

Calculates only the Search Affinity Component of the Quality Coefficient.

Приватные методы

Метод Описание
calculateAFF ( String searchString, String tags ) : double

Calculates the affinity coefficient of a tag sets with a given search string. For implementation details read the Wiki Page for this coefficient (http://code.google.com/p/p2p-player/wiki/ImplicitQoS#Coefficiente_di_Affinità)

calculateFQ ( String filepath ) : FileQualityCoefficient

Calculates the File Quality Coefficient extracting information from the MPEG file Header. For implementation details read the Wiki Page for this coefficient (http://code.google.com/p/p2p-player/wiki/ImplicitQoS#Coefficiente_di_Qualità_del_File)

calculateFQ ( int bitrate, int channelmode, int samplerate ) : FileQualityCoefficient

Returns an object of type FileQualityCoefficient with the given components

calculatePQ ( int buffered, int queueSize ) : double

Calculates Peer Quality Coefficient

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

calculateFileQuality() публичный статический Метод

Calculates only the File Quality component of the Quality Coefficient
public static calculateFileQuality ( String filepath ) : QualityCoefficient
filepath String Path of the file to analyze
Результат QualityCoefficient

calculatePeerQuality() публичный статический Метод

Calculates only the Peer Quality component of the Quality Coefficient
public static calculatePeerQuality ( int buffered, int queueSize ) : QualityCoefficient
buffered int Number of buffered chunks
queueSize int Size of the chunk queue
Результат QualityCoefficient

calculateQualityCoefficient() публичный статический Метод

Calculates all components of the Quality Coefficient. This method extact file quality information directly from the file itself.
public static calculateQualityCoefficient ( String searchString, String tags, int buffered, int queueSize, String filepath ) : QualityCoefficient
searchString String Searched String
tags String List of tags returned by the research action
buffered int Number of buffered chunks
queueSize int Size of the chunk queue
filepath String Path of the file to analyze
Результат QualityCoefficient

calculateQualityCoefficient() публичный статический Метод

Calculates all components of the Quality Coefficient. This method needs file quality information to be passed as arguments.
public static calculateQualityCoefficient ( String searchString, String tags, int buffered, int queueSize, int bitrate, int channelmode, int samplerate ) : QualityCoefficient
searchString String Searched String
tags String List of tags returned by the research action
buffered int Number of buffered chunks
queueSize int Size of the chunk queue
bitrate int Bit rate component
channelmode int Channel mode component
samplerate int Sample rate component
Результат QualityCoefficient

calculateSearchAffinity() публичный статический Метод

Calculates only the Search Affinity Component of the Quality Coefficient.
public static calculateSearchAffinity ( String searchString, String tags ) : QualityCoefficient
searchString String Searched String
tags String List of tags returned by the research action
Результат QualityCoefficient