Set the mean of adaptive normal distrib with an EOT
edoNormalAdaptive is using Eigen3 vectors internally, but the user is most probably using his own EO type. This patch adds a way to change the mean with an EOT instead of an Eigen3 vector.
This commit is contained in:
parent
9ea12568b2
commit
e331e74e46
1 changed files with 15 additions and 0 deletions
|
|
@ -130,7 +130,22 @@ public:
|
|||
Vector path_covar() const {return _p_c;}
|
||||
Vector path_sigma() const {return _p_s;}
|
||||
|
||||
//! Set the mean with an Eigen3 vector
|
||||
void mean( Vector m ) { _mean = m; assert( m.size() == _dim ); }
|
||||
|
||||
/** Set the mean with an EOT instead of an Eigen3 mean
|
||||
*
|
||||
* Explicit copy of the EOT in a vector.
|
||||
*/
|
||||
void mean( EOT m )
|
||||
{
|
||||
Vector center( m.size() );
|
||||
for( unsigned int i=0, end=m.size(); i<end; ++i) {
|
||||
center[i] = m[i];
|
||||
}
|
||||
mean( center );
|
||||
}
|
||||
|
||||
void covar( Matrix c ) { _C = c; assert( c.innerSize() == _dim && c.outerSize() == _dim ); }
|
||||
void coord_sys( Matrix b ) { _B = b; assert( b.innerSize() == _dim && b.outerSize() == _dim ); }
|
||||
void scaling( Vector d ) { _D = d; assert( d.size() == _dim ); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue