47 if( ! parameters.
retrieve(
"Sampler", samplerPtr ) )
53 if ( ! samplerPtr->getEnvironment() )
55 std::string msg =
"Sampler has no environment.\n";
67 size_t layer1, layer2;
71 for( layer1 = 0; layer1 <
num_layers; layer1++ )
77 for( layer1 = 0; layer1 <
num_layers; layer1++ )
78 for(layer2 = layer1+1; layer2 <
num_layers; layer2++)
90 for(
unsigned int ind = 0 ; ind <
num_layers ; ind++ )
92 string layer_id = samplerPtr->getEnvironment()->getLayerPath(ind);
98 result.
store(
"number of correlated layers", (
int)aux );
109 info[
"Sampler"] =
"samplerPtr";
121 info[
"number of correlated layers"] =
"int";
173 std::string msg =
"chisquare needs at least 2 layers.\n";
199 Sample sample = (*it)->environment();
204 Sample const& sample = (*it)->environment();
222 Sample sample = (*it)->environment();
227 Sample const& sample = (*it)->environment();
256 Sample const& sample = (*it)->environment();
258 row = (size_t)floor( ( sample[layer1] -
minimum[layer1] ) /
delta[layer1] );
261 col = (size_t)floor( ( sample[layer2] -
minimum[layer2] ) /
delta[layer2] );
275 for (i = 0; i <
nclass; i++)
278 for ( j = 1; j <
nclass; j++)
282 for (j = 0; j <
nclass; j++)
285 for ( i = 1; i <
nclass; i++)
290 for (i = 1; i <
nclass; i++)
293 for (i = 0; i <
nclass; i++)
294 for (j = 0; j <
nclass; j++)
295 expected[i][j] = col_sum[i] * row_sum[j] / sum;
303 for (i = 0; i <
nclass; i++)
304 for (j = 0; j <
nclass; j++)
319 Scalar delimita[
classLimit] = {0, 3.8415, 5.9915, 7.8147, 9.4877, 11.0705, 12.5916, 14.0671, 15.5073, 16.9190, 18.3070, 19.6751, 21.0261, 22.3620, 23.6848, 24.9958 };
321 for (i = 0; i <
nclass; i++)
322 for (j = 0; j <
nclass; j++)
325 if (chi < delimita[nclass - 1])
bool checkParameters(const PreParameters ¶meters) const
std::vector< OccurrencePtr >::iterator iterator
double Scalar
Type of map values.
static Log * instance()
Returns the instance pointer, creating the object on the first call.
std::map< string, string > stringMap
std::map< string, PreParameters > result_by_layer_
Scalar chicell[classLimit][classLimit]
void setMeasured(size_t layer1, size_t layer2)
Scalar measured[classLimit][classLimit]
std::vector< size_t > statistic1
void error(const char *format,...)
'Error' level.
bool retrieve(const PreMultiContainerKeyT &obj_key, ObjectT &obj_reference) const
void getLayersetResultSpec(stringMap &info)
void store(const PreMultiContainerKeyT &obj_key, const ObjectT &obj_reference)
void setStatistic(size_t layer1, size_t layer2)
std::vector< size_t > statistic2
OccurrencesPtr my_presences
Scalar expected[classLimit][classLimit]
void setNlayers(SamplerPtr samplerPtr)
AlgParamMetadata parameters[NUM_PARAM]
void getLayerResultSpec(stringMap &info)
void getAcceptedParameters(stringMap &info)