10#include "akreon/linalg/affine/affine_traits.hpp"
18template <linalg::VectorContainer Vec,
typename Derived, ConeType Type>
22template <linalg::VectorContainer Vec>
23struct NonnegOrthantCone;
26template <linalg::VectorContainer Vec>
27struct SecondOrderCone;
30template <linalg::VectorContainer Vec, std::
size_t N>
31struct PositiveSemidefiniteCone;
34template <linalg::VectorContainer Vec>
38template <linalg::VectorContainer Vec>
42template <
typename Cone>
46template <linalg::VectorContainer Vec>
49 using T = linalg::vector_element_t<Vec>;
51 static constexpr std::size_t N = linalg::vector_dim_v<Vec>;
55template <linalg::VectorContainer Vec>
58 using T = linalg::vector_element_t<Vec>;
60 static constexpr std::size_t N = linalg::vector_dim_v<Vec>;
64template <linalg::VectorContainer Vec, std::
size_t Dim>
67 using T = linalg::vector_element_t<Vec>;
69 static constexpr std::size_t N = linalg::vector_dim_v<Vec>;
73template <linalg::VectorContainer Vec>
76 using T = linalg::vector_element_t<Vec>;
78 static constexpr std::size_t N = linalg::vector_dim_v<Vec>;
82template <linalg::VectorContainer Vec>
85 using T = linalg::vector_element_t<Vec>;
87 static constexpr std::size_t N = linalg::vector_dim_v<Vec>;
109template <
typename ConeTuple>
113template <
typename... Cs>
115 static constexpr std::size_t NumCones =
sizeof...(Cs);
116 static constexpr std::size_t LocalConeDim =
117 (std::size_t{0} + ... + cone_dim_t<Cs>);
121template <
typename ConeTuple>
126template <
typename ConeTuple>
131template <
typename ConeTuple>
133 cone_tuple_local_cone_dim_v<ConeTuple>;
136template <affine::AffineMapLike Map,
typename... Cs>
140template <
typename ConeBlock>
144template <affine::AffineMapLike Map,
typename... Cs>
147 using MapT = affine::affine_mat_t<Map>;
150 static constexpr std::size_t NumCones =
sizeof...(Cs);
151 static constexpr std::size_t LocalConeDim =
152 cone_tuple_local_cone_dim_v<Cones>;
153 static constexpr std::size_t MapRows = linalg::mat_rows_v<MapT>;
154 static constexpr std::size_t MapCols = linalg::mat_cols_v<MapT>;
158template <
typename CB>
163template <
typename CB>
168template <
typename CB>
173template <
typename CB>
175 cone_block_local_cone_dim_v<CB>;
178template <
typename CB>
183template <
typename CB>
195template <
typename Builder>
197 { builder.coord_map };
203template <linalg::RnSpace DecVarDom, affine::AffineMapLike CoordMap,
205 typename CanonicalTrace>
209template <
typename Builder>
213template <linalg::RnSpace DecVarDom, affine::AffineMapLike CoordMap,
215 typename CanonicalTrace>
226 using EqMapT = affine::affine_mat_t<EqMap>;
228 static constexpr std::size_t DecDim = linalg::space_dim_v<DecVarDom>;
229 static constexpr std::size_t CoordRows = linalg::mat_rows_v<CoordMapT>;
230 static constexpr std::size_t CoordCols = linalg::mat_cols_v<CoordMapT>;
231 static constexpr std::size_t CoordAuxDim =
232 CoordCols > DecDim ? CoordCols - DecDim : 0;
234 static constexpr std::size_t ConeRows = cone_block_map_rows_v<CB>;
235 static constexpr std::size_t ConeCols = cone_block_map_cols_v<CB>;
236 static constexpr std::size_t ConeAuxDim =
237 ConeCols > DecDim ? ConeCols - DecDim : 0;
238 static constexpr std::size_t ConeCount = cone_block_num_cones_v<CB>;
239 static constexpr std::size_t LocalConeDim = cone_block_local_cone_dim_v<CB>;
241 static constexpr std::size_t EqRows = linalg::mat_rows_v<EqMapT>;
242 static constexpr std::size_t EqCols = linalg::mat_cols_v<EqMapT>;
243 static constexpr std::size_t EqAuxDim = EqCols > DecDim ? EqCols - DecDim : 0;
245 static constexpr std::size_t FullDim = ConeCols > EqCols ? ConeCols : EqCols;
249template <
typename Builder>
254template <
typename Builder>
259template <
typename Builder>
264template <
typename Builder>
269template <
typename Builder>
274template <
typename Builder>
279template <
typename Builder>
284template <
typename Builder>
289template <
typename Builder>
294template <
typename Builder>
299template <
typename Builder>
304template <
typename Builder>
309template <
typename Builder>
314template <
typename Builder>
319template <
typename Builder>
321 builder_local_cone_dim_v<Builder>;
324template <
typename Builder>
329template <
typename Builder>
334template <
typename Builder>
339template <
typename Builder>
Concept for canonicalization builder objects.
concept for cone block like used in canonical form
constexpr std::size_t builder_cone_aux_dim_v
auxiliary columns visible to the current cone map
constexpr std::size_t builder_full_dim_v
widest canonical domain currently visible to cone or equality rows
constexpr std::size_t cone_block_num_cones_v
helper to extract number of cones from cone block
constexpr std::size_t builder_eq_rows_v
current equality affine-map row count
constexpr std::size_t cone_tuple_dim_v
Compatibility alias for total local cone coordinate dimension.
typename cone_block_traits< linalg::remove_cvref_t< CB > >::FMap cone_block_map_t
alias for extracting F map from cone block
constexpr std::size_t builder_coord_aux_dim_v
auxiliary columns visible to the current coordinate selector
constexpr std::size_t builder_coord_rows_v
current coordinate selector row count
typename cone_traits< linalg::remove_cvref_t< Cone > >::SlackT cone_slack_t
alias for slack type in cone
typename builder_traits< linalg::remove_cvref_t< Builder > >::ConeBlock builder_cb_t
builder cone block
constexpr std::size_t builder_eq_aux_dim_v
auxiliary columns visible to the current equality map
typename builder_traits< linalg::remove_cvref_t< Builder > >::EqualityMap builder_eq_t
builder equality map
constexpr std::size_t cone_dim_t
helper to get N from cone
constexpr std::size_t builder_cone_cols_v
current cone affine-map column count
constexpr std::size_t cone_tuple_num_cones_v
Number of cones in a fixed cone tuple.
constexpr std::size_t builder_coord_cols_v
current coordinate selector column count
constexpr std::size_t cone_block_map_cols_v
number of columns in the cone block affine map
constexpr bool is_cone_symmetric_v
helper to see if cone is symmetric
constexpr std::size_t cone_tuple_local_cone_dim_v
Total cone coordinate dimension represented by a fixed cone tuple.
constexpr std::size_t cone_block_cone_dim_v
Compatibility alias for local cone coordinate dimension.
typename cone_traits< linalg::remove_cvref_t< Cone > >::T cone_scalar_t
alias for scalar type in cone
constexpr std::size_t builder_cone_dim_v
Compatibility alias for realized local cone coordinate dimension.
constexpr std::size_t builder_cone_count_v
number of cones currently accumulated by a builder
constexpr std::size_t builder_dec_dim_v
original decision-variable dimension tracked by a builder
typename builder_traits< linalg::remove_cvref_t< Builder > >::Dom builder_dom_t
builder domain
typename builder_traits< linalg::remove_cvref_t< Builder > >::Map builder_map_t
builder map
typename builder_traits< linalg::remove_cvref_t< Builder > >::CanonicalTraceT builder_canonical_trace_t
builder canonical trace
constexpr std::size_t cone_block_map_rows_v
number of rows in the cone block affine map
constexpr std::size_t builder_eq_cols_v
current equality affine-map column count
constexpr std::size_t builder_cone_rows_v
current cone affine-map row count
constexpr std::size_t builder_local_cone_dim_v
total local cone coordinate dimension currently realized by a builder
constexpr std::size_t cone_block_local_cone_dim_v
total coordinate dimension spanned by the cone tuple
forward decl for nonneg orthant cone
std::tuple< Cs... > Cones
affine::affine_mat_t< Map > MapT
linalg::vector_element_t< Vec > T
linalg::vector_element_t< Vec > T
linalg::vector_element_t< Vec > T
linalg::vector_element_t< Vec > T
linalg::vector_element_t< Vec > T
Base traits for tuples of cones.