|
DGtal 1.4.0
|
#include <DGtal/arithmetic/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 |
| the numerator; | |
| Integer | q |
| the denominator; | |
| Quotient | u |
| the quotient (last coefficient of its continued fraction). | |
| Quotient | k |
| the depth (1+number of coefficients of its continued fraction). | |
| Node * | ascendantLeft |
| the node that is the left ascendant. | |
| Node * | ascendantRight |
| the node that is the right ascendant. | |
| Node * | descendantLeft |
| the node that is the left descendant or 0 (if none exist). | |
| Node * | descendantRight |
| the node that is the right descendant or 0 (if none exist). | |
| Node * | inverse |
| the node that is its 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 100 of file SternBrocot.h.
| DGtal::SternBrocot< TInteger, TQuotient >::Node::Node | ( | Integer | p1, |
| Integer | q1, | ||
| Quotient | u1, | ||
| Quotient | k1, | ||
| Node * | ascendant_left1, | ||
| Node * | ascendant_right1, | ||
| Node * | descendant_left1, | ||
| Node * | descendant_right1, | ||
| Node * | inverse1 ) |
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. |
| Node* DGtal::SternBrocot< TInteger, TQuotient >::Node::ascendantLeft |
the node that is the left ascendant.
Definition at line 129 of file SternBrocot.h.
| Node* DGtal::SternBrocot< TInteger, TQuotient >::Node::ascendantRight |
the node that is the right ascendant.
Definition at line 131 of file SternBrocot.h.
| Node* DGtal::SternBrocot< TInteger, TQuotient >::Node::descendantLeft |
the node that is the left descendant or 0 (if none exist).
Definition at line 133 of file SternBrocot.h.
| Node* DGtal::SternBrocot< TInteger, TQuotient >::Node::descendantRight |
the node that is the right descendant or 0 (if none exist).
Definition at line 135 of file SternBrocot.h.
| Node* DGtal::SternBrocot< TInteger, TQuotient >::Node::inverse |
the node that is its inverse.
Definition at line 137 of file SternBrocot.h.
| Quotient DGtal::SternBrocot< TInteger, TQuotient >::Node::k |
the depth (1+number of coefficients of its continued fraction).
Definition at line 127 of file SternBrocot.h.
| Integer DGtal::SternBrocot< TInteger, TQuotient >::Node::p |
the numerator;
Definition at line 121 of file SternBrocot.h.
| Integer DGtal::SternBrocot< TInteger, TQuotient >::Node::q |
the denominator;
Definition at line 123 of file SternBrocot.h.
| Quotient DGtal::SternBrocot< TInteger, TQuotient >::Node::u |
the quotient (last coefficient of its continued fraction).
Definition at line 125 of file SternBrocot.h.