GPRidge v1.0.0
GPR-accelerated saddle point searches on potential energy surfaces
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
PriorBase.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
// Copyright (c) gpridge developers
3
// See LICENSE for details.
4
5
/*
6
* PriorBase.h
7
*
8
* Created on: 10 Jul 2020
9
* Author: Maxim Masterov
10
* Company: SURFSara
11
*/
12
13
#ifndef GPR_PRIOR_PRIORPARAMETERS_H_
14
#define GPR_PRIOR_PRIORPARAMETERS_H_
15
16
#include "
../../data_types/Field.h
"
17
18
namespace
gpr
{
19
23
class
PriorBase
{
24
public
:
25
PriorBase
()
26
{
27
clear
();
28
}
29
30
virtual
double
calculateLogPrior
(
const
FieldMatrixd
&
/*x*/
)
31
{
32
return
0.;
33
}
34
35
virtual
FieldMatrixd
calculateLogPriorGradient
(
const
FieldMatrixd
&
x
)
36
{
37
FieldMatrixd
lpg;
38
lpg.resize(
x
.rows(),
x
.cols());
39
lpg.setZero();
40
return
lpg;
41
}
42
43
inline
void
clear
()
44
{
45
mu
=
s2
=
nu
= 0.;
46
}
47
48
inline
double
getMu
()
const
49
{
50
return
mu
;
51
}
52
53
inline
double
getS2
()
const
54
{
55
return
s2
;
56
}
57
58
inline
double
getNu
()
const
59
{
60
return
nu
;
61
}
62
63
inline
void
setMu
(
const
double
value)
64
{
65
mu
= value;
66
}
67
68
inline
void
setS2
(
const
double
value)
69
{
70
s2
= value;
71
}
72
73
inline
void
setNu
(
const
double
value)
74
{
75
nu
= value;
76
}
77
78
inline
void
setParameters
(
const
PriorBase
& other)
79
{
80
mu
= other.
getMu
();
81
s2
= other.
getS2
();
82
nu
= other.
getNu
();
83
}
84
85
protected
:
86
double
mu
;
// location
87
double
s2
;
// scale squared (variance)
88
double
nu
;
// degrees of freedom
89
};
90
91
}
/* namespace gpr */
92
93
#endif
/* GPR_PRIOR_PRIORPARAMETERS_H_ */
x
@ x
Definition
Enums.h:28
Field.h
gpr::PriorBase::nu
double nu
Definition
PriorBase.h:88
gpr::PriorBase::clear
void clear()
Definition
PriorBase.h:43
gpr::PriorBase::setMu
void setMu(const double value)
Definition
PriorBase.h:63
gpr::PriorBase::setS2
void setS2(const double value)
Definition
PriorBase.h:68
gpr::PriorBase::calculateLogPriorGradient
virtual FieldMatrixd calculateLogPriorGradient(const FieldMatrixd &x)
Definition
PriorBase.h:35
gpr::PriorBase::setNu
void setNu(const double value)
Definition
PriorBase.h:73
gpr::PriorBase::calculateLogPrior
virtual double calculateLogPrior(const FieldMatrixd &)
Definition
PriorBase.h:30
gpr::PriorBase::mu
double mu
Definition
PriorBase.h:86
gpr::PriorBase::setParameters
void setParameters(const PriorBase &other)
Definition
PriorBase.h:78
gpr::PriorBase::getMu
double getMu() const
Definition
PriorBase.h:48
gpr::PriorBase::s2
double s2
Definition
PriorBase.h:87
gpr::PriorBase::getS2
double getS2() const
Definition
PriorBase.h:53
gpr::PriorBase::getNu
double getNu() const
Definition
PriorBase.h:58
gpr::PriorBase::PriorBase
PriorBase()
Definition
PriorBase.h:25
gpr
Gaussian-process regression, kernels, priors, and the searches that run on the surrogate.
Definition
Macros.h:16
gpr::FieldMatrixd
Eigen::Matrix< double, EigenDynamic, EigenDynamic, FieldMatrixStorage > FieldMatrixd
Definition
Macros.h:25
gpr
prior
PriorBase.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf