Skip to content

Commit

Permalink
69 image based hyperbolic navigator (#73)
Browse files Browse the repository at this point in the history
Co-authored-by: samypr100 <[email protected]>
  • Loading branch information
Birdasaur and samypr100 authored Sep 21, 2024
1 parent 338307f commit 6ac4c0e
Show file tree
Hide file tree
Showing 99 changed files with 1,849 additions and 241 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion nb-configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Without this configuration present, some functionality in the IDE may be limited
-->
<config-data xmlns="http://www.netbeans.org/ns/maven-config-data/1">
<configurations>
<configuration id="http" profiles=""/>
<configuration id="ZeroMQ" profiles=""/>
<configuration id="OutRun" profiles=""/>
<configuration id="DalleWalle" profiles=""/>
<configuration id="GraalVM" profiles=""/>
Expand All @@ -16,7 +18,7 @@ Without this configuration present, some functionality in the IDE may be limited
</config-data>
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
<!--
Properties that influence various parts of the IDE, especially code formatting and the like.
Properties that influence various parts of the IDE, especially code formatting and the like.
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
Expand Down
6 changes: 3 additions & 3 deletions nbactions-4kMemory.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.0.0:exec</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-Dprism.maxvram=2G</exec.vmArgs>
Expand All @@ -23,7 +23,7 @@
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.0.0:exec</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-Dprism.maxvram=2G -Dprism.poolstats=true -agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address}</exec.vmArgs>
Expand All @@ -40,7 +40,7 @@
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.0.0:exec</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-Dprism.maxvram=2G</exec.vmArgs>
Expand Down
6 changes: 3 additions & 3 deletions nbactions-DalleWalle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.0.0:exec</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-Dprism.maxvram=2G</exec.vmArgs>
Expand All @@ -24,7 +24,7 @@
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.0.0:exec</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-Dprism.maxvram=2G -agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address}</exec.vmArgs>
Expand All @@ -43,7 +43,7 @@
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.0.0:exec</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-Dprism.maxvram=2G</exec.vmArgs>
Expand Down
12 changes: 6 additions & 6 deletions nbactions-GraalVM.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<actions>
<action>
<actionName>build</actionName>
<goals>
<goals>
<goal>clean</goal>
<goal>gluonfx:compile</goal>
<goal>gluonfx:link</goal>
</goals>
<properties>
<exec.mainClass>edu.jhuapl.trinity.TrinityMain</exec.mainClass>
</properties>
<exec.mainClass>edu.jhuapl.trinity.TrinityMain</exec.mainClass>
</properties>
</action>
<action>
<actionName>run</actionName>
Expand All @@ -22,7 +22,7 @@
<properties>
<exec.vmArgs></exec.vmArgs>
<exec.args>${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}</exec.args>
<exec.appArgs>--outrun=true --matrix=true</exec.appArgs>
<exec.appArgs>--outrun=true --matrix=true</exec.appArgs>
<exec.mainClass>edu.jhuapl.trinity.TrinityMain</exec.mainClass>
<exec.executable>java</exec.executable>
</properties>
Expand All @@ -34,7 +34,7 @@
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.0.0:exec</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address}</exec.vmArgs>
Expand All @@ -45,5 +45,5 @@
<jpda.listen>true</jpda.listen>
</properties>
</action>

</actions>
6 changes: 3 additions & 3 deletions nbactions-OutRun.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.0.0:exec</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-Dprism.maxvram=2G</exec.vmArgs>
Expand All @@ -25,7 +25,7 @@
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.0.0:exec</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-Dprism.maxvram=2G -agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address}</exec.vmArgs>
Expand All @@ -44,7 +44,7 @@
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.0.0:exec</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-Dprism.maxvram=2G</exec.vmArgs>
Expand Down
55 changes: 55 additions & 0 deletions nbactions-ZeroMQ.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>run</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-Dprism.maxvram=2G</exec.vmArgs>
<exec.args>${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}</exec.args>
<exec.appArgs>--zeromq=true</exec.appArgs>
<exec.mainClass>edu.jhuapl.trinity.TrinityMain</exec.mainClass>
<exec.executable>java</exec.executable>
</properties>
</action>
<action>
<actionName>debug</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-Dprism.maxvram=2G -agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address}</exec.vmArgs>
<exec.args>${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}</exec.args>
<exec.appArgs>--zeromq=true</exec.appArgs>
<exec.mainClass>edu.jhuapl.trinity.TrinityMain</exec.mainClass>
<exec.executable>java</exec.executable>
<jpda.listen>true</jpda.listen>
</properties>
</action>
<action>
<actionName>profile</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-Dprism.maxvram=2G</exec.vmArgs>
<exec.args>${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}</exec.args>
<exec.appArgs>--zeromq=true</exec.appArgs>
<exec.mainClass>edu.jhuapl.trinity.TrinityMain</exec.mainClass>
<exec.executable>java</exec.executable>
</properties>
</action>
</actions>
55 changes: 55 additions & 0 deletions nbactions-http.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>run</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-Dprism.maxvram=2G</exec.vmArgs>
<exec.args>${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}</exec.args>
<exec.appArgs>--http=true</exec.appArgs>
<exec.mainClass>edu.jhuapl.trinity.TrinityMain</exec.mainClass>
<exec.executable>java</exec.executable>
</properties>
</action>
<action>
<actionName>debug</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-Dprism.maxvram=2G -agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address}</exec.vmArgs>
<exec.args>${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}</exec.args>
<exec.appArgs>--http=true</exec.appArgs>
<exec.mainClass>edu.jhuapl.trinity.TrinityMain</exec.mainClass>
<exec.executable>java</exec.executable>
<jpda.listen>true</jpda.listen>
</properties>
</action>
<action>
<actionName>profile</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:3.4.1:exec</goal>
</goals>
<properties>
<exec.vmArgs>-Dprism.maxvram=2G</exec.vmArgs>
<exec.args>${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}</exec.args>
<exec.appArgs>--http=true</exec.appArgs>
<exec.mainClass>edu.jhuapl.trinity.TrinityMain</exec.mainClass>
<exec.executable>java</exec.executable>
</properties>
</action>
</actions>
3 changes: 2 additions & 1 deletion src/main/java/com/clust4j/Clust4j.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;

