Skip to content

Commit

Permalink
merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
afabri committed May 21, 2024
1 parent 2294385 commit d6424d2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/uniform_int_distribution.hpp>
#include <boost/random/uniform_01.hpp>
#include <boost/random/normal_distribution.hpp>
#if defined(CGAL_LINKED_WITH_BOOST_IOSTREAMS) && defined(CGAL_LINKED_WITH_BOOST_SERIALIZATION)
#include <boost/serialization/vector.hpp>
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include <CGAL/Surface_mesh_segmentation/internal/Expectation_maximization.h>

#include <random>
#include <boost/random/normal_distribution.hpp>
/**
* Generates sample points using a few gauissians.
* Then applies gmm fitting on these generated points.
Expand All @@ -15,16 +14,16 @@ int main(void)
engine.seed(1340818006);

// generate random data using gauissians below
std::vector< boost::normal_distribution<double> > distributions;
distributions.push_back(boost::normal_distribution<double>(0.1, 0.05));
distributions.push_back(boost::normal_distribution<double>(0.4, 0.1));
distributions.push_back(boost::normal_distribution<double>(0.55, 0.05));
distributions.push_back(boost::normal_distribution<double>(0.7, 0.1));
distributions.push_back(boost::normal_distribution<double>(0.9, 0.05));
distributions.push_back(boost::normal_distribution<double>(1.0, 0.05));
std::vector< std::normal_distribution<double> > distributions;
distributions.push_back(std::normal_distribution<double>(0.1, 0.05));
distributions.push_back(std::normal_distribution<double>(0.4, 0.1));
distributions.push_back(std::normal_distribution<double>(0.55, 0.05));
distributions.push_back(std::normal_distribution<double>(0.7, 0.1));
distributions.push_back(std::normal_distribution<double>(0.9, 0.05));
distributions.push_back(std::normal_distribution<double>(1.0, 0.05));

std::vector<double> data;
for(std::vector< boost::normal_distribution<double> >::iterator it = distributions.begin();
for(std::vector< std::normal_distribution<double> >::iterator it = distributions.begin();
it != distributions.end(); ++it)
{

Expand All @@ -39,7 +38,7 @@ int main(void)
{
std::size_t center_id = (std::numeric_limits<std::size_t>::max)(), center_counter = 0;;
double min_distance = (std::numeric_limits<double>::max)();
for(std::vector< boost::normal_distribution<double> >::iterator dis_it = distributions.begin();
for(std::vector< std::normal_distribution<double> >::iterator dis_it = distributions.begin();
dis_it != distributions.end(); ++dis_it, ++center_counter)
{
double distance = std::abs(*it - dis_it->mean());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include <CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h>

#include <random>
#include <boost/random/normal_distribution.hpp>
/**
* Generates sample points using a few gauissians.
* Then applies k-means on these generated points.
Expand All @@ -16,16 +15,16 @@ int main(void)
engine.seed(1340818006);

// generate random data using gauissians below
std::vector< boost::normal_distribution<double> > distributions;
distributions.push_back(boost::normal_distribution<double>(0.1, 0.05));
distributions.push_back(boost::normal_distribution<double>(0.4, 0.1));
distributions.push_back(boost::normal_distribution<double>(0.55, 0.05));
distributions.push_back(boost::normal_distribution<double>(0.7, 0.1));
distributions.push_back(boost::normal_distribution<double>(0.9, 0.05));
distributions.push_back(boost::normal_distribution<double>(1.0, 0.05));
std::vector< std::normal_distribution<double> > distributions;
distributions.push_back(std::normal_distribution<double>(0.1, 0.05));
distributions.push_back(std::normal_distribution<double>(0.4, 0.1));
distributions.push_back(std::normal_distribution<double>(0.55, 0.05));
distributions.push_back(std::normal_distribution<double>(0.7, 0.1));
distributions.push_back(std::normal_distribution<double>(0.9, 0.05));
distributions.push_back(std::normal_distribution<double>(1.0, 0.05));

std::vector<double> data;
for(std::vector< boost::normal_distribution<double> >::iterator it = distributions.begin();
for(std::vector< std::normal_distribution<double> >::iterator it = distributions.begin();
it != distributions.end(); ++it)
{
for(std::size_t i = 0; i < 300; ++i) { data.push_back((*it)(engine)); }
Expand All @@ -38,7 +37,7 @@ int main(void)
{
std::size_t center_id = (std::numeric_limits<std::size_t>::max)(), center_counter = 0;;
double min_distance = (std::numeric_limits<double>::max)();
for(std::vector< boost::normal_distribution<double> >::iterator dis_it = distributions.begin();
for(std::vector< std::normal_distribution<double> >::iterator dis_it = distributions.begin();
dis_it != distributions.end(); ++dis_it, ++center_counter)
{
double distance = std::abs(*it - dis_it->mean());
Expand Down

0 comments on commit d6424d2

Please sign in to comment.