
16 Apr
2014
16 Apr
'14
1:21 p.m.
Thanks for the replies, now it is clearer. However, the minimum dimension I have in my datasets is 100 and I want to run NN with dimension 10000. So, how I am going to initialize a point? template <int CompileTimeDimension> void fill(point& tmp) { for(int j = CompileTimeDimension - 1 ; j >= 0 ; --j) { bg::set<CompileTimeDimension-->(tmp, 5); } }
Maybe something like this (untested, you might have to put these inside a class and make CTD a template parameter of the class, etc.): template <int CTD> void fill(point& tmp) { bg::set<CTD>(tmp, 5); fill<CTD - 1>(tmp, 5); } template <> void fill<0>(point& tmp) { bg::set<0>(tmp, 5); } Ilja