/**
* The absolute super type for all clust4j objects (models and datasets)
* that should be able to commonly serialize their data.
*
* @author Taylor G Smith
*/
public abstract class Clust4j implements java.io.Serializable {
public abstract class Clust4j implements Serializable {
private static final long serialVersionUID = -4522135376738501625L;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.apache.commons.math3.linear.RealMatrix;
import org.apache.commons.math3.util.FastMath;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Random;
Expand Down Expand Up @@ -95,7 +96,7 @@ static interface Initializer {
int[] getInitialCentroidSeeds(AbstractCentroidClusterer model, double[][] X, int k, final Random seed);
}

public static enum InitializationStrategy implements java.io.Serializable, Initializer, NamedEntity {
public static enum InitializationStrategy implements Serializable, Initializer, NamedEntity {
AUTO {
@Override
public int[] getInitialCentroidSeeds(AbstractCentroidClusterer model, double[][] X, int k, final Random seed) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/clust4j/algo/AbstractClusterer.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.apache.commons.math3.linear.RealMatrix;
import org.apache.commons.math3.util.FastMath;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
Expand All @@ -50,7 +51,7 @@
*/
public abstract class AbstractClusterer
extends BaseModel
implements Loggable, NamedEntity, java.io.Serializable, MetricValidator {
implements Loggable, NamedEntity, Serializable, MetricValidator {

private static final long serialVersionUID = -3623527903903305017L;

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/clust4j/algo/AffinityPropagation.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import com.clust4j.GlobalState;
import com.clust4j.except.ModelNotFitException;
import com.clust4j.log.Log;
import com.clust4j.log.Log.Tag.Algo;
import com.clust4j.log.LogTimer;
import com.clust4j.metrics.pairwise.GeometricallySeparable;
Expand Down Expand Up @@ -291,7 +292,7 @@ public String getName() {

@Override
public Algo getLoggerTag() {
return com.clust4j.log.Log.Tag.Algo.AFFINITY_PROP;
return Log.Tag.Algo.AFFINITY_PROP;
}

/**
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/clust4j/algo/BaseClassifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@
import com.clust4j.metrics.scoring.UnsupervisedMetric;
import org.apache.commons.math3.linear.RealMatrix;

import java.io.Serializable;

import static com.clust4j.metrics.scoring.UnsupervisedMetric.SILHOUETTE;

/**
* An interface for classifiers, both supervised and unsupervised.
*
* @author Taylor G Smith
*/
public interface BaseClassifier extends java.io.Serializable {
public interface BaseClassifier extends Serializable {
public final static SupervisedMetric DEF_SUPERVISED_METRIC = SupervisedMetric.BINOMIAL_ACCURACY;
public final static UnsupervisedMetric DEF_UNSUPERVISED_METRIC = SILHOUETTE;

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/clust4j/algo/BaseModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
import com.clust4j.utils.SynchronicityLock;
import com.clust4j.utils.TableFormatter;

import java.io.Serializable;
import java.text.NumberFormat;

abstract public class BaseModel extends Clust4j implements java.io.Serializable {
abstract public class BaseModel extends Clust4j implements Serializable {
private static final long serialVersionUID = 4707757741169405063L;
public final static TableFormatter formatter;

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/clust4j/algo/BoruvkaAlgorithm.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import org.apache.commons.math3.linear.Array2DRowRealMatrix;
import org.apache.commons.math3.util.FastMath;

import java.io.Serializable;

/**
* A graph traversal algorithm used in identifying the minimum spanning tree
* in a graph for which all edge weights are distinct. Used in conjunction with
Expand All @@ -32,7 +34,7 @@
* @author Taylor G Smith
* @see <a href="https://en.wikipedia.org/wiki/Bor%C5%AFvka%27s_algorithm">Boruvka's algorithm</a>
*/
class BoruvkaAlgorithm implements java.io.Serializable {
class BoruvkaAlgorithm implements Serializable {
private static final long serialVersionUID = 3935595821188876442L;

// the initialization reorganizes the trees
Expand Down
Loading

0 comments on commit 6ac4c0e

Please sign in to comment.