
function [xyw,pointset_stats]=set_cools_haegemans_C_standard(deg)

%--------------------------------------------------------------------
% CUBATURE RULE ON THE SIMPLEX [0 0; 0 1; 1 0] WITH ADE EQUAL TO deg.
% THE CUBATURE RULE IS DESCRIBED IN STANDARD FORM.
%--------------------------------------------------------------------
% INPUT:
% deg: algebraic degree of precision (ADE) of the rule.
%--------------------------------------------------------------------
% OUTPUT:
% xyw: MATRIX OF NODES xyw(:,1:2) AND WEIGHTS xyw(:,3).
%      REMARK: The sum of the weights makes 1/2.
%
% pointset_stats:
%    statistics of the pointset stored in a matrix. Each rows contains
%    degree, cardinality of the full pointset, moment error w.r.t. orthn.
%    Dubiner basis,number of points with negative weights, number of
%    points outside the domain.
%--------------------------------------------------------------------
% SOURCE:
% R. Cools, A. Haegemans,
% Construction of minimal cubature formulae for the square and the triangle
% using invariant theory,
% Department of Computer Science, K.U.Leuven,
% TW Reports vol.TW96, Sept. 1987.
%--------------------------------------------------------------------
% | DEG | CARD | W- | PT.O|   M.E.   |Q.|
%--------------------------------------------------------------------
% |   8 |  15 |   0 |   3 | 3.61e-16 |P0|
%--------------------------------------------------------------------
% LEGEND:
%--------------------------------------------------------------------
% DEG  : algebraic degree of precision
% CARD : cardinality of the pointset
% W-   : negative weights
% PT.O : points outside the simplex [0 0; 1 0; 0 1].
% M.E. : maximum moment error in inf norm.
% Q.: quality of the rule.
%        PI: pos. weights, points in simplex
%        NI: some neg. weights, points in simplex
%        P0: pos. weights, some points out of the simplex
%        N0: some neg. weights, some points out of the simplex
%--------------------------------------------------------------------

switch deg
    
    case   8
        
        % ALG. DEG.:    8
        % PTS CARD.:   15
        % NEG. W.  :    0
        % OUT PTS. :    3
        % M.E.INF. : 3.6e-16
        
        xyw=[
            3.45792011168270685406156417229795e-01 3.62316822156928486364790842344519e+00 1.60583438566802725537790939237446e-10
            3.62316822156924622788665146799758e+00 -2.96896023273751508142481725371908e+00 1.60583438566818157626093881660005e-10
            -2.96896023273753062454716200591065e+00 3.45792011168268520471258398174541e-01 1.60583438566812005470288018516673e-10
            6.51019934589391752188802797718381e-02 8.70165101563563081477070682012709e-01 2.65306244347803671379537604479992e-02
            8.70165101563563081477070682012709e-01 6.47329049774977849374124616588233e-02 2.65306244347803810157415682624560e-02
            6.47329049774977849374124616588233e-02 6.51019934589391335855168563284678e-02 2.65306244347803914240824241232986e-02
            6.51775303648795767408330448233755e-01 3.13477887523732956509547875612043e-01 2.92857176401659057007886843848610e-02
            3.13477887523733012020699106869870e-01 3.47468088274712830210155800614302e-02 2.92857176401659057007886843848610e-02
            3.47468088274712691432277722469735e-02 6.51775303648795767408330448233755e-01 2.92857176401658744757661168023333e-02
            3.13251210671725288658961972032557e-01 6.30621434318956120002042098349193e-01 4.39095567912207718208605911058839e-02
            6.30621434318956120002042098349193e-01 5.61273550093185497056325061748794e-02 4.39095567912207787597544950131123e-02
            5.61273550093185566445264100821078e-02 3.13251210671725344170113203290384e-01 4.39095567912207856986483989203407e-02
            5.13346920639454085133479566138703e-01 2.81041247315110431781448596666451e-01 6.69407676399161738478582606148848e-02
            2.81041247315110376270297365408624e-01 2.05611832045435510840647452823760e-01 6.69407676399161599700704528004280e-02
            2.05611832045435399818344990308105e-01 5.13346920639454307178084491170011e-01 6.69407676399161599700704528004280e-02
            ];
        
        
    otherwise
        xyw=[];
end




pointset_stats=[
    8   15 3.61e-16    0    3
    ];




