


% -*- texinfo -*-
% @deftypefn {Function File} {} hartley_entropy (@var{P})
%
% Compute the Hartley entropy using Reyni entropy of order 0,
% for the given probability distribution.
%
% @math{H\alpha(P(x)) = log{\sum_i (Pi(x)^\alpha)}/(1-\alpha)}
%
% special-cases include, and when alpha=0, it reduces
% to Hartley entropy.
%
% Hartley entropy H0(X) = log|X|, where X=n(P), cardinality of P,
% the pdf of random variable x.
%
% @example
% @group
% hartley_entropy([0.2 0.3 0.5])
% @result{} ans = 1.0986
% @end group
% @end example
% @end deftypefn