Commit 2dd0a965 authored by Stefan Sechelmann's avatar Stefan Sechelmann

nodes are comparable by index,

boundary components method deterministic
compile target in build script

git-svn-id: https://svn.math.tu-berlin.de/svn/jtem@1635 f5b180c5-49ee-4939-b20e-b6ed35f0f7b7
parent 4f2ada2e
eclipse.preferences.version=1
encoding/<project>=UTF-8
......@@ -9,38 +9,41 @@
<property name="src" location="src" />
<!-- these folders will be created -->
<property name="build_dir" location="build" />
<property name="javadoc_dir" location="docs/api" />
<property name="release_dir" location="release" />
<property name="source-version" value="1.6"/>
<property name="target-version" value="1.6"/>
<target name="init">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${release_dir}" />
<mkdir dir="${javadoc_dir}" />
<mkdir dir="${build_dir}"/>
<mkdir dir="${release_dir}"/>
<mkdir dir="${javadoc_dir}"/>
</target>
<target name="release" depends= "init, javadoc" description="builds the jar and the javadoc">
<target name="compile" depends="init">
<javac source="${source-version}" target="${target-version}" destdir="${build_dir}" debug="true" includeantruntime="false" encoding="UTF-8">
<src path="${src}"/>
</javac>
</target>
<target name="release" depends= "compile, javadoc" description="builds the jar and the javadoc">
<jar
destfile="${release_dir}/halfedge.jar"
basedir="bin"
includes="
de/jtem/halfedge/**"
basedir="${build_dir}"
update="false"
>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Vendor" value="Stefan Sechelman/ Andre Heydt"/>
<attribute name="Implementation-Vendor" value="Stefan Sechelman and Boris Springborn"/>
<attribute name="Implementation-Title" value="halfedge"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="Implementation-URL" value="http://fs.math.tu-berlin.de:8000/svn/jtem/halfedge/"/>
</manifest>
</jar>
<jar
destfile="${release_dir}/halfedge.jar"
basedir="src"
includes="${sdkpackagedir}/**"
update="true"
/>
</target>
<target name="javadoc" description="generate javadoc in docs/api">
......@@ -55,7 +58,7 @@
</target>
<target name="clean" description="clean up">
<delete dir="${release_dir}" />
<delete dir="${build_dir}" />
<delete dir="${javadoc_dir}"/>
</target>
......
......@@ -44,7 +44,7 @@ abstract public class Node <
V extends Vertex<V, E, F>,
E extends Edge<V, E, F>,
F extends Face<V, E, F>
> {
> implements Comparable<Node<V, E, F>> {
int
index = -1;
......@@ -104,5 +104,10 @@ abstract public class Node <
final public HalfEdgeDataStructure<V, E, F> getHalfEdgeDataStructure() {
return hds;
}
@Override
public int compareTo(Node<V, E, F> o) {
return getIndex() - o.getIndex();
}
}
......@@ -38,6 +38,7 @@ import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import de.jtem.halfedge.Edge;
import de.jtem.halfedge.Face;
......@@ -370,7 +371,7 @@ public final class HalfEdgeUtils {
*/
static public <E extends Edge<?,E,?>> List<List<E>> boundaryComponents(HalfEdgeDataStructure<?,E,?> hds) {
List<List<E>> result = new ArrayList<List<E>>();
Set<E> b = new HashSet<E>(boundaryEdges(hds));
Set<E> b = new TreeSet<E>(boundaryEdges(hds));
while (!b.isEmpty()) {
List<E> c = new LinkedList<E>();
E first = b.iterator().next();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment