This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum CrossoverType { | |
ONE_POINT_CROSSOVER, TWO_POINT_CROSSOVER, UNIFORM_CROSSOVER, VAR_TO_VAR_CROSSOVER; | |
/** | |
* | |
* @param value should represent one of enum in CrossoverType | |
* @return return suited CrossoverType or ONE_POINT_CROSSOVER of nothing is found | |
*/ | |
public static CrossoverType parse(String value) { | |
final List<CrossoverType> list = Arrays.asList(CrossoverType.values()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CrossoverFactory extends AbstractFactory{ | |
public static ICrossover createCrossover(CrossoverType type) { | |
report(type.name(), "Crossover"); | |
switch (type) { | |
case ONE_POINT_CROSSOVER: | |
return new OnePointCrossover(); | |
case TWO_POINT_CROSSOVER: | |
return new TwoPointCrossover(); | |
case UNIFORM_CROSSOVER: | |
return new UniformCrossover(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boolean consecutiveAscending = true; | |
boolean consecutiveDescending = true; | |
// Check to see if the newPin is made up of consecutive numbers in | |
// ascending order | |
for (int j = 0; j < newPin.length() - 1; j++) { | |
if (Convert.toLong(newPin.substring(j, j + 1)) == null | |
|| Convert.toLong(newPin.substring(j + 1, j + 2)) == null) { | |
consecutiveAscending = false; | |
break; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package kz.moe.classifier; | |
import com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
import com.google.gson.reflect.TypeToken; | |
import kz.moe.classifier.genetic.creature.BasicCreature; | |
import kz.moe.classifier.genetic.creature.Chromosome; | |
import kz.moe.classifier.genetic.creature.Gene; | |
import kz.moe.classifier.genetic.creature.ICreature; | |
import kz.moe.classifier.genetic.crossover.ICrossover; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
а | |
в | |
г | |
е | |
ж | |
и | |
к | |
м | |
о | |
с |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
пример | |
проблемы | |
типа | |
решение | |
делать | |
например | |
проект | |
проект | |
кстати | |
стоит |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
написать | |
решение | |
a | |
вижу | |
class | |
поэтому | |
работать | |
+ | |
джаве | |
new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | | |
1 aasawodli | |
1 abstractrequest | |
1 access | |
1 act | |
1 ae | |
1 afanalyzer | |
1 ago | |
1 ahybsifeo | |
1 air |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 aaaan | |
1 aan | |
1 ab | |
1 abaddnew | |
1 abstract | |
1 abstractrequest | |
1 act | |
1 addressid | |
1 ae | |
1 against |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include<conio.h> | |
#include<math.h> | |
using namespace std; | |
int main() | |
{ | |
int a[10],b,n,c=0; | |
int i=0; | |
cout<<"vvedite nach znachenie golovki:"; |