• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

IPODwBDD


Commit MetaInfo

修訂7eaabcbd2cd8e2c72d073b56d71f341c257b2b38 (tree)
時間2018-12-21 10:54:44
作者Tatsuhiro Tsuchiya <t-tutiya@ist....>
CommiterTatsuhiro Tsuchiya

Log Message

add some comments

Change Summary

差異

--- a/.classpath
+++ b/.classpath
@@ -1,7 +1,7 @@
11 <?xml version="1.0" encoding="UTF-8"?>
22 <classpath>
33 <classpathentry kind="src" path="src"/>
4- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre-10.0.2">
4+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
55 <attributes>
66 <attribute name="module" value="true"/>
77 </attributes>
--- a/src/v1/CombinationGenerator.java
+++ b/src/v1/CombinationGenerator.java
@@ -1,9 +1,11 @@
11 package v1;
22
3-class CombinationGenerator {
3+// Naive implementation of Knuth's algorithm
4+public class CombinationGenerator {
45 private int c[];
56 private int j;
67 private final int t;
8+
79 /**
810 * @param n number of things
911 * @param t combination size
@@ -68,7 +70,7 @@ class CombinationGenerator {
6870 return sum;
6971 }
7072
71- static int getCombinationID(int[] c) {
73+ private static int getCombinationID(int[] c) {
7274 int sum = 0;
7375 for (int i = 1; i <= c.length; i++) {
7476 int ci = c[i-1];
@@ -87,6 +89,7 @@ class CombinationGenerator {
8789
8890 static int getTotalNumber(int n, int t) {
8991 int[] comb = new int[t];
92+ // create the last combination
9093 for (int i = 0; i < t; i++) {
9194 comb[i] = n - t + i;
9295 }
--- a/src/v1/IPOGnoconst.java
+++ b/src/v1/IPOGnoconst.java
@@ -5,7 +5,7 @@ import java.util.List;
55
66 import v1.Main.Randstar;
77
8-public class IPOGnoconst extends Generator {
8+class IPOGnoconst extends Generator {
99
1010 protected int matrix[][];
1111 protected int strength;