11#ifndef FUNCTIONS_FUNCTION_SM_IN_RD_H_
12#define FUNCTIONS_FUNCTION_SM_IN_RD_H_
20namespace coxeter_triangulation {
31 Eigen::VectorXd
operator()(
const Eigen::VectorXd& p)
const {
32 Eigen::VectorXd x = p;
33 for (std::size_t i = 0; i < d_; ++i) x(i) -= center_[i];
34 Eigen::VectorXd result = Eigen::VectorXd::Zero(k_);
35 for (std::size_t i = 0; i < m_ + 1; ++i) result(0) += x(i) * x(i);
37 for (std::size_t j = 1; j < k_; ++j) result(j) = x(m_ + j);
42 std::size_t
amb_d()
const {
return d_; };
45 std::size_t
cod_d()
const {
return k_; };
48 Eigen::VectorXd
seed()
const {
49 Eigen::VectorXd result = Eigen::VectorXd::Zero(d_);
51 for (std::size_t i = 0; i < d_; ++i) result(i) += center_[i];
65 : m_(m), k_(d - m), d_(d), r_(r), center_(center) {}
76 : m_(m), k_(d - m), d_(d), r_(r), center_(Eigen::VectorXd::Zero(d_)) {}
87 : m_(m), k_(1), d_(m_ + 1), r_(r), center_(center) {}
96 Function_Sm_in_Rd(
double r, std::size_t m) : m_(m), k_(1), d_(m_ + 1), r_(r), center_(Eigen::VectorXd::Zero(d_)) {}
101 std::size_t m_, k_, d_;
103 Eigen::VectorXd center_;
Gudhi namespace.
Definition: SimplicialComplexForAlpha.h:14
A class for the function that defines an m-dimensional implicit sphere embedded in the d-dimensional ...
Definition: Function_Sm_in_Rd.h:27
Function_Sm_in_Rd(double r, std::size_t m, std::size_t d)
Constructor of the function that defines an m-dimensional implicit sphere embedded in the d-dimension...
Definition: Function_Sm_in_Rd.h:75
std::size_t cod_d() const
Returns the codomain dimension. Same as the codimension of the sphere.
Definition: Function_Sm_in_Rd.h:45
Function_Sm_in_Rd(double r, std::size_t m, std::size_t d, Eigen::VectorXd center)
Constructor of the function that defines an m-dimensional implicit sphere embedded in the d-dimension...
Definition: Function_Sm_in_Rd.h:64
Function_Sm_in_Rd(double r, std::size_t m, Eigen::VectorXd center)
Constructor of the function that defines an m-dimensional implicit sphere embedded in the (m+1)-dimen...
Definition: Function_Sm_in_Rd.h:86
std::size_t amb_d() const
Returns the domain dimension. Same as the ambient dimension of the sphere.
Definition: Function_Sm_in_Rd.h:42
Eigen::VectorXd seed() const
Returns a point on the sphere.
Definition: Function_Sm_in_Rd.h:48
Function_Sm_in_Rd(double r, std::size_t m)
Constructor of the function that defines an m-dimensional implicit sphere embedded in the (m+1)-dimen...
Definition: Function_Sm_in_Rd.h:96
Eigen::VectorXd operator()(const Eigen::VectorXd &p) const
Value of the function at a specified point.
Definition: Function_Sm_in_Rd.h:31