pu

parent b2bb3219
......@@ -94,9 +94,10 @@ static const char* model_learn_algorithm_names[] = {"Model learning by tradition
};
static preview_iter_t preview_iter_catalog[] = {preview_none,
preview_mosaic,
0
};
static const char* preview_iter_names[] = {"None"
static const char* preview_iter_names[] = {"None","Mosaic"
};
static int count_options(const char* names[]) {
......
#include "preview.h"
#include "bmf_util.h"
idx_t preview_none( const binary_matrix& X,
const binary_matrix& H,
......@@ -10,3 +11,16 @@ idx_t preview_none( const binary_matrix& X,
return 0;
}
idx_t preview_mosaic( const binary_matrix& X,
const binary_matrix& H,
const binary_matrix& E,
const binary_matrix& D,
const binary_matrix& A,
const idx_t inner_iter,
const idx_t outer_iter) {
char tmpfname[128];
snprintf(tmpfname,127,"%04lu_%04lu_iter.pbm",outer_iter,inner_iter);
render_mosaic(D,tmpfname);
return 0;
}
\ No newline at end of file
......@@ -16,4 +16,12 @@ idx_t preview_none( const binary_matrix& X,
const idx_t inner_iter,
const idx_t outer_iter);
idx_t preview_mosaic( const binary_matrix& X,
const binary_matrix& H,
const binary_matrix& E,
const binary_matrix& D,
const binary_matrix& A,
const idx_t inner_iter,
const idx_t outer_iter);
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment