Java source code for calculating E
The Mean Opinion
Score (MOS) test is a well acccepted standard which is defined in the ITU-T
Rec.P.800.
The value of MOS
test is generated by letting large number of listeners to evaluate the quality
of the test sentences.
The test scores
are averaged to a mean score which range from 1 to 5, 1 being the worst and 5 being
the best.
The E-model which is
defined by ITU-T Rec.G.107 is a computational model converting all parameters
that affect a voice call into a single rating value R.
A VB source code was provided in G.107 for calculating R value. But considering not everybody knows VB, I would like to share some java code I used before.
public class VoIPCalculator {
/**
* This function returns R value calculated by using the passed in parameters
* See detail of each parameter in ITU-T G.107
* @param T
* @param Ppl
* @param SLR
* @param RLR
* @param Ds
* @param STMR
* @param Dr
* @param TELR
* @param WEPL
* @param Ie
* @param BPL
* @param BurstR
* @param A
* @param Nc
* @param Ps
* @param Pr
* @param qdu
* @param Nfor
* @return
*/
private static double calRValue(double T, double Ppl, double SLR,
double RLR, double Ds, double STMR, double Dr, double TELR,
double WEPL, double Ie, double BPL, double BurstR, double A,
double Nc, double Ps, double Pr, double qdu, double Nfor) {
double LSTR = STMR + Dr,
Tr = 2*T,
Ta = T;
double Nfo = Nfor + RLR;
double OLR = SLR+RLR;
double Pre = Pr + 10*Math.log10(1+Math.pow(10,
((double)(10-LSTR))/(double)10));
double Nor = RLR - 121 +Pre
+ 0.008*Math.pow((Pre-35),2);
double Nos = Ps - SLR -Ds
- 100 +0.004*Math.pow((Ps-OLR -Ds - 14),2);
double No = 10*Math.log10((Math.pow(10, (double)Nc/(double)10))
+Math.pow(10, (double)Nos/(double)10)
+Math.pow(10, (double)Nor/(double)10)
+Math.pow(10, (double)Nfo/(double)10));
double Ro = 15 - 1.5*(SLR+No);
double Q = 37 - 15*(
相关文档:
JAVA反射机制是在运行状态中,对于任意一个类,都能够知道这个类的所有属性和方法;对于任意一个对象,都能够调用它的任意一个方法;这种动态获取的信息以及动态调用对象的方法的功能称为java语言的反射机制。
Java反射机制主要提供了以下功能: 在运行时判断任意一个对象所属的类;在运行时构造任意一个类的对 ......
package server;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Recta ......
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.io.SAXReader;
public class DocumentUtil
{
public static Document loadXMLByAbsolutePath(String absoluteFilePath, String logFileName)
{
SAXReader saxReader = new SAXReader();
Document document = null;
try ......
摘要:本文将谈谈在Java应用程序中使用Jfreechart配置,JFreeChart是用Java开发的一个免费的chart图形处理类库。
测试环境:
OS :WindowsXP
Java:jdk1.5.0_06
JFreeChart:1.0.9(2008年3月 最新版本)
因为JFreeChart采用Java开发而成,所以在其他系统也能正常运行。
JFreeChart的安装
1,下载
从Sourceforge. ......