#include <iostream>
#include "DGtal/arithmetic/LighterSternBrocot.h"
Go to the source code of this file.
|
void | usage (int, char **argv) |
|
int | main (int argc, char **argv) |
|
- Author
- Jacques-Olivier Lachaud (
jacqu.nosp@m.es-o.nosp@m.livie.nosp@m.r.la.nosp@m.chaud.nosp@m.@uni.nosp@m.v-sav.nosp@m.oie..nosp@m.fr
) Laboratory of Mathematics (CNRS, UMR 5127), University of Savoie, France
- Date
- 2012/02/06
An example file named convergents-biginteger.
This file is part of the DGtal library.
Definition in file convergents-biginteger.cpp.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Main.
[convergents-biginteger-types]
[convergents-biginteger-types]
[convergents-biginteger-instantiation]
[convergents-biginteger-instantiation]
[convergents-biginteger-cfrac]
[convergents-biginteger-cfrac]
[convergents-biginteger-convergents]
[convergents-biginteger-convergents]
Definition at line 61 of file convergents-biginteger.cpp.
68 std::string inputP = argv[ 1 ];
69 std::string inputQ = argv[ 2 ];
75 typedef SB::Fraction Fraction;
93 std::cout << ( ( it == itbegin ) ?
"[" :
"," )
96 std::cout <<
"]" << std::endl;
104 std::cout <<
"z_" << u.second <<
" = ";
106 std::cout << g.p() <<
" / " << g.q() << std::endl;
Aim: The Stern-Brocot tree is the tree of irreducible fractions. This class allows to construct it pr...
void usage(int, char **argv)
Point::Coordinate Integer
MyDigitalSurface::ConstIterator ConstIterator
boost::int64_t int64_t
signed 94-bit integer.
mpz_class BigInteger
Multi-precision integer with GMP implementation.
References usage().
◆ usage()
void usage |
( |
int |
, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 52 of file convergents-biginteger.cpp.
54 std::cerr <<
"Usage: " << argv[ 0 ] <<
" <p> <q>" << std::endl;
55 std::cerr <<
"\t - computes the successive convergent of the fraction p / q." << std::endl;
Referenced by main().