예제 #1
0
        /// <summary>
        /// This function return the cummulative distribution function (CDF)
        /// for Student's t distribution less than t and number degree of
        /// freedom k.
        /// </summary>
        /// <param name="t">double. t</param>
        /// <param name="k">int. k is number degree of freedom</param>
        /// <returns>
        /// The value of cummulative distribution function (CDF)
        /// for Student's t distribution less than t and number degree of
        /// freedom k.
        /// </returns>
        public static double CDF(double t, int k)
        {
            // number degree of freedom must be mor than 0
            if (k <= 0)
            {
                return(double.NaN);
            }
            if (t == 0)
            {
                return(0.5);
            }
            StudentFunction function = new StudentFunction(k);

            if (t < 0)
            {
                return(0.5 - Integrator.GaussLegendre(function, t, 0, 1.0e-6));
            }
            else
            {
                return(0.5 + Integrator.GaussLegendre(function, 0, t, 1.0e-6));
            }
        }
 public IEnumerable <StudentDTO> GetStudentsList()
 {
     return(StudentFunction.GetStudentsList());
 }
예제 #3
0
 public int GetBalance(int id)
 {
     return(StudentFunction.GetBalance(id));
 }
예제 #4
0
 public StudentDTO GetStudentDetailsByStudentId(int id)
 {
     return(StudentFunction.GetStudentDetailsByStudentId(id));
 }
예제 #5
0
 public IEnumerable <StudentDTO> GetStudentsListByDetails([FromBody] StudentDTO student)
 {
     return(StudentFunction.GetStudentsListByDetails(student));
 }
예제 #6
0
 public IHttpActionResult AddStudent([FromBody] StudentDTO student)
 {
     return(Ok(StudentFunction.AddStudent(student)));
 }
예제 #7
0
 public IHttpActionResult Post([FromBody] StudentDTO student)
 {
     return(Ok(StudentFunction.EditStudent(student)));
 }
예제 #8
0
 public IEnumerable <StudentDTO> GetStudentsListByKind(string studentKind)
 {
     return(StudentFunction.GetStudentsListByKind(studentKind));
 }
예제 #9
0
        /// <summary>
        /// This function return the probability density function (PDF)
        /// for Student's t distribution with T=t and number degree
        /// of freedom k.
        /// </summary>
        /// <param name="t">double. t</param>
        /// <param name="k">int. k is number degree of freedom</param>
        /// <returns>
        /// The value of probability density function (PDF)
        /// for Student's t distribution with T=t and number degree
        /// of freedom k.
        /// </returns>
        private static double PDF(double t, int k)
        {
            StudentFunction function = new StudentFunction(k);

            return(function.Value(t));
        }