Belle II Software development
VectorVar Struct Reference

Structure to store all bootstrap replicas. More...

Public Member Functions

void add (Vector3d v)
 Add replica.
 
Vector3d getNom () const
 Get the nominal result.
 
MatrixXd getCov () const
 Get cov matrix with unc.
 

Public Attributes

std::vector< Vector3d > vecs
 Vector of replicas.
 

Detailed Description

Structure to store all bootstrap replicas.

Definition at line 250 of file BoostVectorStandAlone.cc.

Member Function Documentation

◆ add()

void add ( Vector3d  v)
inline

Add replica.

Definition at line 254 of file BoostVectorStandAlone.cc.

254{ vecs.push_back(v); }
std::vector< Vector3d > vecs
Vector of replicas.

◆ getCov()

MatrixXd getCov ( ) const
inline

Get cov matrix with unc.

Definition at line 260 of file BoostVectorStandAlone.cc.

261 {
262 Matrix3d res = Matrix3d::Zero();
263 for (unsigned i = 1; i < vecs.size(); ++i) {
264 Vector3d diff = vecs[i] - vecs[0];
265 res += diff * diff.transpose();
266 }
267 if (vecs.size() > 1)
268 res *= 1. / (vecs.size() - 1);
269 return res;
270
271 }

◆ getNom()

Vector3d getNom ( ) const
inline

Get the nominal result.

Definition at line 257 of file BoostVectorStandAlone.cc.

257{ return vecs[0]; }

Member Data Documentation

◆ vecs

std::vector<Vector3d> vecs

Vector of replicas.

Definition at line 251 of file BoostVectorStandAlone.cc.


The documentation for this struct was generated from the following file: