function order_num = triangle_ncc_order_num ( rule )

%*****************************************************************************80
%
%% TRIANGLE_NCC_ORDER_NUM returns the order of an NCC rule for the triangle.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    29 January 2007
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Peter Silvester,
%    Symmetric Quadrature Formulae for Simplexes,
%    Mathematics of Computation,
%    Volume 24, Number 109, January 1970, pages 95-100.
%
%  Input:
%
%    integer RULE, the index of the rule.
%
%  Output:
%
%    integer ORDER_NUM, the order (number of points) of the rule.
%
  suborder_num = triangle_ncc_suborder_num ( rule );

  suborder(1:suborder_num) = triangle_ncc_suborder ( rule, suborder_num );

  order_num = sum ( suborder(1:suborder_num) );

  return
end
