replace doNormal by doNormalMulti
This commit is contained in:
parent
1653288301
commit
94dd8e16eb
3 changed files with 10 additions and 58 deletions
|
|
@ -123,9 +123,6 @@ public:
|
||||||
::system(ss.str().c_str());
|
::system(ss.str().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
::mkdir(bounds_results_destination.c_str(), 0755); // create once directory
|
|
||||||
=======
|
|
||||||
::mkdir(_bounds_results_destination.c_str(), 0755); // create once directory
|
::mkdir(_bounds_results_destination.c_str(), 0755); // create once directory
|
||||||
|
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
|
|
@ -157,7 +154,6 @@ public:
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
|
|
||||||
int number_of_iterations = 0;
|
int number_of_iterations = 0;
|
||||||
>>>>>>> 36ec42d36204631eb4c25ae7b31a8728903697f8
|
|
||||||
|
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -290,11 +286,7 @@ public:
|
||||||
|
|
||||||
ofs << size << " ";
|
ofs << size << " ";
|
||||||
std::copy(distrib.mean().begin(), distrib.mean().end(), std::ostream_iterator< double >(ofs, " "));
|
std::copy(distrib.mean().begin(), distrib.mean().end(), std::ostream_iterator< double >(ofs, " "));
|
||||||
<<<<<<< HEAD
|
|
||||||
std::copy(distrib.variance().begin(), distrib.variance().end(), std::ostream_iterator< double >(ofs, " "));
|
|
||||||
=======
|
|
||||||
//std::copy(distrib.varcovar().begin(), distrib.varcovar().end(), std::ostream_iterator< double >(ofs, " "));
|
//std::copy(distrib.varcovar().begin(), distrib.varcovar().end(), std::ostream_iterator< double >(ofs, " "));
|
||||||
>>>>>>> 36ec42d36204631eb4c25ae7b31a8728903697f8
|
|
||||||
ofs << std::endl;
|
ofs << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
#ifndef _doNormal_h
|
|
||||||
#define _doNormal_h
|
|
||||||
|
|
||||||
#include "doDistrib.h"
|
|
||||||
#include "doNormalParams.h"
|
|
||||||
|
|
||||||
template < typename EOT >
|
|
||||||
class doNormal : public doDistrib< EOT >, public doNormalParams< EOT >
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
typedef typename EOT::AtomType AtomType;
|
|
||||||
|
|
||||||
doNormal( const ublas::vector< AtomType >& mean, const ublas::symmetric_matrix< AtomType, ublas::lower >& varcovar )
|
|
||||||
: doNormalParams< EOT >( mean, varcovar )
|
|
||||||
{}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // !_doNormal_h
|
|
||||||
|
|
@ -1,36 +1,20 @@
|
||||||
#ifndef _doNormalParams_h
|
#ifndef _doNormalMulti_h
|
||||||
#define _doNormalParams_h
|
#define _doNormalMulti_h
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
#include <boost/numeric/ublas/symmetric.hpp>
|
#include <boost/numeric/ublas/symmetric.hpp>
|
||||||
#include <boost/numeric/ublas/lu.hpp>
|
#include <boost/numeric/ublas/lu.hpp>
|
||||||
|
|
||||||
|
#include "doDistrib.h"
|
||||||
|
|
||||||
namespace ublas = boost::numeric::ublas;
|
namespace ublas = boost::numeric::ublas;
|
||||||
|
|
||||||
>>>>>>> 36ec42d36204631eb4c25ae7b31a8728903697f8
|
|
||||||
template < typename EOT >
|
template < typename EOT >
|
||||||
class doNormalParams
|
class doNormalMulti : public doDistrib< EOT >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
<<<<<<< HEAD
|
|
||||||
doNormalParams(EOT mean, EOT variance)
|
|
||||||
: _mean(mean), _variance(variance)
|
|
||||||
{
|
|
||||||
assert(_mean.size() > 0);
|
|
||||||
assert(_mean.size() == _variance.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
EOT& mean(){return _mean;}
|
|
||||||
EOT& variance(){return _variance;}
|
|
||||||
|
|
||||||
unsigned int size()
|
|
||||||
{
|
|
||||||
assert(_mean.size() == _variance.size());
|
|
||||||
=======
|
|
||||||
typedef typename EOT::AtomType AtomType;
|
typedef typename EOT::AtomType AtomType;
|
||||||
|
|
||||||
doNormalParams
|
doNormalMulti
|
||||||
(
|
(
|
||||||
const ublas::vector< AtomType >& mean,
|
const ublas::vector< AtomType >& mean,
|
||||||
const ublas::symmetric_matrix< AtomType, ublas::lower >& varcovar
|
const ublas::symmetric_matrix< AtomType, ublas::lower >& varcovar
|
||||||
|
|
@ -42,25 +26,19 @@ public:
|
||||||
assert(_mean.size() == _varcovar.size2());
|
assert(_mean.size() == _varcovar.size2());
|
||||||
}
|
}
|
||||||
|
|
||||||
ublas::vector< AtomType >& mean(){return _mean;}
|
|
||||||
ublas::symmetric_matrix< AtomType, ublas::lower >& varcovar(){return _varcovar;}
|
|
||||||
|
|
||||||
unsigned int size()
|
unsigned int size()
|
||||||
{
|
{
|
||||||
assert(_mean.size() == _varcovar.size1());
|
assert(_mean.size() == _varcovar.size1());
|
||||||
assert(_mean.size() == _varcovar.size2());
|
assert(_mean.size() == _varcovar.size2());
|
||||||
>>>>>>> 36ec42d36204631eb4c25ae7b31a8728903697f8
|
|
||||||
return _mean.size();
|
return _mean.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ublas::vector< AtomType >& mean(){return _mean;}
|
||||||
|
ublas::symmetric_matrix< AtomType, ublas::lower >& varcovar(){return _varcovar;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
<<<<<<< HEAD
|
|
||||||
EOT _mean;
|
|
||||||
EOT _variance;
|
|
||||||
=======
|
|
||||||
ublas::vector< AtomType > _mean;
|
ublas::vector< AtomType > _mean;
|
||||||
ublas::symmetric_matrix< AtomType, ublas::lower > _varcovar;
|
ublas::symmetric_matrix< AtomType, ublas::lower > _varcovar;
|
||||||
>>>>>>> 36ec42d36204631eb4c25ae7b31a8728903697f8
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !_doNormalParams_h
|
#endif // !_doNormalMulti_h
|
||||||
Reference in a new issue