Loading...
Searching...
No Matches
IntersectionOracle.h
/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
* See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
* Author(s): Siargey Kachanovich
*
* Copyright (C) 2019 Inria
*
* Modification(s):
* - YYYY/MM Author: Description of the modification
*/
#ifndef CONCEPT_COXETER_TRIANGULATION_INTERSECTION_ORACLE_H_
#define CONCEPT_COXETER_TRIANGULATION_INTERSECTION_ORACLE_H_
#include <cstdlib> // for std::size_t
#include <Eigen/Dense>
namespace Gudhi {
namespace coxeter_triangulation {
struct IntersectionOracle {
std::size_t amb_d() const;
std::size_t cod_d() const;
template <class Simplex_handle, class Triangulation>
Query_result<Simplex_handle> intersects(const Simplex_handle& simplex, const Triangulation& triangulation) const;
template <class Simplex_handle, class Triangulation>
Query_result<Simplex_handle> intersects_boundary(const Simplex_handle& simplex,
const Triangulation& triangulation) const;
template <class Triangulation>
bool lies_in_domain(const Eigen::VectorXd& p, const Triangulation& triangulation) const {
Eigen::VectorXd pl_p = make_pl_approximation(domain_fun_, triangulation)(p);
return pl_p(0) < 0;
}
const Function_& function() const;
};
} // namespace coxeter_triangulation
} // namespace Gudhi
#endif
Gudhi::coxeter_triangulation::make_pl_approximation
PL_approximation< Function_, Triangulation_ > make_pl_approximation(const Function_ &function, const Triangulation_ &triangulation)
Static constructor of the piecewise-linear approximation of a function induced by an ambient triangul...
Definition PL_approximation.h:102
Gudhi
Gudhi namespace.
Definition SimplicialComplexForAlpha.h:14
Gudhi::coxeter_triangulation::IntersectionOracle
The concept IntersectionOracle describes the requirements for a type to implement an intersection ora...
Definition IntersectionOracle.h:26
Gudhi::coxeter_triangulation::IntersectionOracle::cod_d
std::size_t cod_d() const
Returns the codomain dimension of the underlying manifold.
Gudhi::coxeter_triangulation::IntersectionOracle::intersects
Query_result< Simplex_handle > intersects(const Simplex_handle &simplex, const Triangulation &triangulation) const
Intersection query with the relative interior of the manifold.
Gudhi::coxeter_triangulation::IntersectionOracle::function
const Function_ & function() const
Returns the function that defines the interior of the manifold.
Gudhi::coxeter_triangulation::IntersectionOracle::intersects_boundary
Query_result< Simplex_handle > intersects_boundary(const Simplex_handle &simplex, const Triangulation &triangulation) const
Intersection query with the boundary of the manifold.
Gudhi::coxeter_triangulation::IntersectionOracle::lies_in_domain
bool lies_in_domain(const Eigen::VectorXd &p, const Triangulation &triangulation) const
Returns true if the input point lies inside the piecewise-linear domain induced by the given ambient ...
Definition IntersectionOracle.h:91
Gudhi::coxeter_triangulation::IntersectionOracle::amb_d
std::size_t amb_d() const
Returns the domain (ambient) dimension of the underlying manifold.
Gudhi::coxeter_triangulation::Query_result
The result of a query by an oracle such as Implicit_manifold_intersection_oracle.
Definition Query_result.h:26