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
|
|
||||||
44
src/doNormalMulti.h
Normal file
44
src/doNormalMulti.h
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
#ifndef _doNormalMulti_h
|
||||||
|
#define _doNormalMulti_h
|
||||||
|
|
||||||
|
#include <boost/numeric/ublas/symmetric.hpp>
|
||||||
|
#include <boost/numeric/ublas/lu.hpp>
|
||||||
|
|
||||||
|
#include "doDistrib.h"
|
||||||
|
|
||||||
|
namespace ublas = boost::numeric::ublas;
|
||||||
|
|
||||||
|
template < typename EOT >
|
||||||
|
class doNormalMulti : public doDistrib< EOT >
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef typename EOT::AtomType AtomType;
|
||||||
|
|
||||||
|
doNormalMulti
|
||||||
|
(
|
||||||
|
const ublas::vector< AtomType >& mean,
|
||||||
|
const ublas::symmetric_matrix< AtomType, ublas::lower >& varcovar
|
||||||
|
)
|
||||||
|
: _mean(mean), _varcovar(varcovar)
|
||||||
|
{
|
||||||
|
assert(_mean.size() > 0);
|
||||||
|
assert(_mean.size() == _varcovar.size1());
|
||||||
|
assert(_mean.size() == _varcovar.size2());
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int size()
|
||||||
|
{
|
||||||
|
assert(_mean.size() == _varcovar.size1());
|
||||||
|
assert(_mean.size() == _varcovar.size2());
|
||||||
|
return _mean.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
ublas::vector< AtomType >& mean(){return _mean;}
|
||||||
|
ublas::symmetric_matrix< AtomType, ublas::lower >& varcovar(){return _varcovar;}
|
||||||
|
|
||||||
|
private:
|
||||||
|
ublas::vector< AtomType > _mean;
|
||||||
|
ublas::symmetric_matrix< AtomType, ublas::lower > _varcovar;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // !_doNormalMulti_h
|
||||||
Reference in a new issue