MEPP2 Project
FEVV
Filters
Generic
Manifold
JustNoticeableDistortion
models
psychometricfunction.h
Go to the documentation of this file.
1
// Copyright (c) 2012-2019 University of Lyon and CNRS (France).
2
// All rights reserved.
3
//
4
// This file is part of MEPP2; you can redistribute it and/or modify
5
// it under the terms of the GNU Lesser General Public License as
6
// published by the Free Software Foundation; either version 3 of
7
// the License, or (at your option) any later version.
8
//
9
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11
#pragma once
12
13
#include <cmath>
14
15
#include "
genericparametricmodel.h
"
16
17
//-----------------------------------------------------------------------------------
18
25
26
class
WeibulPsychometricFunction
27
:
public
GenericParametricModel
< double, double, double >
28
{
29
30
//-----------------------------------------------------------------------------------
31
32
public
:
33
WeibulPsychometricFunction
()
34
:
GenericParametricModel
<
ParameterType
,
InputType
,
OutputType
>()
35
{
36
default_params
();
37
}
38
39
WeibulPsychometricFunction
(
const
ParameterType
&
param
)
40
:
GenericParametricModel
<
ParameterType
,
InputType
,
OutputType
>(
param
)
41
{
42
}
43
44
virtual
~WeibulPsychometricFunction
() {}
45
46
//-----------------------------------------------------------------------------------
47
48
public
:
49
virtual
void
compute
(
const
InputType
&in,
OutputType
&out)
const
50
{
51
out = 1. - std::exp(-std::pow(in,
m_param
));
52
}
53
54
//-----------------------------------------------------------------------------------
55
56
protected
:
58
virtual
void
default_params
() {
m_param
= 3.5; }
59
};
genericparametricmodel.h
WeibulPsychometricFunction::~WeibulPsychometricFunction
virtual ~WeibulPsychometricFunction()
Definition:
psychometricfunction.h:44
WeibulPsychometricFunction::default_params
virtual void default_params()
initialise beta to 3.5
Definition:
psychometricfunction.h:58
GenericParametricModel< double, double, double >::InputType
double InputType
Definition:
genericparametricmodel.h:24
GenericParametricModel< double, double, double >::ParameterType
double ParameterType
Definition:
genericparametricmodel.h:23
GenericParametricModel< double, double, double >::param
const ParameterType & param() const
Definition:
genericparametricmodel.h:44
WeibulPsychometricFunction::WeibulPsychometricFunction
WeibulPsychometricFunction()
Definition:
psychometricfunction.h:33
WeibulPsychometricFunction::WeibulPsychometricFunction
WeibulPsychometricFunction(const ParameterType ¶m)
Definition:
psychometricfunction.h:39
GenericParametricModel< double, double, double >::m_param
ParameterType m_param
Definition:
genericparametricmodel.h:88
WeibulPsychometricFunction::compute
virtual void compute(const InputType &in, OutputType &out) const
Definition:
psychometricfunction.h:49
WeibulPsychometricFunction
Definition:
psychometricfunction.h:28
GenericParametricModel
Definition:
genericparametricmodel.h:18
GenericParametricModel< double, double, double >::OutputType
double OutputType
Definition:
genericparametricmodel.h:25
Generated by
1.8.20