31#include "DGtal/base/Common.h"
32#include "DGtal/base/LabelledMap.h"
42 cerr <<
"Usage: ./labelledMapBestParameters <L> <p> <q>" << endl
43 <<
" Tries to find the best values N and M which will minimized" << endl
44 <<
" the memory usage of a LabelledMap, for the distribution" << endl
45 <<
" specified by the parameters." << endl
46 <<
" - L: max number of labels." << endl
47 <<
" - p: If there is a possibility to have a data, this probability is used to define a geometric distribution that defines the number of data (ie valid labels) at this place. The smaller, the higher is the expectation. 0.5 means E(X) = 1.." << endl
48 <<
" - q: probability that there is no data at this location." << endl;
50int main(
int argc,
char** argv )
59 std::pair< unsigned int, unsigned int > res =
60 DGtal::detail::argminLabelledMapMemoryUsageForGeometricDistribution<Data>
61 ( atoi( argv[ 1 ] ), atof( argv[ 3 ] ), atof( argv[ 2 ] ) );
62 cout << res.first <<
" " << res.second << endl;
DGtal is the top-level namespace which contains all DGtal functions and types.