-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,007 changed files
with
19,221 additions
and
19,114 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...c/main/java/jaicore/basic/Cancelable.java → ...ava/ai/libs/jaicore/basic/Cancelable.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package jaicore.basic; | ||
package ai.libs.jaicore.basic; | ||
|
||
public interface Cancelable { | ||
public void cancel(); | ||
|
2 changes: 1 addition & 1 deletion
2
...ain/java/jaicore/basic/Combinatorics.java → .../ai/libs/jaicore/basic/Combinatorics.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package jaicore.basic; | ||
package ai.libs.jaicore.basic; | ||
|
||
public abstract class Combinatorics { | ||
|
||
|
64 changes: 32 additions & 32 deletions
64
...in/java/jaicore/basic/EntitySelector.java → ...ai/libs/jaicore/basic/EntitySelector.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
package jaicore.basic; | ||
|
||
import java.util.Collection; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
public abstract class EntitySelector<T> { | ||
protected final Set<T> init; | ||
protected final Set<T> current; | ||
|
||
public EntitySelector(Collection<T> items) { | ||
init = new HashSet<>(items); | ||
current = new HashSet<>(items); | ||
} | ||
|
||
public Set<T> get() { | ||
return new HashSet<>(current); | ||
} | ||
|
||
public Set<T> getInverted() { | ||
Set<T> inverted = new HashSet<>(); | ||
init.forEach(i -> { if (!current.contains(i)) inverted.add(i); }); | ||
return inverted; | ||
} | ||
|
||
public EntitySelector<T> invert() { | ||
Set<T> tmp = new HashSet<>(current); | ||
current.clear(); | ||
init.forEach(i -> { if (!tmp.contains(i)) current.add(i); }); | ||
return this; | ||
} | ||
} | ||
package ai.libs.jaicore.basic; | ||
|
||
import java.util.Collection; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
public abstract class EntitySelector<T> { | ||
protected final Set<T> init; | ||
protected final Set<T> current; | ||
|
||
public EntitySelector(Collection<T> items) { | ||
init = new HashSet<>(items); | ||
current = new HashSet<>(items); | ||
} | ||
|
||
public Set<T> get() { | ||
return new HashSet<>(current); | ||
} | ||
|
||
public Set<T> getInverted() { | ||
Set<T> inverted = new HashSet<>(); | ||
init.forEach(i -> { if (!current.contains(i)) inverted.add(i); }); | ||
return inverted; | ||
} | ||
|
||
public EntitySelector<T> invert() { | ||
Set<T> tmp = new HashSet<>(current); | ||
current.clear(); | ||
init.forEach(i -> { if (!tmp.contains(i)) current.add(i); }); | ||
return this; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...icore/basic/FileIsDirectoryException.java → ...icore/basic/FileIsDirectoryException.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package jaicore.basic; | ||
package ai.libs.jaicore.basic; | ||
|
||
import java.io.IOException; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...src/main/java/jaicore/basic/FileUtil.java → .../java/ai/libs/jaicore/basic/FileUtil.java
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
2 changes: 1 addition & 1 deletion
2
.../src/main/java/jaicore/basic/IGetter.java → ...n/java/ai/libs/jaicore/basic/IGetter.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package jaicore.basic; | ||
package ai.libs.jaicore.basic; | ||
|
||
/** | ||
* gets a property P of an object of class C | ||
|
2 changes: 1 addition & 1 deletion
2
...ic/IInformedObjectEvaluatorExtension.java → ...ic/IInformedObjectEvaluatorExtension.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package jaicore.basic; | ||
package ai.libs.jaicore.basic; | ||
|
||
|
||
/** | ||
|
18 changes: 9 additions & 9 deletions
18
...a/jaicore/basic/ILoggingCustomizable.java → ...s/jaicore/basic/ILoggingCustomizable.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package jaicore.basic; | ||
|
||
public interface ILoggingCustomizable { | ||
|
||
public String getLoggerName(); | ||
|
||
public void setLoggerName(String name); | ||
|
||
} | ||
package ai.libs.jaicore.basic; | ||
|
||
public interface ILoggingCustomizable { | ||
|
||
public String getLoggerName(); | ||
|
||
public void setLoggerName(String name); | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
.../src/main/java/jaicore/basic/IMetric.java → ...n/java/ai/libs/jaicore/basic/IMetric.java
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
4 changes: 2 additions & 2 deletions
4
.../java/jaicore/basic/IObjectEvaluator.java → .../libs/jaicore/basic/IObjectEvaluator.java
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
60 changes: 30 additions & 30 deletions
60
...sic/src/main/java/jaicore/basic/Maps.java → ...main/java/ai/libs/jaicore/basic/Maps.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
package jaicore.basic; | ||
|
||
import java.util.Map; | ||
|
||
public class Maps { | ||
|
||
/** | ||
* Forbid to create an object of ListHelper as there are only static methods allowed here. | ||
*/ | ||
private Maps() { | ||
// intentionally do nothing | ||
} | ||
|
||
public static <K> void increaseCounterInMap(final Map<K, Integer> counterMap, final K key) { | ||
if (counterMap.containsKey(key)) { | ||
counterMap.put(key, counterMap.get(key) + 1); | ||
} else { | ||
counterMap.put(key, 1); | ||
} | ||
} | ||
|
||
public static <K> void increaseCounterInMap(final Map<K, Integer> counterMap, final K key, final int summand) { | ||
if (counterMap.containsKey(key)) { | ||
counterMap.put(key, counterMap.get(key) + summand); | ||
} else { | ||
counterMap.put(key, summand); | ||
} | ||
} | ||
|
||
} | ||
package ai.libs.jaicore.basic; | ||
|
||
import java.util.Map; | ||
|
||
public class Maps { | ||
|
||
/** | ||
* Forbid to create an object of ListHelper as there are only static methods allowed here. | ||
*/ | ||
private Maps() { | ||
// intentionally do nothing | ||
} | ||
|
||
public static <K> void increaseCounterInMap(final Map<K, Integer> counterMap, final K key) { | ||
if (counterMap.containsKey(key)) { | ||
counterMap.put(key, counterMap.get(key) + 1); | ||
} else { | ||
counterMap.put(key, 1); | ||
} | ||
} | ||
|
||
public static <K> void increaseCounterInMap(final Map<K, Integer> counterMap, final K key, final int summand) { | ||
if (counterMap.containsKey(key)) { | ||
counterMap.put(key, counterMap.get(key) + summand); | ||
} else { | ||
counterMap.put(key, summand); | ||
} | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
.../src/main/java/jaicore/basic/MathExt.java → ...n/java/ai/libs/jaicore/basic/MathExt.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package jaicore.basic; | ||
package ai.libs.jaicore.basic; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
2 changes: 1 addition & 1 deletion
2
.../basic/PropertiesLoadFailedException.java → .../basic/PropertiesLoadFailedException.java
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
2 changes: 1 addition & 1 deletion
2
...main/java/jaicore/basic/ResourceUtil.java → ...a/ai/libs/jaicore/basic/ResourceUtil.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package jaicore.basic; | ||
package ai.libs.jaicore.basic; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.File; | ||
|
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
2 changes: 1 addition & 1 deletion
2
...c/main/java/jaicore/basic/ScoredItem.java → ...ava/ai/libs/jaicore/basic/ScoredItem.java
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
2 changes: 1 addition & 1 deletion
2
...in/java/jaicore/basic/StatisticsUtil.java → ...ai/libs/jaicore/basic/StatisticsUtil.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package jaicore.basic; | ||
package ai.libs.jaicore.basic; | ||
|
||
import java.util.Collection; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...c/main/java/jaicore/basic/StringUtil.java → ...ava/ai/libs/jaicore/basic/StringUtil.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package jaicore.basic; | ||
package ai.libs.jaicore.basic; | ||
|
||
|
||
import java.util.Arrays; | ||
|
2 changes: 1 addition & 1 deletion
2
...ic/SystemRequirementsNotMetException.java → ...ic/SystemRequirementsNotMetException.java
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
2 changes: 1 addition & 1 deletion
2
...n/java/jaicore/basic/TempFileHandler.java → ...i/libs/jaicore/basic/TempFileHandler.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package jaicore.basic; | ||
package ai.libs.jaicore.basic; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.Closeable; | ||
|
2 changes: 1 addition & 1 deletion
2
.../src/main/java/jaicore/basic/TimeOut.java → ...n/java/ai/libs/jaicore/basic/TimeOut.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package jaicore.basic; | ||
package ai.libs.jaicore.basic; | ||
|
||
import java.util.concurrent.TimeUnit; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...ic/TooManyConnectionRetriesException.java → ...ic/TooManyConnectionRetriesException.java
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
54 changes: 27 additions & 27 deletions
54
...rc/main/java/jaicore/basic/ValueUtil.java → ...java/ai/libs/jaicore/basic/ValueUtil.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
package jaicore.basic; | ||
|
||
public class ValueUtil { | ||
|
||
/** | ||
* Forbid to create an object of ListHelper as there are only static methods allowed here. | ||
*/ | ||
private ValueUtil() { | ||
// intentionally do nothing | ||
} | ||
|
||
public static String valueToString(final double value, final int decimals) { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append(round(value, decimals)); | ||
while (sb.toString().length() < decimals + 2) { | ||
sb.append("0"); | ||
} | ||
return sb.toString(); | ||
} | ||
|
||
public static double round(final double valueToRound, final int decimals) { | ||
int multiplier = (int) Math.pow(10, decimals); | ||
double raisedValue = Math.round(valueToRound * multiplier); | ||
return raisedValue / multiplier; | ||
} | ||
|
||
} | ||
package ai.libs.jaicore.basic; | ||
|
||
public class ValueUtil { | ||
|
||
/** | ||
* Forbid to create an object of ListHelper as there are only static methods allowed here. | ||
*/ | ||
private ValueUtil() { | ||
// intentionally do nothing | ||
} | ||
|
||
public static String valueToString(final double value, final int decimals) { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append(round(value, decimals)); | ||
while (sb.toString().length() < decimals + 2) { | ||
sb.append("0"); | ||
} | ||
return sb.toString(); | ||
} | ||
|
||
public static double round(final double valueToRound, final int decimals) { | ||
int multiplier = (int) Math.pow(10, decimals); | ||
double raisedValue = Math.round(valueToRound * multiplier); | ||
return raisedValue / multiplier; | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...e/basic/aggregate/IAggregateFunction.java → ...e/basic/aggregate/IAggregateFunction.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package jaicore.basic.aggregate; | ||
package ai.libs.jaicore.basic.aggregate; | ||
|
||
import java.util.List; | ||
|
||
|
7 changes: 7 additions & 0 deletions
7
...re-basic/src/main/java/ai/libs/jaicore/basic/aggregate/reals/IRealsAggregateFunction.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package ai.libs.jaicore.basic.aggregate.reals; | ||
|
||
import ai.libs.jaicore.basic.aggregate.IAggregateFunction; | ||
|
||
public interface IRealsAggregateFunction extends IAggregateFunction<Double> { | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...va/jaicore/basic/aggregate/reals/Max.java → ...bs/jaicore/basic/aggregate/reals/Max.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package jaicore.basic.aggregate.reals; | ||
package ai.libs.jaicore.basic.aggregate.reals; | ||
|
||
import java.util.List; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...a/jaicore/basic/aggregate/reals/Mean.java → ...s/jaicore/basic/aggregate/reals/Mean.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package jaicore.basic.aggregate.reals; | ||
package ai.libs.jaicore.basic.aggregate.reals; | ||
|
||
import java.util.List; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...jaicore/basic/aggregate/reals/Median.java → ...jaicore/basic/aggregate/reals/Median.java
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
2 changes: 1 addition & 1 deletion
2
...va/jaicore/basic/aggregate/reals/Min.java → ...bs/jaicore/basic/aggregate/reals/Min.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package jaicore.basic.aggregate.reals; | ||
package ai.libs.jaicore.basic.aggregate.reals; | ||
|
||
import java.util.List; | ||
|
||
|
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
Oops, something went wrong.