Remove Eigen dependence
This commit is contained in:
parent
fce03995d8
commit
e9dbc71f87
2 changed files with 10 additions and 12 deletions
|
|
@ -22,8 +22,8 @@
|
|||
#include <psemek/util/to_string.hpp>
|
||||
#include <psemek/util/pretty_print.hpp>
|
||||
|
||||
#include <eigen3/Eigen/Core>
|
||||
#include <eigen3/Eigen/Cholesky>
|
||||
//#include <eigen3/Eigen/Core>
|
||||
//#include <eigen3/Eigen/Cholesky>
|
||||
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
|
@ -443,8 +443,8 @@ struct controller
|
|||
// geom::matrix<float, layer3, layer2> m3;
|
||||
// geom::vector<float, layer3> t3;
|
||||
|
||||
Eigen::VectorXf to_eigen() const;
|
||||
void from_eigen(Eigen::VectorXf const & v);
|
||||
//Eigen::VectorXf to_eigen() const;
|
||||
//void from_eigen(Eigen::VectorXf const & v);
|
||||
|
||||
int generation = 0;
|
||||
|
||||
|
|
@ -507,7 +507,7 @@ void controller::randomize(RNG && rng, float amplitude)
|
|||
// visit_v(t3);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Eigen::VectorXf controller::to_eigen() const
|
||||
{
|
||||
Eigen::VectorXf vec;
|
||||
|
|
@ -525,6 +525,7 @@ void controller::from_eigen(Eigen::VectorXf const & v)
|
|||
std::copy(v.data(), v.data() + inputs * outputs, m1.coords);
|
||||
std::copy(v.data() + inputs * outputs, v.data() + (inputs + 1) * outputs, t1.coords);
|
||||
}
|
||||
*/
|
||||
|
||||
template <typename RNG>
|
||||
void controller::mutate(RNG && rng, float amplitude)
|
||||
|
|
@ -699,8 +700,8 @@ struct animation_2d_app
|
|||
float const initial_variance = 10.f;
|
||||
static constexpr auto mutation_amplitude = [](float t){ return std::pow(10.f, 1.f + geom::lerp(0.f, -2.f, t)); };
|
||||
|
||||
Eigen::VectorXf mean;
|
||||
Eigen::MatrixXf covariance;
|
||||
//Eigen::VectorXf mean;
|
||||
//Eigen::MatrixXf covariance;
|
||||
|
||||
float best_score = 0.f;
|
||||
bool const warm_start = false;
|
||||
|
|
@ -1218,8 +1219,8 @@ void animation_2d_app::do_train()
|
|||
population = std::move(new_population);
|
||||
}
|
||||
|
||||
(void)&controller::to_eigen;
|
||||
(void)&controller::from_eigen;
|
||||
//(void)&controller::to_eigen;
|
||||
//(void)&controller::from_eigen;
|
||||
|
||||
std::vector<std::pair<float, std::size_t>> scores(population.size());
|
||||
std::vector<async::future<void>> futures;
|
||||
|
|
|
|||
|
|
@ -18,9 +18,6 @@
|
|||
#include <psemek/random/generator.hpp>
|
||||
#include <psemek/random/uniform.hpp>
|
||||
|
||||
#include <eigen3/Eigen/SVD>
|
||||
#include <eigen3/Eigen/Householder>
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue