|
Dedekind 0.0.0
A structuralist C++23 Module Library
|
Value-level row vector (covector) of length 2, viewed as a 1×2 matrix. More...

Public Types | |
| using | scalar_type = T |
| using | orientation = RowOrientation |
| using | dimension_type = dedekind::sets::Finite |
Public Member Functions | |
|
template<typename Idx> requires dedekind::order::IsDirectedSet<Idx> && std::convertible_to<Idx, std::size_t> | |
| constexpr T | operator[] (Idx const &i) const |
Indexed projection. Same row-style semantics as Vec2V::operator[]: i=0 returns x, i=1 returns y, out-of-range returns T{}. Returned by value. | |
|
template<std::integral U, U I> requires (static_cast<std::size_t>(I) < dimension) | |
| constexpr T | operator[] (std::integral_constant< U, I >) const |
Halfspace-gated static-index overload (#372 slice b). Same integral-parametric contract as Vec2V::operator[](integral_constant): admits any {std::integral_constant<U,I>} with non-negative {I < dimension}. Subsumes the 𝔹-indexed face (bool_constant = {integral_constant<bool,B>}): Covec2V<T> ≅ 𝔹 → T. | |
| constexpr Vec2V< T > | transpose () const |
| Transpose to the dual vector: row → column. | |
Public Attributes | |
| T | x {} |
| T | y {} |
Static Public Attributes | |
| static constexpr std::size_t | dimension = 2 |
| static constexpr std::size_t | row_count = 1 |
| static constexpr std::size_t | column_count = 2 |
Friends | |
| constexpr bool | operator== (const Covec2V &, const Covec2V &)=default |
| constexpr Covec2V | operator+ (const Covec2V &a, const Covec2V &b) |
| constexpr Covec2V | operator- (const Covec2V &a, const Covec2V &b) |
| constexpr Covec2V | operator- (const Covec2V &a) |
| constexpr Covec2V | operator* (const T &s, const Covec2V &a) |
| constexpr Covec2V | operator* (const Covec2V &a, const T &s) |
Value-level row vector (covector) of length 2, viewed as a 1×2 matrix.
matrices.
Distinguished from Vec2V by the RowOrientation tag and matrix shape (1×2 vs 2×1). The distinction lets the type system keep the horizontal and vertical concatenation views of a matrix separate, even though both views share the same underlying scalar layout.