CDT++
Causal Dynamical Triangulations in C++
Loading...
Searching...
No Matches
Torus_d.hpp
Go to the documentation of this file.
1/*******************************************************************************
2 Causal Dynamical Triangulations in C++ using CGAL
3
4 Copyright © 2017 Adam Getchell
5 ******************************************************************************/
6
12
13#ifndef INCLUDE_TORUS_D_HPP_
14#define INCLUDE_TORUS_D_HPP_
15
16#include <CGAL/Cartesian_d.h>
17#include <CGAL/constructions_d.h>
18#include <CGAL/point_generators_d.h>
19#include <fmt/format.h>
20
21#include <vector>
22
23using Kd = CGAL::Cartesian_d<double>;
24using Point = Kd::Point_d;
25using Creator_d = CGAL::Creator_uniform_d<std::vector<double>::iterator, Point>;
26
34inline auto make_d_cube(std::vector<Point> t_points,
35 std::size_t t_number_of_points, int t_dimension)
36{
37 double constexpr size = 1.0;
38
39 fmt::print("Generating {} grid points in {}D\n", t_number_of_points,
40 t_dimension);
41
42 t_points.reserve(t_number_of_points);
43 return points_on_cube_grid_d(t_dimension, size, t_number_of_points,
44 std::back_inserter(t_points),
45 Creator_d(t_dimension));
46}
47
48#endif // INCLUDE_TORUS_D_HPP_
CGAL::Cartesian_d< double > Kd
Random point generators for d-dimensional points in a d-cube per timeslice.
auto make_d_cube(std::vector< Point > t_points, std::size_t t_number_of_points, int t_dimension)
Make a d-dimensional torus.
Definition: Torus_d.hpp:34