decode genotype into phenotype parameters ph(k) are x,y coordinates [ 0 < x,y < 1 ]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(pikaia_class), | intent(in) | :: | me | |||
integer, | intent(in), | dimension(me%n*me%nd) | :: | gn | ||
real(kind=wp), | intent(out), | dimension(me%n) | :: | ph |
subroutine decode(me,gn,ph) implicit none class(pikaia_class),intent(in) :: me integer,dimension(me%n*me%nd),intent(in) :: gn real(wp),dimension(me%n),intent(out) :: ph integer :: ip,i,j,ii real(wp) :: z z=10.0_wp**(-me%nd) ii=0 do i=1,me%n ip=0 do j=1,me%nd ip=10*ip+gn(ii+j) end do ph(i)=ip*z ii=ii+me%nd end do end subroutine decode