fun namespace

Contents

Classes

template<typename _P, typename _L, template<typename P, typename L> class Derived>
struct ck
template<typename P, typename L = typename P::dual>
struct ellck
Elliptic Plane.
template<typename P, typename L = typename P::dual>
struct hyck
Hyperbolic Plane.
template<Integral Z>
struct Fraction
Fraction.
template<typename P, typename L = typename P::dual>
class persp_euclid_plane
template<ring _K>
struct pg_point
template<ring _K>
struct pg_line
Projective line: two dimensional subspace of K^3.
template<ring _K, typename _dual>
class pg_object
Projective object.
template<typename P, typename L>
class involution
template<typename P, typename L>
class involution_generic

Typedefs

template<typename T>
using Value_type = typename T::value_type
template<typename T>
using Element_type = typename std::decay<decltype(back(std::declval<T>()))>::type
template<typename P>
using Triple = std::tuple<P, P, P>

Functions

template<ordered_ring Q_t>
auto check_sine_law(const Triple<Q_t>& Q, const Triple<Q_t>& S) -> bool -> auto constexpr
check sine law
template<ordered_ring K>
auto check_cross_TQF(const Triple<K>& Q) -> auto constexpr
template<ordered_ring K>
auto check_cross_law(const Triple<K>& S, const K& q3) -> auto constexpr
template<Projective_plane_coord2 L>
auto fB(const L& l) -> typename L::dual -> auto constexpr
template<Projective_plane_coord2 L>
auto is_perpendicular(const L& l, const L& m) -> bool -> auto constexpr
template<Projective_plane_coord2 L>
auto is_parallel(const L& l, const L& m) -> bool -> auto constexpr
template<typename P, typename L>
auto altitude(const P& a, const L& l) -> L -> requires constexpr Projective_plane_coord<P, L> auto
template<Projective_plane_coord2 P>
auto tri_altitude(const Triple<P>& tri) -> auto constexpr
template<Projective_plane_coord2 P>
auto orthocenter(const Triple<P>& tri) -> P -> auto constexpr
template<Projective_plane_coord2 L>
auto reflect(const L& m) -> auto constexpr
template<Projective_plane_coord2 P>
auto midpoint(const P& a, const P& b) -> P -> auto constexpr
template<Projective_plane_coord2 P>
auto tri_midpoint(const Triple<P>& tri) -> Triple< P > -> auto constexpr
template<Projective_plane_coord2 P>
auto uc_point(const Value_type<P>& lda1, const Value_type<P>& mu1) -> auto constexpr
template<ordered_ring _Q>
auto Ar(const _Q& a, const _Q& b, const _Q& c) -> auto constexpr
Archimedes's function.
template<typename _Q>
auto cqq(const _Q& a, const _Q& b, const _Q& c, const _Q& d) -> auto constexpr
Cyclic quadrilateral quadrea theorem.
template<typename T>
auto Ptolemy(const T& quad) -> bool -> auto constexpr
template<typename K>
auto quad1(const K& x1, const K& z1, const K& x2, const K& z2) -> requires constexpr Integral<K> auto
template<typename K>
auto quad1(const K& x1, const K& z1, const K& x2, const K& z2) -> auto constexpr
template<Projective_plane_coord2 P>
auto quadrance(const P& a1, const P& a2) -> auto constexpr
template<typename... Args>
auto quadrance_copy(const Args&... args) -> auto constexpr
template<Projective_plane_coord2 L, typename T>
auto sbase(const L& l1, const L& l2, const T& d) -> auto constexpr
template<Projective_plane_coord2 L>
auto spread(const L& l1, const L& l2) -> auto constexpr
template<Projective_plane_coord2 P>
auto tri_quadrance(const Triple<P>& triangle) -> auto constexpr
template<Projective_plane_coord2 L>
auto tri_spread(const Triple<L>& trilateral) -> auto constexpr
template<Projective_plane_coord2 L>
auto cross_s(const L& l1, const L& l2) -> auto constexpr
template<Projective_plane_coord2 P>
auto distance(const P& a, const P& b) -> auto constexpr
template<Projective_plane_coord2 L>
auto angle(const L& l, const L& m) -> auto constexpr
template<typename T>
auto abs(const T& a) -> T -> auto constexpr
absolute
template<Integral _Mn>
auto gcd_recur(const _Mn& __m, const _Mn& __n) -> _Mn -> auto constexpr
Greatest common divider.
template<Integral _Mn>
auto gcd(const _Mn& __m, const _Mn& __n) -> _Mn -> auto constexpr
Greatest common divider.
template<Integral _Mn>
auto lcm(const _Mn& __m, const _Mn& __n) -> _Mn -> auto constexpr
Least common multiple.
template<ring _K>
auto cross0(const std::array<_K, 3>& v, const std::array<_K, 3>& w) -> _K -> auto
1st term of Cross product
template<ring _K>
auto cross1(const std::array<_K, 3>& v, const std::array<_K, 3>& w) -> _K -> auto
2nd term of Cross product
template<ring _K>
auto cross2(const std::array<_K, 3>& v, const std::array<_K, 3>& w) -> _K -> auto
3rd term of Cross product
template<typename P>
auto cross(const P& v, const P& w) -> std::array< Value_type< P >, 3 > -> requires ring<Value_type<P>> auto
Cross product.
template<ring _K>
auto dot_c(const std::array<_K, 3>& v, const std::array<_K, 3>& w) -> _K -> auto
Dot product.
template<ring _T, ring _K>
auto plucker_c(const _T& ld, const std::array<_K, 3>& v1, const _T& mu, const std::array<_K, 3>& v2) -> std::array< _K, 3 > -> auto
generic Plucker function
template<ring _K>
auto dot1(const std::array<_K, 3>& v, const std::array<_K, 3>& w) -> _K -> auto
dot product of the (0,1)-component of two vectors
template<ring _K>
auto dot2(const std::array<_K, 3>& v, const std::array<_K, 3>& w) -> _K -> auto
dot product of the (0,2)-component of two vectors
template<typename T>
auto sq(const T& a) -> auto constexpr
Square function.
template<ring _K>
auto meet(const pg_line<_K>& l, const pg_line<_K>& m) -> pg_point< _K > -> auto constexpr
Return meet of two lines.
template<typename P, ring _K = Value_type<P>>
auto plucker(const _K& ld1, const P& p, const _K& mu1, const P& q) -> P -> auto constexpr
template<ring _K, typename _dual, class _Stream>
auto operator<<(_Stream& os, const pg_object<_K, _dual>& p) -> _Stream & -> auto
template<ring _K>
auto join(const pg_point<_K>& p, const pg_point<_K>& q) -> pg_line< _K > -> auto constexpr
Return join of two points.
template<typename P, typename L>
auto incident(const P& p, const L& l) -> bool -> requires constexpr Projective_plane<P, L> auto
template<typename L, typename... Args>
requires(Projective_plane_prim<L, Args>&& ...) const expr auto coincident(const L &l
Coincident.
template<Projective_plane_prim2 P>
auto tri_dual(const Triple<P>& tri) -> auto constexpr
template<Projective_plane_prim2 P, typename Fn>
auto tri_func(Fn&& func, const Triple<P>& tri) -> auto constexpr
template<Projective_plane_prim2 P>
auto persp(const Triple<P>& tri1, const Triple<P>& tri2) -> bool -> auto constexpr
return whether two triangles are perspective
template<Projective_plane2 P>
auto harm_conj(const P& A, const P& B, const P& C) -> P -> auto constexpr
template<Projective_plane_generic2 _P>
auto harm_conj(const _P& A, const _P& B, const _P& C) -> _P -> auto constexpr
template<Projective_plane2 P>
auto is_harmonic(const P& A, const P& B, const P& C, const P& D) -> bool -> auto constexpr
template<Projective_plane_prim2 P>
void check_pappus(const Triple<P>& co1, const Triple<P>& co2)
Check Pappus Theorem.
template<Projective_plane_prim2 P>
void check_desargue(const Triple<P>& tri1, const Triple<P>& tri2)
template<ring K>
auto ratio_ratio(const K& a, const K& b, const K& c, const K& d) -> auto constexpr
template<typename P, typename L>
auto x_ratio(const P& A, const P& B, const L& l, const L& m) -> requires constexpr Projective_plane<P, L> auto
Cross Ratio.
template<Projective_plane_coord2 P>
auto R(const P& A, const P& B, const P& C, const P& D) -> auto constexpr
template<Projective_plane_coord2 P>
auto R0(const P& A, const P& B, const P& C, const P& D) -> auto constexpr
template<Projective_plane_coord2 P>
auto R1(const P& A, const P& B, const P& C, const P& D) -> auto constexpr

Variables

template<typename T>
concept Sequence
Sequence.
template<typename K>
concept ring
template<typename K>
concept ordered_ring
template<typename Z>
concept Integral
const Args&r bool
template<class P, class L>
concept Projective_plane_prim_h
Projective plane Concept (half)
template<class P, class L = typename P::dual>
concept Projective_plane_prim
Projective plane Concept (full)
template<class P>
concept Projective_plane_prim2
Shorthand Notation of Projective_plane.
template<class P, class L = typename P::dual>
concept Projective_plane_generic_h
Projective plane Concept (full)
template<class P, class L = typename P::dual>
concept Projective_plane_generic
Projective plane Concept (full)
template<class P>
concept Projective_plane_generic2
Shorthand Notation of Projective_plane.
template<class P, class L>
concept Projective_plane_h
Projective plane Concept (half)
template<class P, class L = typename P::dual>
concept Projective_plane
Projective plane Concept (full)
template<class P>
concept Projective_plane2
Shorthand Notation of Projective_plane.
template<class P, class L>
concept Projective_plane_coord_h
Projective plane Concept (half)
template<class P, class L = typename P::dual>
concept Projective_plane_coord
Projective plane Concept (full)
template<class P>
concept Projective_plane_coord2
Shorthand Notation of Projective_plane.

Typedef documentation

template<typename T>
using fun::Value_type = typename T::value_type

template<typename T>
using fun::Element_type = typename std::decay<decltype(back(std::declval<T>()))>::type

template<typename P>
using fun::Triple = std::tuple<P, P, P>

Function documentation

template<ordered_ring Q_t>
auto fun::check_sine_law(const Triple<Q_t>& Q, const Triple<Q_t>& S) -> bool constexpr

check sine law

Template parameters
Q_t
Parameters
in
in
Returns true

template<ordered_ring K>
auto fun::check_cross_TQF(const Triple<K>& Q) constexpr

Template parameters
K
Parameters
in
Returns constexpr auto

template<ordered_ring K>
auto fun::check_cross_law(const Triple<K>& S, const K& q3) constexpr

Template parameters
K
Parameters
in
q3 in
Returns constexpr auto

template<Projective_plane_coord2 L>
auto fun::fB(const L& l) -> typename L::dual constexpr

Parameters
in
Returns auto

template<Projective_plane_coord2 L>
auto fun::is_perpendicular(const L& l, const L& m) -> bool constexpr

Parameters
in
in
Returns true

template<Projective_plane_coord2 L>
auto fun::is_parallel(const L& l, const L& m) -> bool constexpr

Parameters
in
in
Returns true

template<typename P, typename L>
requires constexpr Projective_plane_coord<P, L> auto fun::altitude(const P& a, const L& l) -> L

Parameters
in
in
Returns L

template<Projective_plane_coord2 P>
auto fun::tri_altitude(const Triple<P>& tri) constexpr

Parameters
tri in
Returns auto

template<Projective_plane_coord2 P>
auto fun::orthocenter(const Triple<P>& tri) -> P constexpr

Parameters
tri in
Returns P

template<Projective_plane_coord2 L>
auto fun::reflect(const L& m) constexpr

Parameters
in
Returns auto

template<Projective_plane_coord2 P>
auto fun::midpoint(const P& a, const P& b) -> P constexpr

Parameters
in
in
Returns P

template<Projective_plane_coord2 P>
auto fun::tri_midpoint(const Triple<P>& tri) -> Triple< P > constexpr

Parameters
tri in
Returns auto

template<Projective_plane_coord2 P>
auto fun::uc_point(const Value_type<P>& lda1, const Value_type<P>& mu1) constexpr

Parameters
lda1 in
mu1 in
Returns P

template<ordered_ring _Q>
auto fun::Ar(const _Q& a, const _Q& b, const _Q& c) constexpr

Archimedes's function.

Template parameters
_Q
Parameters
in
in
in
Returns auto

template<typename _Q>
auto fun::cqq(const _Q& a, const _Q& b, const _Q& c, const _Q& d) constexpr

Cyclic quadrilateral quadrea theorem.

Template parameters
_Q
Parameters
in
in
in
in
Returns auto

template<typename T>
auto fun::Ptolemy(const T& quad) -> bool constexpr

Parameters
quad in
Returns auto

template<typename K>
requires constexpr Integral<K> auto fun::quad1(const K& x1, const K& z1, const K& x2, const K& z2)

Template parameters
K
Parameters
x1 in
z1 in
x2 in
z2 in
Returns auto

template<typename K>
auto fun::quad1(const K& x1, const K& z1, const K& x2, const K& z2) constexpr

Template parameters
K
Parameters
x1 in
z1 in
x2 in
z2 in
Returns auto

template<Projective_plane_coord2 P>
auto fun::quadrance(const P& a1, const P& a2) constexpr

Parameters
a1 in
a2 in
Returns auto

template<typename... Args>
auto fun::quadrance_copy(const Args&... args) constexpr

template<Projective_plane_coord2 L, typename T>
auto fun::sbase(const L& l1, const L& l2, const T& d) constexpr

Parameters
l1 in
l2 in
in
Returns auto

template<Projective_plane_coord2 L>
auto fun::spread(const L& l1, const L& l2) constexpr

Parameters
l1 in
l2 in
Returns auto

template<Projective_plane_coord2 P>
auto fun::tri_quadrance(const Triple<P>& triangle) constexpr

Parameters
triangle in
Returns auto

template<Projective_plane_coord2 L>
auto fun::tri_spread(const Triple<L>& trilateral) constexpr

Parameters
trilateral in
Returns auto

template<Projective_plane_coord2 L>
auto fun::cross_s(const L& l1, const L& l2) constexpr

Parameters
l1 in
l2 in
Returns auto

template<Projective_plane_coord2 P>
auto fun::distance(const P& a, const P& b) constexpr

Parameters
in
in
Returns auto

template<Projective_plane_coord2 L>
auto fun::angle(const L& l, const L& m) constexpr

Parameters
in
in
Returns auto

template<typename T>
auto fun::abs(const T& a) -> T constexpr

absolute

Template parameters
T
Parameters
in
Returns T

template<Integral _Mn>
auto fun::gcd_recur(const _Mn& __m, const _Mn& __n) -> _Mn constexpr

Greatest common divider.

Template parameters
_Mn
Parameters
__m in
__n in
Returns _Mn

template<Integral _Mn>
auto fun::gcd(const _Mn& __m, const _Mn& __n) -> _Mn constexpr

Greatest common divider.

Template parameters
_Mn
Parameters
__m in
__n in
Returns _Mn

template<Integral _Mn>
auto fun::lcm(const _Mn& __m, const _Mn& __n) -> _Mn constexpr

Least common multiple.

Template parameters
_Mn
Parameters
__m in
__n in
Returns _Mn

template<ring _K>
auto fun::cross0(const std::array<_K, 3>& v, const std::array<_K, 3>& w) -> _K

1st term of Cross product

Template parameters
_K
Parameters
in
in
Returns 1st term of Cross product

template<ring _K>
auto fun::cross1(const std::array<_K, 3>& v, const std::array<_K, 3>& w) -> _K

2nd term of Cross product

Template parameters
_K
Parameters
in
in
Returns 2nd term of Cross product

template<ring _K>
auto fun::cross2(const std::array<_K, 3>& v, const std::array<_K, 3>& w) -> _K

3rd term of Cross product

Template parameters
_K
Parameters
in
in
Returns 3rd term of Cross product

template<typename P>
requires ring<Value_type<P>> auto fun::cross(const P& v, const P& w) -> std::array< Value_type< P >, 3 >

Cross product.

Parameters
in
in
Returns Cross product

template<ring _K>
auto fun::dot_c(const std::array<_K, 3>& v, const std::array<_K, 3>& w) -> _K

Dot product.

Template parameters
_K
Parameters
in
in
Returns auto

template<ring _T, ring _K>
auto fun::plucker_c(const _T& ld, const std::array<_K, 3>& v1, const _T& mu, const std::array<_K, 3>& v2) -> std::array< _K, 3 >

generic Plucker function

Template parameters
_T
_K data type
Parameters
ld in lamda
v1
mu in
v2
Returns lamda*v + mu*w

template<ring _K>
auto fun::dot1(const std::array<_K, 3>& v, const std::array<_K, 3>& w) -> _K

dot product of the (0,1)-component of two vectors

Template parameters
_K
Parameters
in
in
Returns auto

template<ring _K>
auto fun::dot2(const std::array<_K, 3>& v, const std::array<_K, 3>& w) -> _K

dot product of the (0,2)-component of two vectors

Template parameters
_K
Parameters
in
in
Returns auto

template<typename T>
auto fun::sq(const T& a) constexpr

Square function.

Template parameters
T data type
Parameters
in input value
Returns a^2

template<ring _K>
auto fun::meet(const pg_line<_K>& l, const pg_line<_K>& m) -> pg_point< _K > constexpr

Return meet of two lines.

template<typename P, ring _K = Value_type<P>>
auto fun::plucker(const _K& ld1, const P& p, const _K& mu1, const P& q) -> P constexpr

Template parameters
P
_K
Parameters
ld1
in
mu1 in
in
Returns P

template<ring _K, typename _dual, class _Stream>
auto fun::operator<<(_Stream& os, const pg_object<_K, _dual>& p) -> _Stream &

Template parameters
_K
_dual
_Stream
Parameters
os in
in
Returns _Stream&

template<ring _K>
auto fun::join(const pg_point<_K>& p, const pg_point<_K>& q) -> pg_line< _K > constexpr

Return join of two points.

Parameters
in
in
Returns pg_line<_K>

template<typename P, typename L>
requires constexpr Projective_plane<P, L> auto fun::incident(const P& p, const L& l) -> bool

Parameters
in
in
Returns true

template<typename L, typename... Args>
fun::requires(Projective_plane_prim<L, Args>&& ...) const expr auto coincident(const L &l

Coincident.

template<Projective_plane_prim2 P>
auto fun::tri_dual(const Triple<P>& tri) constexpr

Parameters
tri in
Returns auto

template<Projective_plane_prim2 P, typename Fn>
auto fun::tri_func(Fn&& func, const Triple<P>& tri) constexpr

Parameters
func in
tri in
Returns auto

template<Projective_plane_prim2 P>
auto fun::persp(const Triple<P>& tri1, const Triple<P>& tri2) -> bool constexpr

return whether two triangles are perspective

Parameters
tri1 in
tri2 in
Returns true

template<Projective_plane2 P>
auto fun::harm_conj(const P& A, const P& B, const P& C) -> P constexpr

Template parameters
P
Parameters
in
in
in
Returns constexpr P

template<Projective_plane_generic2 _P>
auto fun::harm_conj(const _P& A, const _P& B, const _P& C) -> _P constexpr

Parameters
in
in
in
Returns constexpr P

template<Projective_plane2 P>
auto fun::is_harmonic(const P& A, const P& B, const P& C, const P& D) -> bool constexpr

Parameters
in
in
in
in
Returns constexpr auto

template<Projective_plane_prim2 P>
void fun::check_pappus(const Triple<P>& co1, const Triple<P>& co2)

Check Pappus Theorem.

Template parameters
P
Parameters
co1 in
co2 in

template<Projective_plane_prim2 P>
void fun::check_desargue(const Triple<P>& tri1, const Triple<P>& tri2)

Parameters
tri1 in
tri2 in

template<ring K>
auto fun::ratio_ratio(const K& a, const K& b, const K& c, const K& d) constexpr

Template parameters
K
Parameters
in
in
in
in
Returns auto

template<typename P, typename L>
requires constexpr Projective_plane<P, L> auto fun::x_ratio(const P& A, const P& B, const L& l, const L& m)

Cross Ratio.

Template parameters
P
L
Parameters
in point \in P
in point \in P
in line \in P
in line \in P
Returns cross ratio R(A,B;l,m)

template<Projective_plane_coord2 P>
auto fun::R(const P& A, const P& B, const P& C, const P& D) constexpr

Parameters
in
in
in
in
Returns constexpr auto

template<Projective_plane_coord2 P>
auto fun::R0(const P& A, const P& B, const P& C, const P& D) constexpr

Parameters
in
in
in
in
Returns constexpr auto

template<Projective_plane_coord2 P>
auto fun::R1(const P& A, const P& B, const P& C, const P& D) constexpr

Parameters
in
in
in
in
Returns constexpr auto

Variable documentation

template<typename T>
concept fun::Sequence

Sequence.

Template parameters
T

template<typename K>
concept fun::ring

template<typename K>
concept fun::ordered_ring

template<typename Z>
concept fun::Integral

const Args&r fun::bool

template<class P, class L>
concept fun::Projective_plane_prim_h

Projective plane Concept (half)

Template parameters
P Point
L Line

template<class P, class L = typename P::dual>
concept fun::Projective_plane_prim

Projective plane Concept (full)

Template parameters
P Point
L Line

template<class P>
concept fun::Projective_plane_prim2

Shorthand Notation of Projective_plane.

Template parameters
P Point

template<class P, class L = typename P::dual>
concept fun::Projective_plane_generic_h

Projective plane Concept (full)

Template parameters
P Point
L Line

template<class P, class L = typename P::dual>
concept fun::Projective_plane_generic

Projective plane Concept (full)

Template parameters
P Point
L Line

template<class P>
concept fun::Projective_plane_generic2

Shorthand Notation of Projective_plane.

Template parameters
P Point

template<class P, class L>
concept fun::Projective_plane_h

Projective plane Concept (half)

Template parameters
P Point
L Line

template<class P, class L = typename P::dual>
concept fun::Projective_plane

Projective plane Concept (full)

Template parameters
P Point
L Line

template<class P>
concept fun::Projective_plane2

Shorthand Notation of Projective_plane.

Template parameters
P Point

template<class P, class L>
concept fun::Projective_plane_coord_h

Projective plane Concept (half)

Template parameters
P Point
L Line

template<class P, class L = typename P::dual>
concept fun::Projective_plane_coord

Projective plane Concept (full)

Template parameters
P Point
L Line

template<class P>
concept fun::Projective_plane_coord2

Shorthand Notation of Projective_plane.

Template parameters
P Point