summaryrefslogtreecommitdiff
path: root/src/Persistence_representations/example/sliced_wasserstein.cpp
diff options
context:
space:
mode:
authormcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-02-16 15:43:29 +0000
committermcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-02-16 15:43:29 +0000
commitff0dc023588e3b33bc4bc7f26ce1f68c647ae441 (patch)
treea6f839885acbbefe07ffeeca996eea77dc136e96 /src/Persistence_representations/example/sliced_wasserstein.cpp
parent69c683e663329d8410ca77c371f877bcc3bef906 (diff)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/kernels@3251 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 80f084fc990df6e5c6b60ac83514220aba2ceb5c
Diffstat (limited to 'src/Persistence_representations/example/sliced_wasserstein.cpp')
-rw-r--r--src/Persistence_representations/example/sliced_wasserstein.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Persistence_representations/example/sliced_wasserstein.cpp b/src/Persistence_representations/example/sliced_wasserstein.cpp
index 673d8474..f153fbe8 100644
--- a/src/Persistence_representations/example/sliced_wasserstein.cpp
+++ b/src/Persistence_representations/example/sliced_wasserstein.cpp
@@ -43,13 +43,17 @@ int main(int argc, char** argv) {
persistence2.push_back(std::make_pair(3, 5));
persistence2.push_back(std::make_pair(6, 10));
- SW SW1(persistence1);
- SW SW2(persistence2);
- std::cout << SW1.compute_sliced_wasserstein_distance(SW2,100) << std::endl;
- std::cout << SW1.compute_sliced_wasserstein_distance(SW2,-1) << std::endl;
- std::cout << SW1.compute_scalar_product(SW2,1,100) << std::endl;
- std::cout << SW1.distance(SW2,1,100,1) << std::endl;
+ SW sw1(persistence1, 1, 100);
+ SW sw2(persistence2, 1, 100);
+
+ SW swex1(persistence1, 1, -1);
+ SW swex2(persistence2, 1, -1);
+
+ std::cout << sw1.compute_sliced_wasserstein_distance(sw2) << std::endl;
+ std::cout << swex1.compute_sliced_wasserstein_distance(swex2) << std::endl;
+ std::cout << sw1.compute_scalar_product(sw2) << std::endl;
+ std::cout << swex1.distance(swex2) << std::endl;
return 0;
}