alpaqa 1.0.0a15
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
SparseCOO< Conf, StorageIndex > Struct Template Reference

#include <alpaqa/problem/sparsity.hpp>

Detailed Description

template<Config Conf, class StorageIndex>
struct alpaqa::sparsity::SparseCOO< Conf, StorageIndex >

Sparse coordinate list structure (COO).

Definition at line 56 of file sparsity.hpp.

+ Collaboration diagram for SparseCOO< Conf, StorageIndex >:

Public Types

enum  Order {
  Unsorted = 0 , SortedByColsAndRows = 1 , SortedByColsOnly = 2 , SortedByRowsAndCols = 3 ,
  SortedByRowsOnly = 4
}
 
using storage_index_t = StorageIndex
 
using index_vector_t = Eigen::VectorX< storage_index_t >
 
using index_vector_view_t = Eigen::Ref< const index_vector_t >
 
using index_vector_map_t = Eigen::Map< const index_vector_t >
 

Public Member Functions

length_t nnz () const
 Get the number of structurally nonzero elements.
 

Public Attributes

length_t rows = 0
 
length_t cols = 0
 
Symmetry symmetry = Symmetry::Unsymmetric
 
index_vector_view_t row_indices = index_vector_map_t{nullptr, 0}
 
index_vector_view_t col_indices = index_vector_map_t{nullptr, 0}
 
Order order = Unsorted
 
storage_index_t first_index = 0
 Zero for C/C++, one for Fortran.
 

Member Typedef Documentation

◆ storage_index_t

Definition at line 58 of file sparsity.hpp.

◆ index_vector_t

template<Config Conf, class StorageIndex >
using index_vector_t = Eigen::VectorX<storage_index_t>

Definition at line 59 of file sparsity.hpp.

◆ index_vector_view_t

template<Config Conf, class StorageIndex >
using index_vector_view_t = Eigen::Ref<const index_vector_t>

Definition at line 60 of file sparsity.hpp.

◆ index_vector_map_t

template<Config Conf, class StorageIndex >
using index_vector_map_t = Eigen::Map<const index_vector_t>

Definition at line 61 of file sparsity.hpp.

Member Enumeration Documentation

◆ Order

template<Config Conf, class StorageIndex >
enum Order
Enumerator
Unsorted 

The indices are not sorted.

SortedByColsAndRows 

The indices are sorted by column first, and within each column, the rows are sorted as well.

SortedByColsOnly 

The indices are sorted by column, but the rows within each column are not sorted.

SortedByRowsAndCols 

The indices are sorted by row first, and within each row, the columns are sorted as well.

SortedByRowsOnly 

The indices are sorted by row, but the columns within each row are not sorted.

Definition at line 66 of file sparsity.hpp.

Member Function Documentation

◆ nnz()

template<Config Conf, class StorageIndex >
length_t nnz ( ) const
inline

Get the number of structurally nonzero elements.

Definition at line 86 of file sparsity.hpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ rows

template<Config Conf, class StorageIndex >
length_t rows = 0

Definition at line 62 of file sparsity.hpp.

◆ cols

template<Config Conf, class StorageIndex >
length_t cols = 0

Definition at line 62 of file sparsity.hpp.

◆ symmetry

template<Config Conf, class StorageIndex >
Symmetry symmetry = Symmetry::Unsymmetric

Definition at line 63 of file sparsity.hpp.

◆ row_indices

template<Config Conf, class StorageIndex >
index_vector_view_t row_indices = index_vector_map_t{nullptr, 0}

Definition at line 64 of file sparsity.hpp.

◆ col_indices

template<Config Conf, class StorageIndex >
index_vector_view_t col_indices = index_vector_map_t{nullptr, 0}

Definition at line 65 of file sparsity.hpp.

◆ order

template<Config Conf, class StorageIndex >
Order order = Unsorted

Definition at line 82 of file sparsity.hpp.

◆ first_index

template<Config Conf, class StorageIndex >
storage_index_t first_index = 0

Zero for C/C++, one for Fortran.

Definition at line 83 of file sparsity.hpp.


The documentation for this struct was generated from the following file: