我boost::accumulators::tag::extended_p_square_quantile
用于计算百分位数。在这种情况下,我还需要将概率提供给累加器,所以我这样做了m_acc = AccumulatorType(boost::accumulators::extended_p_square_probabilities = probs);
,其中 probs 是一个包含概率的向量。
概率向量中的值是{0.5,0.3,0.9,0.7}
我为累加器提供了一些示例值。
但是,当我尝试使用boost::accumulators::quantile(m_acc, boost::accumulators::quantile_probability = probs[0]);
它来获取百分位数时,它会返回不正确的值,有时甚至会返回 nan。
这里有什么问题?