alpaqa 1.0.0a13
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Namespaces | Classes | Concepts | Typedefs | Functions | Variables
alpaqa::util Namespace Reference

Namespaces

namespace  detail
 

Classes

class  bad_type_erased_constness
 
class  bad_type_erased_type
 
struct  BasicVTable
 Struct that stores the size of a polymorphic object, as well as pointers to functions to copy, move or destroy the object. More...
 
struct  class_from_member_ptr_impl
 
struct  class_from_member_ptr_impl< Ret(C::*)(Args...) const >
 
struct  class_from_member_ptr_impl< Ret(C::*)(Args...)>
 
struct  copyable_unique_ptr
 
struct  enumerate_t
 
struct  first_type_or_void
 
struct  first_type_or_void< First, Pack... >
 
struct  first_type_or_void<>
 
struct  iter_range_adapter
 
struct  last_type
 
struct  last_type< Only >
 
struct  noop_delete
 Deleter for std::unique_ptr that just destructs the object, without deallocating. More...
 
struct  set_intersection_iterable
 
struct  te_in_place_t
 Similar to std::in_place_t. More...
 
struct  Timed
 
class  TypeErased
 Class for polymorphism through type erasure. More...
 

Concepts

concept  derived_from_TypeErased
 
concept  no_leading_allocator
 

Typedefs

template<class M >
using class_from_member_ptr_impl_t = typename class_from_member_ptr_impl< M >::type
 
template<auto M>
using class_from_member_ptr_t = class_from_member_ptr_impl_t< decltype(M)>
 
template<class... Pack>
using last_type_t = typename last_type< Pack... >::type
 
template<class... Pack>
using first_type_or_void_t = typename first_type_or_void< Pack... >::type
 

Functions

template<Config Conf>
void check_dim_msg (crvec< Conf > v, auto sz, std::string msg)
 
template<Config Conf>
void check_dim_msg (std::optional< vec< Conf > > &v, auto sz, std::string msg)
 
template<Config Conf, class V >
void check_dim (std::string name, V &&v, auto sz)
 
template<Config Conf>
void check_dim_msg (crmat< Conf > m, auto rows, auto cols, std::string msg)
 
template<Config Conf>
void check_dim (std::string name, crmat< Conf > m, auto rows, auto cols)
 
template<class Rng >
auto enumerate (Rng &&rng)
 
template<std::ranges::viewable_range R1, std::ranges::viewable_range R2, class Comp = std::ranges::less, class Proj1 = std::identity, class Proj2 = std::identity>
set_intersection_iterable< std::ranges::views::all_t< R1 >, std::ranges::views::all_t< R2 >, Comp, Proj1, Proj2iter_set_intersection (R1 &&r1, R2 &&r2, Comp comp={}, Proj1 proj1={}, Proj2 proj2={})
 
template<class SpMat , class Mat , class MaskVec >
void sparse_add_masked (const SpMat &R_full, Mat &&R, const MaskVec &mask)
 R += R_full(mask,mask)
 
template<class SpMat , class Mat , class MaskVec >
void sparse_add_masked_rows (const SpMat &S_full, Mat &&S, const MaskVec &mask)
 S += S_full(mask,:)
 
template<class SpMat , class CVec , class Vec , class MaskVec >
void sparse_matvec_add_masked_rows_cols (const SpMat &R, const CVec &v, Vec &&out, const MaskVec &mask_J, const MaskVec &mask_K)
 out += R(mask_J,mask_K) * v(mask_K);
 
template<class SpMat , class CVec , class Vec , class MaskVec >
void sparse_matvec_add_transpose_masked_rows (const SpMat &S, const CVec &v, Vec &&out, const MaskVec &mask)
 out += S(mask,:)ᵀ * v(mask);
 
template<class Class , auto Method, class... ExtraArgs>
constexpr auto type_erased_wrapped ()
 Returns a function that accepts a void pointer, casts it to the class type of the member function Method, launders it, and then invokes Method with it, passing on the arguments to Method.
 
template<class VTable , class Allocator >
constexpr size_t default_te_buffer_size ()
 
template<class... Types>
constexpr size_t required_te_buffer_size_for ()
 

Variables

template<class T >
constexpr te_in_place_t< Tte_in_place
 Convenience instance of te_in_place_t.
 

Class Documentation

◆ alpaqa::util::class_from_member_ptr_impl

struct alpaqa::util::class_from_member_ptr_impl
+ Collaboration diagram for class_from_member_ptr_impl< M >:

◆ alpaqa::util::class_from_member_ptr_impl< Ret(C::*)(Args...) const >

struct alpaqa::util::class_from_member_ptr_impl< Ret(C::*)(Args...) const >
+ Collaboration diagram for class_from_member_ptr_impl< Ret(C::*)(Args...) const >:
Class Members
typedef add_const_t< C > type

◆ alpaqa::util::class_from_member_ptr_impl< Ret(C::*)(Args...)>

struct alpaqa::util::class_from_member_ptr_impl< Ret(C::*)(Args...)>
+ Collaboration diagram for class_from_member_ptr_impl< Ret(C::*)(Args...)>:
Class Members
typedef C type

◆ alpaqa::util::first_type_or_void

struct alpaqa::util::first_type_or_void
+ Collaboration diagram for first_type_or_void< Pack >:

◆ alpaqa::util::first_type_or_void< First, Pack... >

struct alpaqa::util::first_type_or_void< First, Pack... >
+ Collaboration diagram for first_type_or_void< First, Pack... >:
Class Members
typedef First type

◆ alpaqa::util::first_type_or_void<>

struct alpaqa::util::first_type_or_void<>
+ Collaboration diagram for first_type_or_void<>:
Class Members
typedef void type

◆ alpaqa::util::last_type

struct alpaqa::util::last_type
+ Collaboration diagram for last_type< First, Pack >:
Class Members
typedef typename type type

◆ alpaqa::util::last_type< Only >

struct alpaqa::util::last_type< Only >
+ Collaboration diagram for last_type< Only >:
Class Members
typedef Only type

◆ alpaqa::util::te_in_place_t

struct alpaqa::util::te_in_place_t
+ Collaboration diagram for te_in_place_t< T >:

Typedef Documentation

◆ class_from_member_ptr_impl_t

Definition at line 23 of file type-traits.hpp.

◆ class_from_member_ptr_t

Definition at line 27 of file type-traits.hpp.

◆ last_type_t

template<class... Pack>
using last_type_t = typename last_type<Pack...>::type

Definition at line 38 of file type-traits.hpp.

◆ first_type_or_void_t

template<class... Pack>
using first_type_or_void_t = typename first_type_or_void<Pack...>::type

Definition at line 51 of file type-traits.hpp.

Function Documentation

◆ check_dim_msg() [1/3]

template<Config Conf>
void check_dim_msg ( crvec< Conf v,
auto  sz,
std::string  msg 
)

Definition at line 11 of file check-dim.hpp.

◆ check_dim_msg() [2/3]

template<Config Conf>
void check_dim_msg ( std::optional< vec< Conf > > &  v,
auto  sz,
std::string  msg 
)

Definition at line 23 of file check-dim.hpp.

◆ check_dim() [1/2]

template<Config Conf, class V >
void check_dim ( std::string  name,
V &&  v,
auto  sz 
)

Definition at line 37 of file check-dim.hpp.

◆ check_dim_msg() [3/3]

template<Config Conf>
void check_dim_msg ( crmat< Conf m,
auto  rows,
auto  cols,
std::string  msg 
)

Definition at line 43 of file check-dim.hpp.

◆ check_dim() [2/2]

template<Config Conf>
void check_dim ( std::string  name,
crmat< Conf m,
auto  rows,
auto  cols 
)

Definition at line 59 of file check-dim.hpp.

◆ enumerate()

template<class Rng >
auto enumerate ( Rng &&  rng)

Definition at line 66 of file enumerate.hpp.

+ Here is the caller graph for this function:

◆ iter_set_intersection()

template<std::ranges::viewable_range R1, std::ranges::viewable_range R2, class Comp = std::ranges::less, class Proj1 = std::identity, class Proj2 = std::identity>
set_intersection_iterable< std::ranges::views::all_t< R1 >, std::ranges::views::all_t< R2 >, Comp, Proj1, Proj2 > iter_set_intersection ( R1 &&  r1,
R2 &&  r2,
Comp  comp = {},
Proj1  proj1 = {},
Proj2  proj2 = {} 
)

Definition at line 114 of file set-intersection.hpp.

+ Here is the caller graph for this function:

◆ sparse_add_masked()

template<class SpMat , class Mat , class MaskVec >
void sparse_add_masked ( const SpMat R_full,
Mat &&  R,
const MaskVec mask 
)

R += R_full(mask,mask)

Definition at line 83 of file sparse-ops.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sparse_add_masked_rows()

template<class SpMat , class Mat , class MaskVec >
void sparse_add_masked_rows ( const SpMat S_full,
Mat &&  S,
const MaskVec mask 
)

S += S_full(mask,:)

Definition at line 93 of file sparse-ops.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sparse_matvec_add_masked_rows_cols()

template<class SpMat , class CVec , class Vec , class MaskVec >
void sparse_matvec_add_masked_rows_cols ( const SpMat R,
const CVec v,
Vec &&  out,
const MaskVec mask_J,
const MaskVec mask_K 
)

out += R(mask_J,mask_K) * v(mask_K);

Definition at line 104 of file sparse-ops.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sparse_matvec_add_transpose_masked_rows()

template<class SpMat , class CVec , class Vec , class MaskVec >
void sparse_matvec_add_transpose_masked_rows ( const SpMat S,
const CVec v,
Vec &&  out,
const MaskVec mask 
)

out += S(mask,:)ᵀ * v(mask);

Definition at line 117 of file sparse-ops.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_erased_wrapped()

template<class Class , auto Method, class... ExtraArgs>
constexpr auto type_erased_wrapped ( )
constexpr

Returns a function that accepts a void pointer, casts it to the class type of the member function Method, launders it, and then invokes Method with it, passing on the arguments to Method.

The function can also accept additional arguments at the end, of type ExtraArgs.

Definition at line 171 of file type-erasure.hpp.

◆ default_te_buffer_size()

template<class VTable , class Allocator >
constexpr size_t default_te_buffer_size ( )
inlineconstexpr

Definition at line 176 of file type-erasure.hpp.

◆ required_te_buffer_size_for()

template<class... Types>
constexpr size_t required_te_buffer_size_for ( )
inlineconstexpr

Definition at line 187 of file type-erasure.hpp.

Variable Documentation

◆ te_in_place

template<class T >
constexpr te_in_place_t<T> te_in_place
inlineconstexpr

Convenience instance of te_in_place_t.

Definition at line 197 of file type-erasure.hpp.