Skip to content

Commit 74b1f4a

Browse files
committed
Update maven
1 parent 8821f0a commit 74b1f4a

39 files changed

Lines changed: 493 additions & 309 deletions

File tree

.gitignore

Lines changed: 210 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,210 @@
1-
**/bin
2-
**/*.class
3-
**/CVS
4-
**/classes
5-
**/.settings
6-
.idea
7-
**/*.iml
8-
**/target/
1+
# Created by https://www.toptal.com/developers/gitignore/api/eclipse,java,java-web,intellij,visualstudiocode
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=eclipse,java,java-web,intellij,visualstudiocode
3+
4+
### Eclipse ###
5+
.metadata
6+
bin/
7+
tmp/
8+
*.tmp
9+
*.bak
10+
*.swp
11+
*~.nib
12+
local.properties
13+
.settings/
14+
.loadpath
15+
.recommenders
16+
.classpath
17+
.project
18+
19+
# External tool builders
20+
.externalToolBuilders/
21+
22+
# Locally stored "Eclipse launch configurations"
23+
*.launch
24+
25+
# PyDev specific (Python IDE for Eclipse)
26+
*.pydevproject
27+
28+
# CDT-specific (C/C++ Development Tooling)
29+
.cproject
30+
31+
# CDT- autotools
32+
.autotools
33+
34+
# Java annotation processor (APT)
35+
.factorypath
36+
37+
# PDT-specific (PHP Development Tools)
38+
.buildpath
39+
40+
# sbteclipse plugin
41+
.target
42+
43+
# Tern plugin
44+
.tern-project
45+
46+
# TeXlipse plugin
47+
.texlipse
48+
49+
# STS (Spring Tool Suite)
50+
.springBeans
51+
52+
# Code Recommenders
53+
.recommenders/
54+
55+
# Annotation Processing
56+
.apt_generated/
57+
.apt_generated_test/
58+
59+
# Scala IDE specific (Scala & Java development for Eclipse)
60+
.cache-main
61+
.scala_dependencies
62+
.worksheet
63+
64+
# Uncomment this line if you wish to ignore the project description file.
65+
# Typically, this file would be tracked if it contains build/dependency configurations:
66+
#.project
67+
68+
### Eclipse Patch ###
69+
# Spring Boot Tooling
70+
.sts4-cache/
71+
72+
### Intellij ###
73+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
74+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
75+
76+
# User-specific stuff
77+
.idea/**/workspace.xml
78+
.idea/**/tasks.xml
79+
.idea/**/usage.statistics.xml
80+
.idea/**/dictionaries
81+
.idea/**/shelf
82+
83+
# Generated files
84+
.idea/**/contentModel.xml
85+
86+
# Sensitive or high-churn files
87+
.idea/**/dataSources/
88+
.idea/**/dataSources.ids
89+
.idea/**/dataSources.local.xml
90+
.idea/**/sqlDataSources.xml
91+
.idea/**/dynamic.xml
92+
.idea/**/uiDesigner.xml
93+
.idea/**/dbnavigator.xml
94+
95+
# Gradle
96+
.idea/**/gradle.xml
97+
.idea/**/libraries
98+
99+
# Gradle and Maven with auto-import
100+
# When using Gradle or Maven with auto-import, you should exclude module files,
101+
# since they will be recreated, and may cause churn. Uncomment if using
102+
# auto-import.
103+
.idea/
104+
*.iml
105+
*.ipr
106+
107+
# CMake
108+
cmake-build-*/
109+
110+
# Mongo Explorer plugin
111+
.idea/**/mongoSettings.xml
112+
113+
# File-based project format
114+
*.iws
115+
116+
# IntelliJ
117+
out/
118+
119+
# mpeltonen/sbt-idea plugin
120+
.idea_modules/
121+
122+
# JIRA plugin
123+
atlassian-ide-plugin.xml
124+
125+
# Cursive Clojure plugin
126+
.idea/replstate.xml
127+
128+
# Crashlytics plugin (for Android Studio and IntelliJ)
129+
com_crashlytics_export_strings.xml
130+
crashlytics.properties
131+
crashlytics-build.properties
132+
fabric.properties
133+
134+
# Editor-based Rest Client
135+
.idea/httpRequests
136+
137+
# Android studio 3.1+ serialized cache file
138+
.idea/caches/build_file_checksums.ser
139+
140+
### Intellij Patch ###
141+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
142+
143+
# *.iml
144+
# modules.xml
145+
# .idea/misc.xml
146+
# *.ipr
147+
148+
# Sonarlint plugin
149+
# https://plugins.jetbrains.com/plugin/7973-sonarlint
150+
.idea/**/sonarlint/
151+
152+
# SonarQube Plugin
153+
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
154+
.idea/**/sonarIssues.xml
155+
156+
# Markdown Navigator plugin
157+
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
158+
.idea/**/markdown-navigator.xml
159+
.idea/**/markdown-navigator-enh.xml
160+
.idea/**/markdown-navigator/
161+
162+
# Cache file creation bug
163+
# See https://youtrack.jetbrains.com/issue/JBR-2257
164+
.idea/$CACHE_FILE$
165+
166+
# CodeStream plugin
167+
# https://plugins.jetbrains.com/plugin/12206-codestream
168+
.idea/codestream.xml
169+
170+
### Java ###
171+
# Compiled class file
172+
*.class
173+
174+
# Log file
175+
*.log
176+
177+
# BlueJ files
178+
*.ctxt
179+
180+
# Mobile Tools for Java (J2ME)
181+
.mtj.tmp/
182+
183+
# Package Files #
184+
*.jar
185+
*.war
186+
*.nar
187+
*.ear
188+
*.zip
189+
*.tar.gz
190+
*.rar
191+
192+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
193+
hs_err_pid*
194+
195+
### Java-Web ###
196+
## ignoring target file
197+
target/
198+
199+
### VisualStudioCode ###
200+
.vscode/*
201+
!.vscode/tasks.json
202+
!.vscode/launch.json
203+
*.code-workspace
204+
205+
### VisualStudioCode Patch ###
206+
# Ignore all local history of files
207+
.history
208+
.ionide
209+
210+
# End of https://www.toptal.com/developers/gitignore/api/eclipse,java,java-web,intellij,visualstudiocode

BirIslem/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<artifactId>BirIslem</artifactId>
88
<name>Bir İşlem Yarışması</name>
99
<properties>
10-
<main.class>birislem.BirIslemApp</main.class>
10+
<main.class>birislem.Main</main.class>
1111
</properties>
1212
<parent>
13-
<groupId>javaexamples</groupId>
14-
<artifactId>main</artifactId>
13+
<groupId>net</groupId>
14+
<artifactId>javaexamples</artifactId>
1515
<version>1.0</version>
1616
<relativePath>../pom.xml</relativePath>
1717
</parent>

BirIslem/src/main/java/birislem/Kromozom.java renamed to BirIslem/src/main/java/birislem/Chromosome.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@
1919
*/
2020
package birislem;
2121

