proxsuite 0.7.1
The Advanced Proximal Optimization Toolbox
|
Namespaces | |
namespace | _detail |
namespace | concepts |
namespace | tags |
namespace | util |
Classes | |
struct | DenseVecMut |
struct | DenseVecRef |
struct | MatMut |
struct | MatRef |
struct | SymbolicMatMut |
struct | SymbolicMatRef |
struct | VecRef |
Enumerations | |
enum struct | Ordering : unsigned char { natural , user_provided , amd , ENUM_END } |
Functions | |
VEG_TAG (from_eigen, FromEigen) | |
template<typename I > | |
auto | transpose_req (proxsuite::linalg::veg::Tag< I >, isize nrows) noexcept -> proxsuite::linalg::veg::dynstack::StackReq |
template<typename T , typename I > | |
void | transpose (MatMut< T, I > at, MatRef< T, I > a, DynStackMut stack) noexcept(VEG_CONCEPT(nothrow_copyable< T >)) |
template<typename I > | |
auto | transpose_symbolic_req (proxsuite::linalg::veg::Tag< I >, isize nrows) noexcept -> proxsuite::linalg::veg::dynstack::StackReq |
template<typename I > | |
void | transpose_symbolic (SymbolicMatMut< I > at, SymbolicMatRef< I > a, DynStackMut stack) noexcept |
template<typename T , typename I > | |
void | dense_lsolve (DenseVecMut< T > x, MatRef< T, I > l) noexcept(false) |
template<typename T , typename I > | |
void | dense_ltsolve (DenseVecMut< T > x, MatRef< T, I > l) noexcept(false) |
template<typename I > | |
auto | etree_req (proxsuite::linalg::veg::Tag< I >, isize n) noexcept -> proxsuite::linalg::veg::dynstack::StackReq |
template<typename I > | |
VEG_INLINE void | etree (I *parent, SymbolicMatRef< I > a, DynStackMut stack) noexcept |
template<typename I > | |
auto | postorder_req (proxsuite::linalg::veg::Tag< I >, isize n) noexcept -> proxsuite::linalg::veg::dynstack::StackReq |
template<typename I > | |
void | postorder (I *post, I const *parent, isize n, DynStackMut stack) noexcept |
template<typename I > | |
auto | column_counts_req (proxsuite::linalg::veg::Tag< I > tag, isize n, isize nnz) noexcept -> proxsuite::linalg::veg::dynstack::StackReq |
template<typename I > | |
void | column_counts (I *counts, SymbolicMatRef< I > a, I const *parent, I const *post, DynStackMut stack) noexcept |
template<typename I > | |
auto | amd_req (proxsuite::linalg::veg::Tag< I >, isize, isize nnz) noexcept -> proxsuite::linalg::veg::dynstack::StackReq |
template<typename I > | |
void | amd (I *perm, SymbolicMatRef< I > mat, DynStackMut stack) noexcept |
template<typename I > | |
auto | factorize_symbolic_req (proxsuite::linalg::veg::Tag< I > tag, isize n, isize nnz, Ordering o) noexcept -> proxsuite::linalg::veg::dynstack::StackReq |
template<typename I > | |
void | factorize_symbolic_non_zeros (I *nnz_per_col, I *etree, I *perm_inv, I const *perm, SymbolicMatRef< I > a, DynStackMut stack) noexcept |
template<typename I > | |
void | factorize_symbolic_col_counts (I *col_ptrs, I *etree, I *perm_inv, I const *perm, SymbolicMatRef< I > a, DynStackMut stack) noexcept |
template<typename T , typename I > | |
auto | factorize_numeric_req (proxsuite::linalg::veg::Tag< T >, proxsuite::linalg::veg::Tag< I >, isize n, isize a_nnz, Ordering o) noexcept -> proxsuite::linalg::veg::dynstack::StackReq |
template<typename T , typename I > | |
void | factorize_numeric (T *values, I *row_indices, proxsuite::linalg::veg::DoNotDeduce< T const * > diag_to_add, proxsuite::linalg::veg::DoNotDeduce< I const * > perm, I const *col_ptrs, I const *etree, I const *perm_inv, MatRef< T, I > a, DynStackMut stack) noexcept(false) |
template<typename T , typename I > | |
auto | delete_row_req (proxsuite::linalg::veg::Tag< T >, proxsuite::linalg::veg::Tag< I >, isize n, isize max_nnz) noexcept -> proxsuite::linalg::veg::dynstack::StackReq |
template<typename T , typename I > | |
auto | delete_row (MatMut< T, I > ld, I *etree, I const *perm_inv, isize pos, DynStackMut stack) noexcept(false) -> MatMut< T, I > |
template<typename T , typename I > | |
auto | add_row_req (proxsuite::linalg::veg::Tag< T >, proxsuite::linalg::veg::Tag< I >, isize n, bool id_perm, isize nnz, isize max_nnz) noexcept -> proxsuite::linalg::veg::dynstack::StackReq |
template<typename T , typename I > | |
auto | add_row (MatMut< T, I > ld, I *etree, I const *perm_inv, isize pos, VecRef< T, I > new_col, proxsuite::linalg::veg::DoNotDeduce< T > diag_element, DynStackMut stack) noexcept(false) -> MatMut< T, I > |
template<typename I > | |
auto | merge_second_col_into_first_req (proxsuite::linalg::veg::Tag< I >, isize second_size) noexcept -> proxsuite::linalg::veg::dynstack::StackReq |
template<typename T , typename I > | |
auto | merge_second_col_into_first (I *difference, T *first_values, I *first_ptr, PROXSUITE_MAYBE_UNUSED isize first_full_len, isize first_initial_len, Slice< I > second, proxsuite::linalg::veg::DoNotDeduce< I > ignore_threshold_inclusive, bool move_values, DynStackMut stack) noexcept(false) -> proxsuite::linalg::veg::Tuple< SliceMut< T >, SliceMut< I >, SliceMut< I > > |
template<typename T , typename I > | |
auto | rank1_update_req (proxsuite::linalg::veg::Tag< T >, proxsuite::linalg::veg::Tag< I >, isize n, bool id_perm, isize col_nnz) noexcept -> proxsuite::linalg::veg::dynstack::StackReq |
template<typename T , typename I > | |
auto | rank1_update (MatMut< T, I > ld, I *etree, I const *perm_inv, VecRef< T, I > w, proxsuite::linalg::veg::DoNotDeduce< T > alpha, DynStackMut stack) noexcept(false) -> MatMut< T, I > |
|
strong |
Enumerator | |
---|---|
natural | |
user_provided | |
amd | |
ENUM_END |
Definition at line 914 of file factorize.hpp.
|
noexcept |
Definition at line 17 of file factorize.hpp.
|
noexcept |
Definition at line 26 of file factorize.hpp.
|
noexcept |
Definition at line 86 of file factorize.hpp.
|
noexcept |
Definition at line 95 of file factorize.hpp.
void proxsuite::linalg::sparse::dense_lsolve | ( | DenseVecMut< T > | x, |
MatRef< T, I > | l ) |
l
is unit lower triangular whose diagonal elements are ignored. Solves l×y = x
and store the solution in x
.
x | RHS of the system, solution storage. |
l | matrix to be inverted. |
Definition at line 149 of file factorize.hpp.
void proxsuite::linalg::sparse::dense_ltsolve | ( | DenseVecMut< T > | x, |
MatRef< T, I > | l ) |
l
is unit lower triangular whose diagonal elements are ignored. Solves l.T×y = x
and store the solution in x
.
x | RHS of the system, solution storage. |
l | matrix to be inverted. |
Definition at line 188 of file factorize.hpp.
|
noexcept |
Computes the stack memory requirements of etree computation.
n | dimension of the matrix. |
Definition at line 252 of file factorize.hpp.
|
noexcept |
Computes the elimination tree of the cholesky factor of a
of size n
. a
is considered symmetric but should only contain terms from the upper triangular part.
parent | pointer to the elimination tree storage, of size n . |
a | symbolic structure of the matrix to be factorized. |
stack | temporary allocation stack |
Definition at line 269 of file factorize.hpp.
|
noexcept |
Computes the memory requirements of the postordering of the cholesky factorization.
n | dimension of the matrix to be factorized. |
Definition at line 459 of file factorize.hpp.
|
noexcept |
Computes the postordering of the cholesky factorization of dimension n
.
post | storage for the postordering, of size n |
parent | pointer to the elimination tree |
n | dimension of the matrix to be factorized |
stack | temporary allocation stack |
Definition at line 475 of file factorize.hpp.
|
noexcept |
Definition at line 582 of file factorize.hpp.
|
noexcept |
Definition at line 596 of file factorize.hpp.
|
noexcept |
Definition at line 719 of file factorize.hpp.
|
noexcept |
Definition at line 727 of file factorize.hpp.
|
noexcept |
Computes the stack memory requirements of symbolic factorization.
n | dimension of the matrix to be factorized. |
nnz | number of non zeros of the matrix to be factorized. |
o | the kind of permutation that is applied to the matrix before factorization. |
Definition at line 932 of file factorize.hpp.
|
noexcept |
Performs symbolic factorization and computed the number of non-zeros in each column of the cholesky factor of dimension n
.
nnz_per_col | storage for non-zeros per column, of size n |
etree | storage for elimination tree, of size n |
perm_inv | storage for inverse permutation, of size n |
perm | optionally user-provided permutation, either null or of size n |
a | matrix to be symbolically factorized |
stack | temporary allocation stack |
Definition at line 986 of file factorize.hpp.
|
noexcept |
Performs symbolic factorization and computed the column pointers for each column of the cholesky factor of dimension n
.
col_ptrs | storage for column pointers, of size n + 1 |
etree | storage for elimination tree, of size n |
perm_inv | storage for inverse permutation, of size n |
perm | optionally user-provided permutation, either null or of size n |
a | matrix to be symbolically factorized |
stack | temporary allocation stack |
Definition at line 1075 of file factorize.hpp.
|
noexcept |
Computes the stack memory requirements of numerical factorization.
n | dimension of the matrix to be factorized. |
a_nnz | number of non zeros of the matrix to be factorized. |
o | the kind of permutation that is applied to the matrix before factorization. |
Definition at line 1110 of file factorize.hpp.
void proxsuite::linalg::sparse::factorize_numeric | ( | T * | values, |
I * | row_indices, | ||
proxsuite::linalg::veg::DoNotDeduce< T const * > | diag_to_add, | ||
proxsuite::linalg::veg::DoNotDeduce< I const * > | perm, | ||
I const * | col_ptrs, | ||
I const * | etree, | ||
I const * | perm_inv, | ||
MatRef< T, I > | a, | ||
DynStackMut | stack ) |
Performs numerical LDLT
factorization, assuming the symbolic factorization and column counts have already been computed. L
and D
are stored in the same matrix, with the elements of D
replacing the implicit diagonal 1
element of each column of L
.
values | pointer to the values of the factorization |
row_indices | pointer to the row indices of the factorization |
diag_to_add | pointer to a vector that is added to the diagonal of the matrix during factorization, if diag_to_add and perm are both non null |
perm | pointer to the pre-computed permutation that is applied to diag . |
col_ptrs | pointer to the already computed column pointers |
etree | pointer to the already computed elimination tree |
perm_inv | pointer to the already computed inverse permutation. Must be the inverse of perm |
a | matrix to be factorized |
stack | temporary allocation stack |
Definition at line 1158 of file factorize.hpp.
|
noexcept |
Computes the memory requirements for deleting a row and column for the ldlt factors
n | : dimension of the matrix |
max_nnz | : upper bound of non zero counts over the columns of the matrix. n is always a valid value. |
Definition at line 25 of file rowmod.hpp.
auto proxsuite::linalg::sparse::delete_row | ( | MatMut< T, I > | ld, |
I * | etree, | ||
I const * | perm_inv, | ||
isize | pos, | ||
DynStackMut | stack ) -> MatMut<T, I> |
Given the ldlt factors of matrix a, computes the ldlt factors of the matrix a with row and column at position pos replaced by those of the identity matrix It returns a view of the updated factors.
ld | : the ldlt factors |
etree | pointer to the elimination tree |
perm_inv | pointer to inverse permutation (for ex AMD). If this is null, the permutation is assumed to be the identity. |
pos | position of the row and column to be deleted |
stack | is the memory stack |
Definition at line 52 of file rowmod.hpp.
|
noexcept |
Computes the memory requirements for adding a row and column for the ldlt factors
n | : dimension of the matrix |
id_perm | : whether the permutation corresponds to the identity |
nnz | : number of non zero elements in the added vector |
max_nnz | : upper bound of non zero counts over the columns of the matrix. n is always a valid value. |
Definition at line 143 of file rowmod.hpp.
auto proxsuite::linalg::sparse::add_row | ( | MatMut< T, I > | ld, |
I * | etree, | ||
I const * | perm_inv, | ||
isize | pos, | ||
VecRef< T, I > | new_col, | ||
proxsuite::linalg::veg::DoNotDeduce< T > | diag_element, | ||
DynStackMut | stack ) -> MatMut<T, I> |
Given the ldlt factors of matrix a, computes the ldlt factors of the matrix a with added row and column at position pos. It is assumed that the row and column are empty except the diagonal element. It returns a view of the updated factors.
ld | : the ldlt factors |
etree | pointer to the elimination tree |
perm_inv | pointer to inverse permutation (for ex AMD). If this is null, the permutation is assumed to be the identity. |
pos | position of the row and column to be added |
new_col | : new column to be added without the diagonal element (of size nnz-1) |
diag_element | : diagonal element of the added row and column |
stack | is the memory stack |
Definition at line 190 of file rowmod.hpp.
|
noexcept |
Definition at line 21 of file update.hpp.
auto proxsuite::linalg::sparse::merge_second_col_into_first | ( | I * | difference, |
T * | first_values, | ||
I * | first_ptr, | ||
PROXSUITE_MAYBE_UNUSED isize | first_full_len, | ||
isize | first_initial_len, | ||
Slice< I > | second, | ||
proxsuite::linalg::veg::DoNotDeduce< I > | ignore_threshold_inclusive, | ||
bool | move_values, | ||
DynStackMut | stack ) -> proxsuite::linalg::veg::Tuple<SliceMut<T>, SliceMut<I>, SliceMut<I>> |
Definition at line 33 of file update.hpp.
|
noexcept |
Computes the memory requirements for rank one update.
n | dimension of matrix |
id_perm | whether the permutation is implicitly the identity or not |
col_nnz | number of nnz elts in the update vector |
Definition at line 170 of file update.hpp.
auto proxsuite::linalg::sparse::rank1_update | ( | MatMut< T, I > | ld, |
I * | etree, | ||
I const * | perm_inv, | ||
VecRef< T, I > | w, | ||
proxsuite::linalg::veg::DoNotDeduce< T > | alpha, | ||
DynStackMut | stack ) -> MatMut<T, I> |
Performs a rank one update in place. Given ldlt factor l, and d, of a matrix a, this computes the ldlt factors of a + alpha w w.T It returns a view on the updated factors.
ld | : ldlt factors of a (lower triangular with d on the diagonal) |
etree | pointer to the elimination tree |
perm_inv | pointer to inverse permutation (for ex AMD). If this is null, the permutation is assumed to be the identity. |
w | is the update vector |
alpha | is the update coefficient |
stack | is the memory stack |
Definition at line 207 of file update.hpp.