38 const Real x0 = node.first;
39 const Real y0 = node.second;
40 const Real x1 = begin.first;
41 const Real y1 = begin.second;
42 const Real x2 = end.first;
43 const Real y2 = end.second;
47 "Line begin and end points must not be the same");
49 return std::abs((y2 - y1) * x0 - (x2 - x1) * y0 + x2 * y1 - y2 * x1) / denom;
55 std::vector<bool> & keep,
61 std::size_t index = 0;
63 for (std::size_t i = begin; i <= end; ++i)
84 for (std::size_t i = begin + 1; i < end; ++i)
93 std::vector<bool> keep(list.size(),
true);
97 result.reserve(std::count_if(keep.begin(), keep.end(), [](
bool k) {
return k; }));
100 for (std::size_t i = 0; i < list.size(); ++i)
102 result.push_back(list[i]);
MetaPhysicL::DualNumber< V, D, asd > abs(const MetaPhysicL::DualNumber< V, D, asd > &a)
std::pair< libMesh::Real, libMesh::Real > FunctionNode
libMesh::Real perpendicularDistance(const FunctionNode &point, const FunctionNode &begin, const FunctionNode &end)
compute the perpendicular distance of a point P from a line defined by begin and end points...
void douglasPeuckerRecurse(const FunctionNodeList &list, const Real epsilon, std::vector< bool > &keep, std::size_t begin, std::size_t end)
std::vector< FunctionNode > FunctionNodeList
FunctionNodeList douglasPeucker(const FunctionNodeList &, libMesh::Real epsilon)
Generate a pruned function node list using the Ramer-Douglas-Peucker algorithm.
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
bool absoluteFuzzyGreaterThan(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Function to check whether a variable is greater than another variable within an absolute tolerance...