[][src]Module appr_dbscan::data_io

Functions

params_from_file

Reads the number of points and their dimensionality contained in a data file. Points must be one for each row and their coordinates must be separated by whitespace.

read_points_from_file

Reads params.cardinality points from a data file assuming that all of them have D components, panicking otherwise. The rsult is stored as a vector of arrays of fixed length D.

write_to_bmp

Same as write_to_bmp_vec but takes in input a DBSCANResult where each point is a fixed length array.

write_to_bmp_vec

Writes the clusterized result to a bmp image using high contrast colors for the different clusters. This assumes that the clusterized data comes from a 24 bit BMP image and writes file_name as a 24 bit BMP image. The clusterized points must have 5 coordinates and they must be in this order to have a valid result: row column B G R