3#include <boost/regex.hpp>
7 std::string indent(
' ', indentwidth);
8 std::cout << indent <<
"Symmetric division\n"
9 << indent <<
" first operand\n";
12 std::cout << indent <<
" second operand\n";
21 for (
auto item:
first) {
23 bfuncs.emplace_back(item->clone());
26 for (
auto item:
first)
33 item->divideBy(
first);
34 bfuncs.emplace_back(item->clone());
37 for (
auto item:
first)
47 boost::regex argumentList(
"(,[a-z]+\\(.*)");
48 boost::regex endParenthesis(
"\\)(.*)");
51 std::string str(it,
end);
52 if (!boost::regex_match(str, what, argumentList))
return false;
58 str = std::string(it,
end);
59 if (!boost::regex_match(str, what, endParenthesis))
return false;
61 std::string fullMatch = what[0];
62 std::string rest = what[1];
64 it += (fullMatch.size() - rest.size());
PartBunch< T, Dim >::ConstIterator end(PartBunch< T, Dim > const &bunch)
constexpr KOKKOS_INLINE_FUNCTION auto second()
constexpr KOKKOS_INLINE_FUNCTION auto first()
std::string::iterator iterator
virtual void apply(std::vector< std::shared_ptr< Base > > &bfuncs)=0
static bool parse(iterator &it, const iterator &end, Function *&fun)
virtual void print(int indent)=0
Function * firstOperand_m
Function * secondOperand_m
virtual void print(int indentwidth)
virtual void apply(std::vector< std::shared_ptr< Base > > &bfuncs)
static bool parse_detail(iterator &it, const iterator &end, Function *&fun)