MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::detail::PerturbationStagesOf< N, Bounded > Class Template Reference

segmentIntersectionTriPlaneOrder: it reaches the polynomial path with all three largest ids in the plane More...

#include <MRMesh/MRPrecisePredicates3Poly.h>

Public Member Functions

MR_FORCE_INLINE PerturbationStagesOf (const PreciseVertCoords *vs, const std::int64_t *radices, int n)
 the stages of points vs[0..n-1] with the degrees from getPointDegrees
int numStages () const
 the number of stages, which is the number of different ids (if Bounded, of those before the first one whose degrees do not fit)
std::int64_t place (int s) const
 the degree of the points perturbed first at stage s: every term with them has at least this degree, every term of the earlier stages less
const PointDegree & operator[] (int i) const
 point i with its degree, as perturbed at the last stage (if Bounded, with the degree 0 if no stage perturbs it)
PointDegree at (int i, int s) const
 point i as perturbed at stage s
bool startsAt (int i, int s) const
 whether point i is perturbed first at stage s
template<typename F>
auto firstStage (F &&f, std::int64_t maxDeg=cMaxPolyDAll) const -> std::invoke_result_t< F &, int >

Detailed Description

template<int N, bool Bounded>
class MR::detail::PerturbationStagesOf< N, Bounded >

segmentIntersectionTriPlaneOrder: it reaches the polynomial path with all three largest ids in the plane

the points of a predicate with the degrees of their perturbation, which moves them in stages: at stage s = 1, ..., numStages() only the points with the s smallest ids are perturbed (orient3dPoly leaves the others unperturbed); a polynomial of the predicate that is not zero at stage s already has the leading term of the full one, since every term with a point of a later stage has a larger degree than every term without; and if it was zero at stage s - 1, its terms without the points of stage s cancel one another, so only the products of the terms of degrees from place( s ) up remain (see from in lowestTermOfSumOfProducts); at most N points; if Bounded, the degrees need not fit in int64, and the stages end before the first one whose terms can have degrees above it (see getPointDegrees), so that firstStage gives the empty value if no stage before gives one

Constructor & Destructor Documentation

◆ PerturbationStagesOf()

template<int N, bool Bounded>
MR_FORCE_INLINE MR::detail::PerturbationStagesOf< N, Bounded >::PerturbationStagesOf ( const PreciseVertCoords * vs,
const std::int64_t * radices,
int n )
inline

the stages of points vs[0..n-1] with the degrees from getPointDegrees

Member Function Documentation

◆ at()

template<int N, bool Bounded>
PointDegree MR::detail::PerturbationStagesOf< N, Bounded >::at ( int i,
int s ) const
inlinenodiscard

point i as perturbed at stage s

◆ firstStage()

template<int N, bool Bounded>
template<typename F>
auto MR::detail::PerturbationStagesOf< N, Bounded >::firstStage ( F && f,
std::int64_t maxDeg = cMaxPolyDAll ) const -> std::invoke_result_t<F &, int>
inlinenodiscard

calls f( s ) for the stages s = 1, 2, ... until it returns a value, and returns that value (or the empty one after the last stage); the stages with places above maxDeg are skipped, since they add only the terms of degrees above it

◆ numStages()

template<int N, bool Bounded>
int MR::detail::PerturbationStagesOf< N, Bounded >::numStages ( ) const
inlinenodiscard

the number of stages, which is the number of different ids (if Bounded, of those before the first one whose degrees do not fit)

◆ operator[]()

template<int N, bool Bounded>
const PointDegree & MR::detail::PerturbationStagesOf< N, Bounded >::operator[] ( int i) const
inlinenodiscard

point i with its degree, as perturbed at the last stage (if Bounded, with the degree 0 if no stage perturbs it)

◆ place()

template<int N, bool Bounded>
std::int64_t MR::detail::PerturbationStagesOf< N, Bounded >::place ( int s) const
inlinenodiscard

the degree of the points perturbed first at stage s: every term with them has at least this degree, every term of the earlier stages less

◆ startsAt()

template<int N, bool Bounded>
bool MR::detail::PerturbationStagesOf< N, Bounded >::startsAt ( int i,
int s ) const
inlinenodiscard

whether point i is perturbed first at stage s


The documentation for this class was generated from the following file: