hammingWeight(Boolean[] array)

The sum of the true elements of the given boolean array

Parameters

  • Boolean[] array - the boolean array to sum the elements of.

Return type

Integer

Examples

  • simpleRandomLocalClock2.lphy
  • covidDPG.lphy