Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkDistModels.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include <mitkDistModels.h>
14 #include <cmath>
15 
17 {
18  return ((y + 0.5) / (2));
19 }
20 
21 double mitk::DistSimpleBinominal::Devariation(double mu, double y)
22 {
23  return 2 * (y * std::log(y) / mu + (1 - y) * std::log(1 - y) / (1 - mu));
24 }
25 
27 {
28  return std::sqrt(mu) * std::sqrt(1 - mu);
29 }
double Devariation(double mu, double y) override
double SqrtVariance(double mu) override
double Init(double y) override