22-
import birislem.araclar.SayiArac;
23-
import birislem.exception.KesirliBolmeException;
24-
import birislem.exception.SonucErkenBulunduException;
22+
import birislem.exception.EarlyConvergenceException;
23+
import birislem.exception.FractionDivideException;
24+
import birislem.utility.NumberUtility;
2525

2626
import java.util.Arrays;
2727

2828
/**
2929
* Bu sinif bireylerimizin (krozomlarin) genlerini saklayan ve ilgili
3030
* metotlarini gerceklestiren siniftir.
3131
*/
32-
public class Kromozom implements Comparable<Kromozom> {
32+
public class Chromosome implements Comparable<Chromosome> {
3333

3434
// Hesaplama sayilarinin kullanim sirasini tutan saha
3535
private int[] sayilar;
3636
// Kromozomun hesaplamadaki operatorlerini ve sirasini tutan saha
3737
private int[] operatorler;
3838

3939
// Yapici
40-
Kromozom(int[] _sayilar, int[] _operatorler) {
40+
Chromosome(int[] _sayilar, int[] _operatorler) {
4141
sayilar = _sayilar;
4242
operatorler = _operatorler;
4343
}
@@ -49,19 +49,19 @@ public class Kromozom implements Comparable<Kromozom> {
4949
*/
5050
private int getDeger() {
5151
try {
52-
return SayiArac.getInstance().getHesapSonuc(sayilar, operatorler);
53-
} catch (KesirliBolmeException kbe) {
52+
return NumberUtility.getInstance().getHesapSonuc(sayilar, operatorler);
53+
} catch (FractionDivideException kbe) {
5454
// Eger kesirli bolme varsa bu kromozom hatalidir
5555
// En dusuk deger olan 0'i dondurmelidir.
5656
return 0;
57-
} catch (SonucErkenBulunduException sebe) {
57+
} catch (EarlyConvergenceException sebe) {
5858
// Sayiya erken ulastik
5959
// Pozitifini alalim
6060
// Bu sayidan sonraki sayilari atacagiz
61-
for (int i = sebe.getHangiOperator(); i < operatorler.length; i++) {
62-
operatorler[i] = SayiArac.KULLANMA;
61+
for (int i = sebe.getWhichOperator(); i < operatorler.length; i++) {
62+
operatorler[i] = NumberUtility.KULLANMA;
6363
}// Hedef sayiya ulastik
64-
return SayiArac.getInstance().getHedefSayi();
64+
return NumberUtility.getInstance().getHedefSayi();
6565
}
6666
}
6767

@@ -86,7 +86,7 @@ int uygunluk() {
8686
// 0'dan mutlak olarak uzakligi bu kromozomun uygunlugudur
8787
// Uygunlugu 0'a yakin olan kromozom daha uzak olan kromozomdan kotudur
8888
return java.lang.Math.abs(getDeger()
89-
- SayiArac.getInstance().getHedefSayi());
89+
- NumberUtility.getInstance().getHedefSayi());
9090
}
9191

9292
void setSayi(int hangi, int sayi) {
@@ -101,15 +101,15 @@ void setOperator(int hangi, int operator) {
101101
* Kromozomu ekrana yazdirmada kullanilan ve metin olarak ureten metot
102102
*/
103103
public String toString() {
104-
return SayiArac.getInstance().toString(sayilar, operatorler)
104+
return NumberUtility.getInstance().toString(sayilar, operatorler)
105105
+ " Değer:" + getDeger() + " Uygunluk:" + uygunluk();
106106
}
107107

108108
/**
109109
* Siralama isleminde kullanilan karsilastirma metotu
110110
*/
111111
@Override
112-
public int compareTo(Kromozom o) {
112+
public int compareTo(Chromosome o) {
113113
// Sonuc 0 ise iki kromozom aynidir
114114
// Sonuc >0 ise ilk kromozom ikincisinden kotudur
115115
// Sonuc <0 ise ilk kromozom ikincisinden iyidir
@@ -120,7 +120,7 @@ public int compareTo(Kromozom o) {
120120
* Bu metot bu kromozomun aynisinin farkli bir bellek alaninda
121121
* olusturulmasini sagliyor
122122
*/
123-
Kromozom getClone() {
124-
return new Kromozom(Arrays.copyOf(sayilar, sayilar.length), Arrays.copyOf(operatorler, operatorler.length));
123+
Chromosome getClone() {
124+
return new Chromosome(Arrays.copyOf(sayilar, sayilar.length), Arrays.copyOf(operatorler, operatorler.length));
125125
}
126126
}

0 commit comments

Comments
 (0)