Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
henselman-petrusek committed Feb 28, 2020
2 parents 1601164 + 12ee63b commit 1f59381
Showing 22 changed files with 161 additions and 89 deletions.
209 changes: 132 additions & 77 deletions EXAMPLES.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ uuid = "9c0f25c4-2ca1-5870-89f6-52640788da1d"
keywords = ["topological data analysis", "persistent homology"]
license = "GNU"
desc = "High-performance persistent homology calculation, with generators."
version = "1.3.3"
version = "1.3.4"
author = "Gregory Henselman-Petrusek <[email protected]>"

[deps]
Binary file added images/.DS_Store
Binary file not shown.
Binary file added images/circle_h1rep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/circle_h1rep_mds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/circle_h1rep_nolabel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/circle_h1rep_nolabel_nocloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/circle_pc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/circle_pdiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/globe_pc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/globe_pdiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/globe_rep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/globe_rep_mds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torus_h1_barcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torus_h1_pdiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torus_h1rep1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torus_h1rep2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torus_h2_barcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torus_h2_pdiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torus_h2_rep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torus_pc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 28 additions & 11 deletions src/Eirene.jl
Original file line number Diff line number Diff line change
@@ -49,6 +49,16 @@ using DelimitedFiles
using CSV
using Hungarian #added for the Wasserstein distances

##########################################################################################

#### USER TEST FUNCTION

##########################################################################################

function example_function()
print("Welcome to Eirene! Great job running the example function.")
end


##########################################################################################

@@ -5339,14 +5349,6 @@ function classrep_pjs(
cloudedges_orderverts = vetexinverter[cloudedges]
end

##############################################################################################
# WAYPOINT 1
# printval(coords,"coords")
# printval(coords==coords,"coords==coords")
# printval(D["input"]["pc"] == "n/a","D[\"input\"][\"pc\"] == \"n/a\"")
# printval(D["input"]["pc"],"D[\"input\"][\"pc\"]")
##############################################################################################

if coords == []
if D["input"]["pc"] == "n/a"
print("No point cloud is available. Please consider using the mds keyword argument to generate a Euclidean embedding from the distance matrix (see documentation).")
@@ -5385,7 +5387,7 @@ function classrep_pjs(
metricmatrix = hopdistance(edges_orderverts,inputis = "edges")
end
end
coords = classical_mds(metricmatrix,embeddingdim)
coords = transform(fit(MDS, float.(metricmatrix), maxoutdim = embeddingdim, distances=true)) #classical_mds(metricmatrix,embeddingdim)
# coords = round.(coords,10)
model = "pc"
end
@@ -5440,7 +5442,22 @@ function classrep_pjs(
if showedges
faces = classrep(D,dim=dim,class=class)
edges = d1faces(faces)
T3 = edgetrace_pjs(coords,edges,model=model )
if showcloud
T3 = edgetrace_pjs(coords,edges,model=model )
else
# by default vertices in the edge list index into the original
# point cloud; if we're not showing the ambient cloud, then we have
# by this point deleted the "irrelevant" columns from the coordinate
# matrix, which changes the indices. padding with zeros corrects
# for this difference
# note that for design reasons we re-defined classvinoldspace above,
# so must re-define it
classvinoldspace_original = D["nvl2ovl"][classvinnewspace]
coords_padded = zeros(size(coords,1),maximum(classvinoldspace_original))
coords_padded[:,classvinoldspace_original] = coords
T3 = edgetrace_pjs(coords_padded,edges,model=model )
end

append!(data,T3)
end

@@ -6335,7 +6352,7 @@ function hopdistance_sparse(rv,cp)
fringelist = findall(fringenodes)
fringenodes[:].= false
end
H[.!metnodes,i]=m+1
H[.!metnodes,i].=m+1
end
return H
end

0 comments on commit 1f59381

Please sign in to comment.