This repository has been archived on 2026-03-28. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
eodev/src/doNormalMultiCenter.h
2010-08-18 13:37:17 +02:00

28 lines
677 B
C++

// (c) Thales group, 2010
/*
Authors:
Johann Dreo <johann.dreo@thalesgroup.com>
Caner Candan <caner.candan@thalesgroup.com>
*/
#ifndef _doNormalMultiCenter_h
#define _doNormalMultiCenter_h
#include "doModifierMass.h"
#include "doNormalMulti.h"
template < typename EOT >
class doNormalMultiCenter : public doModifierMass< doNormalMulti< EOT > >
{
public:
typedef typename EOT::AtomType AtomType;
void operator() ( doNormalMulti< EOT >& distrib, EOT& mass )
{
ublas::vector< AtomType > mean( distrib.size() );
std::copy( mass.begin(), mass.end(), mean.begin() );
distrib.mean() = mean;
}
};
#endif // !_doNormalMultiCenter_h