summaryrefslogtreecommitdiff
path: root/src/Alpha_complex/example
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-06-19 21:26:17 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-06-19 21:26:17 +0000
commit82f15e71f43a5547627699b625830126dad1c4ab (patch)
tree95a3e9c17f345d040864d65a1e86be953d6da8bd /src/Alpha_complex/example
parent5a2b1b9c0c79ef2b0595cf1f9428596261824b45 (diff)
First create_complex version
weighted periodic option git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alpha_complex_3d_module_vincent@3624 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 7d22e307b12aac1390593541f77cabcccffbc6ad
Diffstat (limited to 'src/Alpha_complex/example')
-rw-r--r--src/Alpha_complex/example/traits_test.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/Alpha_complex/example/traits_test.cpp b/src/Alpha_complex/example/traits_test.cpp
index 4402ecf3..99f1543c 100644
--- a/src/Alpha_complex/example/traits_test.cpp
+++ b/src/Alpha_complex/example/traits_test.cpp
@@ -24,21 +24,31 @@ int main(int argc, char **argv) {
using Weighted_alpha_shapes_3d = Gudhi::alpha_complex::Weighted_alpha_shapes_3d;
std::vector<Weighted_alpha_shapes_3d::Point_3> w_points;
- w_points.push_back(Alpha_shapes_3d::Point_3(1., 2., 3.));
- w_points.push_back(Alpha_shapes_3d::Point_3(6., 5., 4.));
+ w_points.push_back(Weighted_alpha_shapes_3d::Point_3(1., 2., 3.));
+ w_points.push_back(Weighted_alpha_shapes_3d::Point_3(6., 5., 4.));
- std::vector<double> weights = {1., 2.};
+ std::vector<double> weights = {0.01, 0.005};
Gudhi::alpha_complex::Alpha_complex_3d<Weighted_alpha_shapes_3d> weighted_alpha_complex(points, weights);
using Periodic_alpha_shapes_3d = Gudhi::alpha_complex::Periodic_alpha_shapes_3d;
std::vector<Periodic_alpha_shapes_3d::Point_3> p_points;
- p_points.push_back(Alpha_shapes_3d::Point_3(1., 2., 3.));
- p_points.push_back(Alpha_shapes_3d::Point_3(6., 5., 4.));
+ p_points.push_back(Periodic_alpha_shapes_3d::Point_3(1., 2., 3.));
+ p_points.push_back(Periodic_alpha_shapes_3d::Point_3(6., 5., 4.));
Gudhi::alpha_complex::Alpha_complex_3d<Periodic_alpha_shapes_3d> periodic_alpha_complex(points,
0., 0., 0.,
1., 1., 1.);
+ using Weighted_periodic_alpha_shapes_3d = Gudhi::alpha_complex::Weighted_periodic_alpha_shapes_3d;
+ std::vector<Weighted_periodic_alpha_shapes_3d::Point_3> wp_points;
+ wp_points.push_back(Weighted_periodic_alpha_shapes_3d::Point_3(0.1, 0.2, 0.3));
+ wp_points.push_back(Weighted_periodic_alpha_shapes_3d::Point_3(0.6, 0.5, 0.4));
+
+ Gudhi::alpha_complex::Alpha_complex_3d<Weighted_periodic_alpha_shapes_3d>
+ weighted_periodic_alpha_complex(points, weights,
+ 0., 0., 0.,
+ 1., 1., 1.);
+
return 0;
}