Commit 58f6be36 authored by Timothy  Borunov's avatar Timothy Borunov
Browse files

Working deformation, but with one side potentially bugged

parent aa157b61
Loading
Loading
Loading
Loading
+3 −20
Original line number Diff line number Diff line
@@ -45,29 +45,12 @@
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
            <version>3.6.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.scala-lang/scala-library -->
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
        </dependency>


        <!-- Spark Core for general Spark functionality -->
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-core_2.13</artifactId>
            <version>${spark.version}</version>
        </dependency>

        <!-- Spark MLLib for machine learning -->
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-mllib_2.13</artifactId>
            <version>${spark.version}</version>
            <scope>provided</scope>
            <groupId>com.example</groupId>
            <artifactId>GraphicsTest</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>


+14 −1
Original line number Diff line number Diff line
package Graph;
import org.apache.commons.math3.ml.clustering.Cluster;
import org.apache.commons.math3.ml.clustering.Clusterable;

import java.io.Serializable;
import java.util.Arrays;

/**
@@ -10,6 +14,7 @@ public class VertexKey {
     * The coordinates of the vertex.
     */
    private final float[] coords;
    private Integer index;

    /**
     * Constructs a new {@code VertexKey} instance with the specified coordinates.
@@ -21,6 +26,14 @@ public class VertexKey {
        this.coords = coordinates;
    }

    public void setIndex(Integer in) {
        this.index = in;
    }

    public Integer getIndex() {
        return this.index;
    }

    /**
     * Compares this vertex key to another object for equality.
     * <p>
@@ -59,5 +72,5 @@ public class VertexKey {
     *
     * @return An array of floats representing the coordinates of this vertex.
     */
    public float[] get() {return this.coords;}
    public float[] getPoint() {return this.coords;}
}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ public class readFile {
        int count = 0;
        for (int ii = 0; ii < indexToVertex.size(); ii++ ) {
            tmp = indexToVertex.get(ii);
            for (float jj : tmp.get()) {
            for (float jj : tmp.getPoint()) {
                vertices[count] = jj *3;
                count++;
            }
+107 −365

File changed.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
module org.example.newmat {
    requires javafx.controls;
    requires javafx.fxml;
    requires commons.math3;


    opens org.example.newmat to javafx.fxml;
Loading