7 #include "knowrob/terms/Function.h"
8 #include "knowrob/knowrob.h"
9 #include "knowrob/integration/python/utils.h"
15 functor_(std::move(functor)),
16 arguments_(arguments),
17 variables_(getVariables1()) {
25 std::set<std::string_view> out;
27 out.insert(arg->variables().begin(), arg->variables().end());
36 for (uint32_t i = 0; i <
arguments_.size(); i++) {
45 auto seed =
static_cast<size_t>(0);
57 for (uint32_t i = 0; i <
arguments_.size(); i++) {
71 class_<Function, std::shared_ptr<Function>, bases<Term>>
72 (
"Function", init<std::string_view, const std::vector<TermPtr> &>())
73 .def(init<
const AtomPtr &,
const std::vector<TermPtr> &>())
Function(AtomPtr functor, const std::vector< TermPtr > &arguments)
bool isSameFunction(const Function &other) const
const std::shared_ptr< Atom > functor_
const std::vector< TermPtr > arguments_
void write(std::ostream &os) const override
std::set< std::string_view > getVariables1() const
size_t hashOfFunction() const
void createType< Function >()
std::shared_ptr< Atom > AtomPtr
void hashCombine(std::size_t &seed, const std::size_t &v)