Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
KilianB committed Jun 16, 2021
1 parent 01cc94f commit 970fca9
Show file tree
Hide file tree
Showing 51 changed files with 155 additions and 155 deletions.
19 changes: 18 additions & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
Expand All @@ -34,5 +34,22 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
11 changes: 11 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,15 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1623748406955</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
2 changes: 2 additions & 0 deletions .settings/org.eclipse.jdt.apt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=false
9 changes: 6 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.source=11
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"java.project.sourcePaths": [
"src/test",
"src/main/java"
],
"java.configuration.updateBuildConfiguration": "automatic",
"cSpell.words": [
"ahash",
"hasher"
]
}
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
### Changed
- Move Examples to new repository https://github.com/KilianB/JImageHash-Examples

### Updated
- bump h2 dependency
- bump maven build dependencies

----------------------

Expand Down
65 changes: 13 additions & 52 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<!-- Project settings -->
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.kilianB</groupId>
<groupId>brachtendorf.dev</groupId>
<artifactId>JImageHash</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>

<properties>
<bintrayRepository>maven</bintrayRepository>
<bintrayPackage>JImageHash</bintrayPackage>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand All @@ -34,23 +30,15 @@
</developer>
</developers>

<repositories>
<repository>
<id>jcenter</id>
<url>https://jcenter.bintray.com/</url>
</repository>
</repositories>


<!-- Dependencies -->

<dependencies>

<!-- Fast image access methods and overall utility code -->
<dependency>
<groupId>com.github.kilianB</groupId>
<groupId>dev.brachtendorf</groupId>
<artifactId>UtilityCode</artifactId>
<version>1.5.10-SNAPSHOT</version>
<version>2.0.0</version>
</dependency>

<!-- Required for perceptive hasher -->
Expand All @@ -66,7 +54,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.197</version>
<version>1.4.200</version>
<optional>true</optional>
</dependency>

Expand All @@ -81,54 +69,36 @@
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>11</version>
<version>11.0.2</version>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-web</artifactId>
<version>12-ea+8</version>
<optional>true</optional>
</dependency>



<!-- 9 Gag categorization example -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.8.3</version>
<version>11.0.2</version>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180130</version>
<optional>true</optional>
</dependency>


<!-- Testing -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.3.1</version>
<version>5.7.2</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.3.1</version>
<version>5.7.2</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.3.1</version>
<version>5.7.2</version>
<scope>test</scope>
</dependency>

