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

Public Member Functions | |
| Node (Integer p1, Integer q1, Quotient u1, Quotient k1, Node *ascendant_left1, Node *ascendant_right1, Node *descendant_left1, Node *descendant_right1, Node *inverse1) | |
Data Fields | |
| Integer | p |
| Integer | q |
| Quotient | u |
| Quotient | k |
| Node * | ascendantLeft |
| Node * | ascendantRight |
| Node * | descendantLeft |
| Node * | descendantRight |
| Node * | inverse |
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 103 of file SternBrocot.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_left1 | the node that is the left ascendant. |
| ascendant_right1 | the node that is the right ascendant. |
| descendant_left1 | the node that is the left descendant or 0 (if none exist). |
| descendant_right1 | the node that is the right descendant or 0 (if none exist). |
| inverse1 | the node that is its inverse. |
Definition at line 50 of file SternBrocot.ih.
| Node* DGtal::SternBrocot< TInteger, TQuotient >::Node::ascendantLeft |
the node that is the left ascendant.
Definition at line 132 of file SternBrocot.h.
Referenced by DGtal::SternBrocot< TInteger, TQuotient >::Fraction::father(), DGtal::SternBrocot< TInteger, TQuotient >::Fraction::getCFrac(), DGtal::SternBrocot< TInteger, TQuotient >::Fraction::getSplit(), DGtal::SternBrocot< TInteger, TQuotient >::Fraction::getSplitBerstel(), DGtal::SternBrocot< TInteger, TQuotient >::Fraction::left(), DGtal::SternBrocot< TInteger, TQuotient >::Fraction::reduced(), and DGtal::SternBrocot< TInteger, TQuotient >::SternBrocot().
| Node* DGtal::SternBrocot< TInteger, TQuotient >::Node::ascendantRight |
the node that is the right ascendant.
Definition at line 134 of file SternBrocot.h.
Referenced by DGtal::SternBrocot< TInteger, TQuotient >::Fraction::father(), DGtal::SternBrocot< TInteger, TQuotient >::Fraction::getCFrac(), DGtal::SternBrocot< TInteger, TQuotient >::Fraction::getSplit(), DGtal::SternBrocot< TInteger, TQuotient >::Fraction::getSplitBerstel(), DGtal::SternBrocot< TInteger, TQuotient >::Fraction::left(), and DGtal::SternBrocot< TInteger, TQuotient >::Fraction::reduced().
| Node* DGtal::SternBrocot< TInteger, TQuotient >::Node::descendantLeft |
the node that is the left descendant or 0 (if none exist).
Definition at line 136 of file SternBrocot.h.
Referenced by DGtal::SternBrocot< TInteger, TQuotient >::Fraction::left(), and DGtal::SternBrocot< TInteger, TQuotient >::SternBrocot().
| Node* DGtal::SternBrocot< TInteger, TQuotient >::Node::descendantRight |
the node that is the right descendant or 0 (if none exist).
Definition at line 138 of file SternBrocot.h.
Referenced by DGtal::SternBrocot< TInteger, TQuotient >::Fraction::left(), and DGtal::SternBrocot< TInteger, TQuotient >::SternBrocot().
| Node* DGtal::SternBrocot< TInteger, TQuotient >::Node::inverse |
the node that is its inverse.
Definition at line 140 of file SternBrocot.h.
Referenced by DGtal::SternBrocot< TInteger, TQuotient >::Fraction::left(), and DGtal::SternBrocot< TInteger, TQuotient >::SternBrocot().
| Quotient DGtal::SternBrocot< TInteger, TQuotient >::Node::k |
the depth (1+number of coefficients of its continued fraction).
Definition at line 130 of file SternBrocot.h.
Referenced by DGtal::SternBrocot< TInteger, TQuotient >::Fraction::getCFrac(), and DGtal::SternBrocot< TInteger, TQuotient >::Fraction::reduced().
| Integer DGtal::SternBrocot< TInteger, TQuotient >::Node::p |
the numerator;
Definition at line 124 of file SternBrocot.h.
Referenced by DGtal::SternBrocot< TInteger, TQuotient >::Fraction::left().
| Integer DGtal::SternBrocot< TInteger, TQuotient >::Node::q |
the denominator;
Definition at line 126 of file SternBrocot.h.
Referenced by DGtal::SternBrocot< TInteger, TQuotient >::Fraction::left().
| Quotient DGtal::SternBrocot< TInteger, TQuotient >::Node::u |
the quotient (last coefficient of its continued fraction).
Definition at line 128 of file SternBrocot.h.
Referenced by DGtal::SternBrocot< TInteger, TQuotient >::Fraction::father(), and DGtal::SternBrocot< TInteger, TQuotient >::Fraction::getCFrac().
1.8.1.1