31#if defined(Pattern_RECURSES)
32#error Recursive header files inclusion detected in Pattern.h
35#define Pattern_RECURSES
45#include "DGtal/base/Common.h"
46#include "DGtal/arithmetic/CPositiveIrreducibleFraction.h"
47#include "DGtal/arithmetic/IntegerComputer.h"
48#include "DGtal/arithmetic/SternBrocot.h"
77 template <
typename TFraction>
85 typedef typename Fraction::Integer
Integer;
136 std::string
rE()
const;
141 std::string
rEs(
const std::string & seps =
"(|)" )
const;
208 bool reversed =
false )
const;
242 bool reversed =
false )
const;
282 template <
typename TFraction>
291#include "DGtal/arithmetic/Pattern.ih"
298#undef Pattern_RECURSES
Aim: This class gathers several types and methods to make computation with integers.
Aim: This class represents a pattern, i.e. the path between two consecutive upper leaning points on a...
Integer posL(Quotient k) const
Fraction mySlope
The fraction that characterizes the slope of the pattern.
Pattern previousPattern() const
Fraction::Quotient Quotient
Pattern & operator=(const Pattern &other)
BOOST_CONCEPT_ASSERT((concepts::CPositiveIrreducibleFraction< Fraction >))
Fraction::Integer Integer
Point2I U(Quotient k) const
Pattern(Fraction f=Fraction(0))
void selfDisplay(std::ostream &out) const
bool getGreatestIncludedSubpattern(Pattern &subpattern, Quotient &nb, Vector2I &startPos, Integer posA, Integer posB, bool reversed=false) const
std::string rEs(const std::string &seps="(|)") const
IntegerComputer< Integer > IC
Pattern(const Pattern &other)
Integer posU(Quotient k) const
Point2I L(Quotient k) const
bool getSmallestCoveringSubpattern(Pattern &subpattern, Quotient &nb, Vector2I &startPos, Integer posA, Integer posB, bool reversed=false) const
Pattern< TFraction > Self
Pattern(Integer p, Integer q)
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Aim: Defines positive irreducible fractions, i.e. fraction p/q, p and q non-negative integers,...