Loading...
Searching...
No Matches
Constant_function.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 FUNCTIONS_CONSTANT_FUNCTION_H_
#define FUNCTIONS_CONSTANT_FUNCTION_H_
#include <cstdlib> // for std::size_t
#include <Eigen/Dense>
namespace Gudhi {
namespace coxeter_triangulation {
struct Constant_function {
Eigen::VectorXd operator()(const Eigen::VectorXd& p) const {
return value_;
}
std::size_t amb_d() const { return d_; };
std::size_t cod_d() const { return k_; };
Eigen::VectorXd seed() const { throw "Seed invoked on a constant function.\n"; }
Constant_function() {}
Constant_function(std::size_t d, std::size_t k, const Eigen::VectorXd& value) : d_(d), k_(k), value_(value) {}
private:
std::size_t d_, k_;
Eigen::VectorXd value_;
};
} // namespace coxeter_triangulation
} // namespace Gudhi
#endif
Gudhi
Gudhi namespace.
Definition SimplicialComplexForAlpha.h:14
Gudhi::coxeter_triangulation::Constant_function
A class that encodes a constant function from R^d to R^k. This class does not have any implicit manif...
Definition Constant_function.h:27
Gudhi::coxeter_triangulation::Constant_function::Constant_function
Constant_function(std::size_t d, std::size_t k, const Eigen::VectorXd &value)
Constructor of a constant function from R^d to R^m.
Definition Constant_function.h:53
Gudhi::coxeter_triangulation::Constant_function::seed
Eigen::VectorXd seed() const
No seed point is available. Throws an exception on evocation.
Definition Constant_function.h:42
Gudhi::coxeter_triangulation::Constant_function::operator()
Eigen::VectorXd operator()(const Eigen::VectorXd &p) const
Value of the function at a specified point. The value is constant.
Definition Constant_function.h:31
Gudhi::coxeter_triangulation::Constant_function::cod_d
std::size_t cod_d() const
Returns the codomain dimension. Same as the codimension of the sphere.
Definition Constant_function.h:39
Gudhi::coxeter_triangulation::Constant_function::amb_d
std::size_t amb_d() const
Returns the domain dimension. Same as the ambient dimension of the sphere.
Definition Constant_function.h:36