oILAB
Loading...
Searching...
No Matches
Farey.h
Go to the documentation of this file.
1
#ifndef gbLAB_Farey_h_
2
#define gbLAB_Farey_h_
3
4
#include <iostream>
5
#include <numeric>
6
#include <vector>
7
8
namespace
gbLAB
{
9
// Define a struct to store the current and previous mediant fractions
10
struct
Fraction
{
11
int
n
,
d
,
N
,
D
;
12
13
Fraction
(
int
n_,
int
d_,
int
N_,
int
D_) {
14
n
= n_;
15
d
= d_;
16
N
= N_;
17
D
= D_;
18
}
19
};
20
std::vector<std::pair<int, int>>
farey
(
int
limit,
const
bool
firstQuadrant=
true
);
21
22
}
23
24
#endif
gbLAB
Definition
BiCrystal.cpp:13
gbLAB::farey
std::vector< std::pair< int, int > > farey(int limit, const bool firstQuadrant)
Definition
Farey.cpp:6
gbLAB::Fraction
Definition
Farey.h:10
gbLAB::Fraction::N
int N
Definition
Farey.h:11
gbLAB::Fraction::D
int D
Definition
Farey.h:11
gbLAB::Fraction::d
int d
Definition
Farey.h:11
gbLAB::Fraction::Fraction
Fraction(int n_, int d_, int N_, int D_)
Definition
Farey.h:13
gbLAB::Fraction::n
int n
Definition
Farey.h:11
include
Math
Farey.h
Generated on Wed Aug 6 2025 23:06:44 for oILAB by
1.9.8