Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
k-means_run.cpp File Reference
#include <examples/k-means/k-means.hpp>
#include <thrill/api/gather.hpp>
#include <thrill/api/generate.hpp>
#include <thrill/api/read_lines.hpp>
#include <thrill/common/logger.hpp>
#include <thrill/common/string.hpp>
#include <tlx/cmdline_parser.hpp>
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <random>
#include <string>
#include <utility>
#include <vector>
+ Include dependency graph for k-means_run.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 
std::ostream & operator<< (std::ostream &os, const SVGColor &c)
 
template<typename Point >
void OutputSVG (const std::string &svg_path, double svg_scale, const DIA< Point > &list, const KMeansModel< Point > &model)
 Output the points and centroids as a SVG drawing. More...
 
template<>
void OutputSVG (const std::string &svg_path, double svg_scale, const DIA< Point< 2 > > &point_dia, const KMeansModel< Point< 2 > > &model)
 Output the points and centroids as a 2-D SVG drawing. More...
 
template<typename Point >
static void RunKMeansFile (thrill::Context &ctx, bool bisecting, size_t dimensions, size_t num_clusters, size_t iterations, double eps, const std::string &svg_path, double svg_scale, const std::vector< std::string > &input_paths)
 
template<typename Point >
static void RunKMeansGenerated (thrill::Context &ctx, bool bisecting, size_t dimensions, size_t num_clusters, size_t iterations, double eps, const std::string &svg_path, double svg_scale, const std::vector< std::string > &input_paths)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const SVGColor &  c 
)

Definition at line 39 of file k-means_run.cpp.

void OutputSVG ( const std::string &  svg_path,
double  svg_scale,
const DIA< Point > &  list,
const KMeansModel< Point > &  model 
)

Output the points and centroids as a SVG drawing.

Definition at line 49 of file k-means_run.cpp.

References tlx::unused().

Referenced by RunKMeansFile(), and RunKMeansGenerated().

void OutputSVG ( const std::string &  svg_path,
double  svg_scale,
const DIA< Point< 2 > > &  point_dia,
const KMeansModel< Point< 2 > > &  model 
)

Output the points and centroids as a 2-D SVG drawing.

Definition at line 60 of file k-means_run.cpp.

References max().

static void RunKMeansFile ( thrill::Context &  ctx,
bool  bisecting,
size_t  dimensions,
size_t  num_clusters,
size_t  iterations,
double  eps,
const std::string &  svg_path,
double  svg_scale,
const std::vector< std::string > &  input_paths 
)
static
static void RunKMeansGenerated ( thrill::Context &  ctx,
bool  bisecting,
size_t  dimensions,
size_t  num_clusters,
size_t  iterations,
double  eps,
const std::string &  svg_path,
double  svg_scale,
const std::vector< std::string > &  input_paths 
)
static