Sha256: bc3893bc39e43bccf9ae783544e614aee520466bd6cbc9c4a21d7164a683f707
Contents?: true
Size: 500 Bytes
Versions: 214
Compression:
Stored size: 500 Bytes
Contents
module hamming contains function compute(strand1, strand2, distance) character(*) :: strand1, strand2 integer :: distance, i logical :: compute distance = 0 compute = .true. if ( len(strand1) .NE. len(strand2) ) then compute = .false. return end if do i = 1,len(strand1) if (strand1(i:i) .NE. strand2(i:i)) then distance = distance + 1 end if end do end function compute end module hamming
Version data entries
214 entries across 214 versions & 1 rubygems