Primary module interface unit for module pythagorean_triple.
More...
#include <algorithm>
#include <tuple>
#include <vector>
import base;
|
| template<Integer T> |
| constexpr std::vector< std::tuple< T, T, T > > | ntlib::primitive_pythagorean_triples (T N) |
| | Creates all primitive pythagorean triples \((a,b,c)\) with \(a \leq b \leq c \leq N\).
|
Primary module interface unit for module pythagorean_triple.
◆ primitive_pythagorean_triples()
template<Integer T>
| std::vector< std::tuple< T, T, T > > ntlib::primitive_pythagorean_triples |
( |
T | N | ) |
|
|
nodiscardconstexprexport |
Creates all primitive pythagorean triples \((a,b,c)\) with \(a \leq b \leq c \leq N\).
- Template Parameters
-
- Parameters
-
| N | The maximum value of any component. |
- Returns
- triples A std::vector containing the triples.