sym-ildl  1.2
Incomplete LDL' factorizations of indefinite symmetric and skew-symmetric matrices.
swap_struct.h
1 
5 template<class el_type>
7 {
8  //---------- useful typedefs (to keep consistent with lilc_matrix) -----------//
9  typedef vector<int> idx_vector_type;
10  typedef vector<el_type> elt_vector_type;
11  typedef typename idx_vector_type::iterator idx_it;
12  typedef typename elt_vector_type::iterator elt_it;
13 
14  public:
15  vector<idx_it> swapk;
16  vector<idx_it> swapr;
17 
18  idx_vector_type all_swaps;
19  idx_vector_type col_k_nnzs;
20  idx_vector_type col_r_nnzs;
21 
22  elt_vector_type col_k;
23  elt_vector_type col_r;
24 
25  idx_vector_type row_k;
26  idx_vector_type row_r;
27 
30  void swap_clear() {
31  swapk.clear();
32  swapr.clear();
33  all_swaps.clear();
34  }
35 
38  void col_clear() {
39  col_k.clear();
40  col_k_nnzs.clear();
41  col_r.clear();
42  col_r_nnzs.clear();
43  }
44 
47  void row_clear() {
48  row_k.clear();
49  row_r.clear();
50  }
51 };
void col_clear()
Clears all col vectors (col_k, col_r, col_k_nnzs, col_r_nnzs).
Definition: swap_struct.h:38
void swap_clear()
Clears all swap vectors (swapk, swapr, all_swaps).
Definition: swap_struct.h:30
vector< idx_it > swapk
List of indices from row r that will be swapped to row k.
Definition: swap_struct.h:15
idx_vector_type col_k_nnzs
Row indices of non-zeros in the new column k.
Definition: swap_struct.h:19
idx_vector_type all_swaps
Column indices of all swaps done in swapk and swapr.
Definition: swap_struct.h:18
void row_clear()
Clears all row vectors (row_k, row_r).
Definition: swap_struct.h:47
vector< idx_it > swapr
List of indices from row k that will be swapped to row r.
Definition: swap_struct.h:16
idx_vector_type col_r_nnzs
Row indices of non-zeros in the new column r.
Definition: swap_struct.h:20
A structure containing variables used in pivoting a LIL-C matrix.
Definition: swap_struct.h:6
elt_vector_type col_r
Non-zero values in the new column r (order dependent on col_r_nnzs).
Definition: swap_struct.h:23
idx_vector_type row_r
Column indices of non-zeros in the new row r.
Definition: swap_struct.h:26
idx_vector_type row_k
Column indices of non-zeros in the new row k.
Definition: swap_struct.h:25
elt_vector_type col_k
Non-zero values in the new column k (order dependent on col_k_nnzs).
Definition: swap_struct.h:22