|
CMP++: Uncertainty Quantification & Bayesian Calibration
|
Represents a Linear covariance function. More...
#include <covariance.h>


Public Member Functions | |
| Linear (const Linear &)=default | |
| Linear (Linear &&)=default | |
| Linear & | operator= (const Linear &)=default |
| Linear & | operator= (Linear &&)=default |
| Linear (const int &indexX=-1) | |
| Constructs a Linear covariance function. | |
| double | eval (const Eigen::VectorXd &x1, const Eigen::VectorXd &x2, const Eigen::VectorXd &par) const |
| Evaluates the Linear kernel. | |
| double | evalGradient (const Eigen::VectorXd &x1, const Eigen::VectorXd &x2, const Eigen::VectorXd &par, const size_t &i) const |
| Evaluates the partial derivative of the Linear kernel. | |
| double | evalHessian (const Eigen::VectorXd &x1, const Eigen::VectorXd &x2, const Eigen::VectorXd &par, const size_t &i, const size_t &j) const |
| Evaluates the second-order partial derivative of the Linear kernel. | |
Public Member Functions inherited from cmp::covariance::Covariance | |
| virtual | ~Covariance ()=default |
Static Public Member Functions | |
| static std::shared_ptr< Covariance > | make (const int &i) |
| Factory method for creating a linear covariance. | |
Private Attributes | |
| int | indexX_ |
| Coordinate index to project (-1 for full vector inner product). | |
Represents a Linear covariance function.
Mathematical Formulation If indexX_ is -1, computes the full dot product:
\[ k_{\text{lin}}(\mathbf{x}_1, \mathbf{x}_2) = \mathbf{x}_1^T \mathbf{x}_2 \]
Otherwise, evaluates only for the coordinate at indexX_:
\[ k_{\text{lin}}(\mathbf{x}_1, \mathbf{x}_2) = x_{1,\text{index}} \times x_{2,\text{index}} \]
|
default |
|
default |
|
inline |
Constructs a Linear covariance function.
| indexX | Dimension index to evaluate, or -1 for the full inner product. |
|
inlinevirtual |
Evaluates the Linear kernel.
Implements cmp::covariance::Covariance.
|
inlinevirtual |
Evaluates the partial derivative of the Linear kernel.
Implements cmp::covariance::Covariance.
|
inlinevirtual |
Evaluates the second-order partial derivative of the Linear kernel.
Implements cmp::covariance::Covariance.
|
inlinestatic |
Factory method for creating a linear covariance.
|
private |
Coordinate index to project (-1 for full vector inner product).