1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
// Copyright (C) 2020 EDF
// All Rights Reserved
// This code is published under the GNU Lesser General Public License (GNU LGPL)
#include <Eigen/Dense>
#include <StOpt/cdf/nDDominanceAlone.h>
using namespace Eigen ;
namespace StOpt
{
ArrayXd fastCDFOnSample(const Eigen::ArrayXXd &p_x, const Eigen::ArrayXd &p_y)
{
ArrayXd cdfDivid(p_y.size());
// dominance excluding current point
nDDominanceAlone(p_x, p_y, cdfDivid);
cdfDivid += p_y;
return cdfDivid / p_y.size();
}
}
|