| DGtal
    0.6.devel
    | 
#include <LightSternBrocot.h>

| Public Member Functions | |
| Node (Integer p1, Integer q1, Quotient u1, Quotient k1, Node *ascendant) | |
| bool | even () const | 
| bool | odd () const | 
| bool | isSameDepthLeft () const | 
| Data Fields | |
| Integer | p | 
| Integer | q | 
| Quotient | u | 
| Quotient | k | 
| Node * | ascendant | 
| MapQuotientToNode | descendant | 
| MapQuotientToNode | descendant2 | 
Represents a node in the Stern-Brocot. The node stores information on the irreducible fraction itself (p/q, the partial quotient u, the depth k), but also pointers to ascendants, descendants and inverse in the Stern-Brocot tree. Nodes are constructed on demand, when the user ask for descendant or for a specific fraction.
Essentially a backport from ImaGene.
Definition at line 137 of file LightSternBrocot.h.
| 
 | inline | 
Constructor for node.
| p1 | the numerator. | 
| q1 | the denominator. | 
| u1 | the quotient (last coefficient of its continued fraction). | 
| k1 | the depth (1+number of coefficients of its continued fraction). | 
| _ascendant | A pointer to the node that is the preceding principal convergent. | 
Definition at line 50 of file LightSternBrocot.ih.
| 
 | inline | 
Definition at line 172 of file LightSternBrocot.h.
References DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Node::k.
| 
 | inline | 
Definition at line 180 of file LightSternBrocot.h.
References DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Node::odd().
| 
 | inline | 
Definition at line 176 of file LightSternBrocot.h.
References DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Node::k.
Referenced by DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Node::isSameDepthLeft().
| Node* DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Node::ascendant | 
A pointer to the node that is the preceding principal convergent.
Definition at line 161 of file LightSternBrocot.h.
Referenced by DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::LightSternBrocot(), and DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Fraction::next().
| MapQuotientToNode DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Node::descendant | 
a map which gives the descendant [..u_n, k] if k is the key. Note that they are left or right descendant according to the parity of the depth. (odd=left, even=right).
Definition at line 165 of file LightSternBrocot.h.
Referenced by DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::LightSternBrocot().
| MapQuotientToNode DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Node::descendant2 | 
a map which gives the descendant [...u_n-1,1, k] if k is the key. Note that they are left or right descendant according to the parity of the depth. (even=left, odd=right).
Definition at line 169 of file LightSternBrocot.h.
Referenced by DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::LightSternBrocot(), and DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Fraction::next().
| Quotient DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Node::k | 
the depth (1+number of coefficients of its continued fraction).
Definition at line 159 of file LightSternBrocot.h.
Referenced by DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Node::even(), DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Fraction::getCFrac(), DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Fraction::next1(), DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Node::odd(), DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Fraction::reduced(), and DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Fraction::trueK().
| Integer DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Node::p | 
the numerator;
Definition at line 153 of file LightSternBrocot.h.
Referenced by DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Fraction::operator==().
| Integer DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Node::q | 
the denominator;
Definition at line 155 of file LightSternBrocot.h.
Referenced by DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Fraction::operator==().
| Quotient DGtal::LightSternBrocot< TInteger, TQuotient, TMap >::Node::u | 
the quotient (last coefficient of its continued fraction).
Definition at line 157 of file LightSternBrocot.h.
 1.8.1.1
 1.8.1.1