ProjGeom 1.0.11
Loading...
Searching...
No Matches
proj_plane_concepts.h
Go to the documentation of this file.
1
5#pragma once
6
7#include "common_concepts.h"
8
13namespace fun {
14
21 template <class Point, class Line>
23 = STD_ALT::equality_comparable<Point>
24 && requires(const Point& pt_p, const Point& pt_q, const Line& ln_l) {
25 { incident(pt_p, ln_l) } -> STD_ALT::convertible_to<bool>; // incidence
26 { pt_p * pt_q } -> STD_ALT::convertible_to<Line>; // join or meet
27 // { pt_p.aux() } -> STD_ALT::convertible_to<Line>; // line not incident
28 // with pt_p { pt_p.aux2(pt_q) } -> STD_ALT::convertible_to<Point>;
29 // // pt_p pt_r on pt_p * pt_q, pt_r != pt_p and pt_r != pt_q
30 };
31
38 template <class Point, class Line = typename Point::Dual>
41
47 template <class Point>
50 // happy
51
58 template <class Point, class Line = typename Point::Dual>
60 = ProjectivePlanePrimH<Point, Line> && requires(const Point& pt_p, const Point& pt_q) {
61 { pt_p.aux() } -> STD_ALT::convertible_to<Line>; // line not incident with pt_p
62 {
63 pt_p.aux2(pt_q)
64 } -> STD_ALT::convertible_to<Point>; // pt_p pt_r on pt_p * pt_q,
65 // pt_r != pt_p and pt_r != pt_q
66 };
67
74 template <class Point, class Line = typename Point::Dual>
77
83 template <class Point>
86 // happy
87
94 template <class Point, class Line>
96 = STD_ALT::equality_comparable<Point>
97 && requires(const Point& pt_p, const Point& pt_q, const Line& ln_l,
98 const Value_type<Point>& pt_a) {
99 typename Value_type<Point>;
100 // { Point(pt_p) } -> Point; // copyable
101 // { incident(pt_p, ln_l) } -> bool; // incidence
102 { pt_p * pt_q } -> STD_ALT::convertible_to<Line>; // join or meet
103 {
104 pt_p.dot(ln_l)
105 } -> STD_ALT::convertible_to<Value_type<Point>>; // for measurement
106 { pt_p.aux() } -> STD_ALT::convertible_to<Line>; // line not incident with pt_p
107 {
108 parametrize(pt_a, pt_p, pt_a, pt_q)
109 } -> STD_ALT::convertible_to<Point>; // module computation
110 };
111
118 template <class Point, class Line = typename Point::Dual>
120
121 /*
122 axiom(Point pt_p, Point pt_q, Point pt_r, Line ln_l) {
123 ln_l == Line{pt_p, pt_q} => I(pt_p, ln_l) and I(pt_q, ln_l);
124 }
125 */
126
132 template <class Point>
134 = ProjectivePlane<std::remove_reference_t<Point>>; // Make the compiler happy
135
142 template <class Point, class Line>
144 = ProjectivePlaneH<Point, Line> && requires(const Point& pt_p, size_t idx) {
145 typename Value_type<Point>;
146
147 { pt_p[idx] } -> STD_ALT::convertible_to<Value_type<Point>>; // for coordinate acess
148 };
149
156 template <class Point, class Line = typename Point::Dual>
159
165 template <class Point>
168 // happy
169
170} // namespace fun
Common C++20 concepts: Ring, OrderedRing, Integral, Sequence.
Shorthand Notation of ProjectivePlane.
Definition proj_plane_concepts.h:134
Shorthand Notation of ProjectivePlane.
Definition proj_plane_concepts.h:167
Projective plane Concept (half)
Definition proj_plane_concepts.h:144
Projective plane Concept (full)
Definition proj_plane_concepts.h:158
Shorthand Notation of ProjectivePlane.
Definition proj_plane_concepts.h:85
Projective plane Concept (full)
Definition proj_plane_concepts.h:60
Projective plane Concept (full)
Definition proj_plane_concepts.h:76
Projective plane Concept (half)
Definition proj_plane_concepts.h:96
Shorthand Notation of ProjectivePlane.
Definition proj_plane_concepts.h:49
Projective plane Concept (half)
Definition proj_plane_concepts.h:23
Projective plane Concept (full)
Definition proj_plane_concepts.h:40
Projective plane Concept.
Definition pg_concepts.hpp:46
Definition ck_concepts.hpp:11
constexpr auto incident(const Point &pt_p, const Line &ln_l) -> bool
The code snippet is defining a function named incident that checks if a point pt_p is incident to a l...
Definition proj_plane.hpp:35
constexpr auto parametrize(const Value &lambda_val, const Point &pt_p, const Value &mu_val, const Point &pt_q) -> Point
Homogeneous parametrization of point or line (free function)
Definition pg_common.hpp:185