empty constructors for distributions, that defaults to 1 dimension
This commit is contained in:
parent
948903ac18
commit
0f73b7633a
2 changed files with 20 additions and 2 deletions
|
|
@ -44,7 +44,7 @@ public:
|
||||||
typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; // column vectors ( n lines, 1 column)
|
typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector; // column vectors ( n lines, 1 column)
|
||||||
typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix;
|
typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix;
|
||||||
|
|
||||||
edoNormalAdaptive( unsigned int dim ) :
|
edoNormalAdaptive( unsigned int dim = 1 ) :
|
||||||
_dim(dim),
|
_dim(dim),
|
||||||
_mean( Vector::Zero(dim) ),
|
_mean( Vector::Zero(dim) ),
|
||||||
_C( Matrix::Identity(dim,dim) ),
|
_C( Matrix::Identity(dim,dim) ),
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,15 @@ class edoNormalMulti : public edoDistrib< EOT >
|
||||||
public:
|
public:
|
||||||
typedef typename EOT::AtomType AtomType;
|
typedef typename EOT::AtomType AtomType;
|
||||||
|
|
||||||
|
edoNormalMulti( unsigned int dim = 1 ) :
|
||||||
|
_mean( const ublas::vector<AtomType>(0,dim) ),
|
||||||
|
_varcovar( const ublas::identity_matrix<AtomType>(dim) )
|
||||||
|
{
|
||||||
|
assert(_mean.size() > 0);
|
||||||
|
assert(_mean.size() == _varcovar.size1());
|
||||||
|
assert(_mean.size() == _varcovar.size2());
|
||||||
|
}
|
||||||
|
|
||||||
edoNormalMulti
|
edoNormalMulti
|
||||||
(
|
(
|
||||||
const ublas::vector< AtomType >& mean,
|
const ublas::vector< AtomType >& mean,
|
||||||
|
|
@ -86,6 +95,15 @@ public:
|
||||||
typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector;
|
typedef Eigen::Matrix< AtomType, Eigen::Dynamic, 1> Vector;
|
||||||
typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix;
|
typedef Eigen::Matrix< AtomType, Eigen::Dynamic, Eigen::Dynamic> Matrix;
|
||||||
|
|
||||||
|
edoNormalMulti( unsigned int dim = 1 ) :
|
||||||
|
_mean( Vector::Zero(dim) ),
|
||||||
|
_varcovar( Matrix::Identity(dim,dim) )
|
||||||
|
{
|
||||||
|
assert(_mean.size() > 0);
|
||||||
|
assert(_mean.size() == _varcovar.size1());
|
||||||
|
assert(_mean.size() == _varcovar.size2());
|
||||||
|
}
|
||||||
|
|
||||||
edoNormalMulti(
|
edoNormalMulti(
|
||||||
const Vector & mean,
|
const Vector & mean,
|
||||||
const Matrix & varcovar
|
const Matrix & varcovar
|
||||||
|
|
|
||||||
Reference in a new issue