Expand All @@ -141,8 +111,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
<!-- <excludes> <exclude>**/kilianB/examples/**</exclude> </excludes> -->
</configuration>
</plugin>
Expand Down Expand Up @@ -198,13 +168,4 @@
</plugins>
</build>

<!-- Environment Settings -->
<distributionManagement>
<repository>
<id>bintray-kilianb-maven</id>
<name>kilianb-maven</name>
<url>https://api.bintray.com/maven/kilianb/${bintrayRepository}//${bintrayPackage}/</url>
</repository>
</distributionManagement>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import java.util.Map.Entry;
import java.util.logging.Logger;

import com.github.kilianB.ArrayUtil;
import com.github.kilianB.MathUtil;
import dev.brachtendorf.ArrayUtil;
import dev.brachtendorf.MathUtil;
import com.github.kilianB.hash.Hash;
import com.github.kilianB.hashAlgorithms.HashingAlgorithm;
import com.github.kilianB.matcher.TypedImageMatcher.AlgoSettings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
import java.util.Map.Entry;
import java.util.stream.Collectors;

import com.github.kilianB.ArrayUtil;
import com.github.kilianB.StringUtil;
import dev.brachtendorf.ArrayUtil;
import dev.brachtendorf.StringUtil;
import com.github.kilianB.hash.FuzzyHash;
import com.github.kilianB.hash.Hash;
import com.github.kilianB.mutable.MutableDouble;
import dev.brachtendorf.mutable.MutableDouble;

/**
*
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/github/kilianB/datastructures/KMeans.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import java.util.List;
import java.util.logging.Logger;

import com.github.kilianB.ArrayUtil;
import com.github.kilianB.Require;
import dev.brachtendorf.ArrayUtil;
import dev.brachtendorf.Require;
import com.github.kilianB.hash.FuzzyHash;
import com.github.kilianB.hash.Hash;
import com.github.kilianB.pcg.fast.PcgRSFast;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.Random;

import com.github.kilianB.ArrayUtil;
import dev.brachtendorf.ArrayUtil;
import com.github.kilianB.hash.FuzzyHash;
import com.github.kilianB.hash.Hash;
import com.github.kilianB.pcg.fast.PcgRSFast;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public boolean equals(Object obj) {
if (!(obj instanceof AbstractBinaryTree)) {
return false;
}
AbstractBinaryTree other = (AbstractBinaryTree) obj;
AbstractBinaryTree<?> other = (AbstractBinaryTree<?>) obj;
if (algoId != other.algoId) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public boolean equals(Object obj) {
if (!(obj instanceof Leaf)) {
return false;
}
Leaf other = (Leaf) obj;
Leaf<?> other = (Leaf<?>) obj;
if (data == null) {
if (other.data != null) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.List;
import java.util.PriorityQueue;

import com.github.kilianB.MathUtil;
import dev.brachtendorf.MathUtil;
import com.github.kilianB.datastructures.tree.AbstractBinaryTree;
import com.github.kilianB.datastructures.tree.NodeInfo;
import com.github.kilianB.datastructures.tree.Result;
Expand All @@ -18,11 +18,11 @@
* A binary tree implementation allowing to quickly lookup
*
* be aware that fuzzy trees currently are of one time use and are rendered
* invalid as soon as one of the underlaying hashes changes it's internal
* invalid as soon as one of the underlying hashes changes it's internal
* state.!
*
* TODO for mutability add a list of uncertainties to each node and allow remove
* operation by suppling the old and the new fuzzy hash state
* operation by supplying the old and the new fuzzy hash state
*
* @author Kilian
* @since 3.0.0
Expand Down Expand Up @@ -112,7 +112,7 @@ public List<Result<FuzzyHash>> getNearestNeighbour(Hash hash) {
int treeDepth = hash.getBitResolution();

if (hashLengthDebug != treeDepth) {
throw new IllegalStateException("Tried to get neareast neighbot an incompatible hash to the binary tree");
throw new IllegalStateException("Tried to get neareast neighbor an incompatible hash to the binary tree");
}

PriorityQueue<NodeInfo<FuzzyHash>> queue = new PriorityQueue<>();
Expand All @@ -127,25 +127,20 @@ public List<Result<FuzzyHash>> getNearestNeighbour(Hash hash) {
// Begin search at the root
queue.add(new NodeInfo<FuzzyHash>(root, 0, treeDepth));

// System.out.println("Target: " + hash);

while (!queue.isEmpty()) {

// System.out.println("\nQueue: " + queue);
NodeInfo<FuzzyHash> info = queue.poll();

// If we found a better result ignore it.

// This should scale down with distance
if (info.distance > curBestDistance) {
// System.out.println("Result too far away: " + info + " " + curBestDistance);
continue;
}

// System.out.println(info);
// We reached a leaf
if (info.depth == 0) {
// System.out.println("Leaf Depth : " + info.depth + " " + info.node.getChild(true) + " " + info.node.getChild(false));

@SuppressWarnings("unchecked")
Leaf<FuzzyHash> leaf = (Leaf<FuzzyHash>) info.node;
for (FuzzyHash o : leaf.getData()) {
Expand All @@ -169,8 +164,6 @@ public List<Result<FuzzyHash>> getNearestNeighbour(Hash hash) {

boolean bit = hash.getBitUnsafe(info.depth - 1);

// System.out.println("Depth : " + info.depth + " One: " + info.node.getChild(true) + " Zero: " + info.node.getChild(false));

// Children of the next level
for (int i = 0; i < 2; i++) {
boolean left = i == 0;
Expand All @@ -191,7 +184,7 @@ public List<Result<FuzzyHash>> getNearestNeighbour(Hash hash) {
}
} else {
try {
Leaf node = (Leaf) info.node.getChild(left);
Leaf<?> node = (Leaf<?>) info.node.getChild(left);
if (node != null) {
// TODO add distance?
queue.add(new NodeInfo<>(node, info.distance, info.depth - 1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import com.github.kilianB.datastructures.tree.binaryTree.Node;



/**
* A tree node saving references to it's children.
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/github/kilianB/hash/FuzzyHash.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.math.BigInteger;
import java.util.logging.Logger;

import com.github.kilianB.graphics.ColorUtil;
import dev.brachtendorf.graphics.ColorUtil;
import com.github.kilianB.hashAlgorithms.HashingAlgorithm;

import javafx.scene.paint.Color;
Expand Down
Loading

0 comments on commit 970fca9

Please sign in to comment.