1%define OT_SpaceFillingC2_doc 2"Space filling C2 (centered L2-discrepancy) computation. 3 4Notes 5----- 6Compute the centered L2 discrepancy: 7 8.. math:: 9 :nowrap: 10 11 \begin{multline*} 12 C^2(X_{d}^N) = \left(\frac{13}{12}\right)^{d} - \frac{2}{N} \sum_{i=1}^{N} \prod_{k=1}^{d} \left( 1 + \frac{1}{2} |x_k^{(i)} - 0.5| - \frac{1}{2} |x_k^{(i)} - 0.5|^2 \right)\\ 13 + \frac{1}{N^2} \sum_{i,j=1}^{N} \prod_{k=1}^{d} \left( 1 + \frac{1}{2} |x_k^{(i)} - 0.5| + \frac{1}{2} |x_k^{(j)} - 0.5| - \frac{1}{2} |x_k^{(i)} - x_k^{(j)}| \right) 14 \end{multline*} 15" 16 17%enddef 18%feature("docstring") OT::SpaceFillingC2 19OT_SpaceFillingC2_doc 20 21// --------------------------------------------------------------------- 22 23%define OT_SpaceFillingC2_evaluate_doc 24"Compute the C2 criterion for a specific design. 25 26Parameters 27---------- 28design : :class:`~openturns.Sample` or 2d array like 29 The design 30 31Returns 32------- 33crit : float 34 The C2 criterion 35 36Examples 37-------- 38>>> import openturns as ot 39>>> # Build an LHS using openturns class 40>>> lhs = ot.LHSExperiment(ot.Uniform(), 100) 41>>> design = lhs.generate() 42>>> # Compute the C2 criterion 43>>> crit = ot.SpaceFillingC2().evaluate(design)" 44%enddef 45%feature("docstring") OT::SpaceFillingC2::evaluate 46OT_SpaceFillingC2_evaluate_doc 47 48// --------------------------------------------------------------------- 49