is_condorcet

poisson_approval.is_condorcet(profile)[source]

Whether a profile has one Condorcet winner.

Parameters

profile (Profile) – A profile.

Returns

True if the profile has one Condorcet winner.

Return type

bool

Examples

>>> profile = ProfileOrdinal({'abc': 0.3, 'bac': 0.4, 'cab': 0.3})
>>> is_condorcet(profile)
True

This is just another syntax for:

>>> profile.is_profile_condorcet == 1.0
True

This function is especially convenient when a test function is required, for example when using probability().