Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crossoverのバグを修正 #793

Merged
merged 21 commits into from Oct 12, 2020
Merged

crossoverのバグを修正 #793

merged 21 commits into from Oct 12, 2020

Conversation

shinsuke-mat
Copy link
Member

resolve #790 #755

やったこと

  • 古いcrossoverは一応そのまま.
  • 新たな直列交叉 cascade crossoverクラスを追加
  • 対応するテストを追加
  • 新crossoverの追加に合わせて古crossoverとcrossover adaptorの設計を軽く修正

細かい修正

  • 古いcrossoverのテストを少し改善
  • 細かなリフォーマット漏れの修正

Comment on lines +36 to +46
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final Base base = (Base) o;
return Objects.equals(getTargetLocation(), base.getTargetLocation()) &&
Objects.equals(getOperation(), base.getOperation());
}
Copy link

Choose a reason for hiding this comment

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

In this Pull Request, this code fragment in In this Pull Request, above code fragment is added to below clone set,

public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final JavaBinaryObject that = (JavaBinaryObject) o;
return getKey().equals(that.getKey());
}

public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final Variable variable = (Variable) o;
return isFinal == variable.isFinal && name.equals(variable.name) && fqn.equals(variable.fqn);
}

public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final JavaSourceObject that = (JavaSourceObject) o;
return getKey().equals(that.getKey());
}

Why don't you merge it?

Copy link
Contributor

@hrtwt hrtwt left a comment

Choose a reason for hiding this comment

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

数点コメントさせていただきました.
修正よろしくお願いします.

@codecov-io
Copy link

Codecov Report

Merging #793 into master will increase coverage by 0.00%.
The diff coverage is 85.18%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #793   +/-   ##
=========================================
  Coverage     78.98%   78.99%           
- Complexity      926      939   +13     
=========================================
  Files           149      151    +2     
  Lines          3640     3684   +44     
  Branches        265      271    +6     
=========================================
+ Hits           2875     2910   +35     
- Misses          664      667    +3     
- Partials        101      107    +6     
Impacted Files Coverage Δ Complexity Δ
.../java/jp/kusumotolab/kgenprog/ga/variant/Base.java 71.42% <50.00%> (-28.58%) 6.00 <3.00> (+3.00) ⬇️
.../ga/variant/CascadeCrossoverHistoricalElement.java 66.66% <66.66%> (ø) 1.00 <1.00> (?)
...ab/kgenprog/ga/crossover/SinglePointCrossover.java 96.15% <80.00%> (-3.85%) 6.00 <2.00> (+2.00) ⬇️
...otolab/kgenprog/ga/crossover/UniformCrossover.java 74.07% <80.00%> (+1.34%) 7.00 <2.00> (+2.00)
...ga/codegeneration/DefaultSourceCodeGeneration.java 100.00% <100.00%> (ø) 7.00 <0.00> (+1.00)
...otolab/kgenprog/ga/crossover/CascadeCrossover.java 100.00% <100.00%> (ø) 4.00 <4.00> (?)
...otolab/kgenprog/ga/crossover/CrossoverAdaptor.java 90.00% <100.00%> (-2.00%) 7.00 <4.00> (-2.00)
...motolab/kgenprog/ga/crossover/RandomCrossover.java 100.00% <100.00%> (ø) 9.00 <3.00> (+3.00)
...ain/java/jp/kusumotolab/kgenprog/KGenProgMain.java 97.80% <0.00%> (-0.55%) 29.00% <0.00%> (-1.00%)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update df4c370...9599224. Read the comment docs.

@shinsuke-mat
Copy link
Member Author

丁寧にthx
修正しました

Copy link
Contributor

@hrtwt hrtwt left a comment

Choose a reason for hiding this comment

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

修正ありがとうございます.
他には問題ないように思うのでマージします.
お疲れ様でした.

@hrtwt hrtwt merged commit b6847ab into master Oct 12, 2020
@hrtwt hrtwt deleted the fix-crossover-bug branch October 12, 2020 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crossoverがうまく働いていない
3 participants