Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Проект 1 – ДНК #364

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Проект 1 – ДНК #364

wants to merge 12 commits into from

Conversation

aizat
Copy link

@aizat aizat commented Nov 11, 2012

FINAL

[range exchangeObjectAtIndex:i withObjectAtIndex:(arc4random() % (size - i)) + i];
int numberOfNucleotidesToChange = (int)(percentsToChange * size / 100);
for (int i = 0; i < numberOfNucleotidesToChange; i++) {
[self.DNA replaceObjectAtIndex:[[range objectAtIndex:i] intValue] withObject:[[self class] getRandomNucleotideExclude:[self.DNA objectAtIndex:i]]];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Если задать 2 одинаковые ДНК и сделать для одной 100% мутации, то результат измерения различия не даст 100%.
Ошибка в этой строке.
Если не сможешь найти - напиши покажу.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Спасибо, поправил. Надеюсь, там, где и подрузамевалось

@weitek
Copy link

weitek commented Nov 16, 2012

Великолепная работа!
Все очень понятно, красиво и главное используются именно возможности Objectiv-C!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants