|
PANOC-ALM
quadratic-penalty
Nonconvex constrained optimization
|
Go to the documentation of this file.
18 struct findstack : std::stack<real_t *, std::vector<real_t *>> {
21 auto begin() {
return this->
c.begin(); }
22 auto begin()
const {
return this->
c.begin(); }
23 auto end() {
return this->
c.end(); }
24 auto end()
const {
return this->
c.end(); }
26 auto cbegin()
const {
return this->
c.cbegin(); }
27 auto cend()
const {
return this->
c.cend(); }
29 auto rbegin() {
return this->
c.rbegin(); }
30 auto rbegin()
const {
return this->
c.rbegin(); }
31 auto rend() {
return this->
c.rend(); }
32 auto rend()
const {
return this->
c.rend(); }
34 auto crbegin()
const {
return this->
c.crbegin(); }
35 auto crend()
const {
return this->
c.crend(); }
52 using mvec = Eigen::Map<vec>;
66 :
v{std::exchange(o.v, {nullptr, 0})},
67 alloc{std::exchange(o.alloc,
nullptr)} {}
70 this->v = std::exchange(o.v, {nullptr, 0});
71 this->alloc = std::exchange(o.alloc,
nullptr);
85 throw std::bad_alloc();
86 auto dptr =
stack.top();
89 return Eigen::Map<vec>(dptr,
n);
96 assert(dptr >= &*
storage.begin());
103 template <
class... Vecs>
vec_allocator(size_t num_vec, Eigen::Index n)
vec_allocator & operator=(vec_allocator &&)=delete
Eigen::Ref< vec > rvec
Default type for mutable references to vectors.
constexpr real_t NaN
Not a number.
Eigen::Index vector_size() const
alloc_raii_wrapper alloc_raii()
alloc_raii_wrapper & operator=(crvec v)
size_t used_space() const
alloc_raii_wrapper(real_t *dptr, Eigen::Index n, vec_allocator *alloc)
alloc_raii_wrapper(mvec &&v, vec_allocator *alloc)
alloc_raii_wrapper & operator=(alloc_raii_wrapper &&o)
Eigen::Ref< const vec > crvec
Default type for immutable references to vectors.
void free(rvec first, Vecs &&...vecs)
vec_allocator & operator=(const vec_allocator &)=delete
pa::vec_allocator::findstack stack
alloc_raii_wrapper(alloc_raii_wrapper &&o)
vec_allocator(const vec_allocator &)=delete
vec_allocator(vec_allocator &&)=delete
std::vector< real_t > storage
alloc_raii_wrapper & operator=(const alloc_raii_wrapper &)=delete
alloc_raii_wrapper(const alloc_raii_wrapper &)=delete
double real_t
Default floating point type.