Home | History | Annotate | Download | only in OrderingMethods

Lines Matching refs:IndexType

131 template <typename IndexType>
134 IndexType start ; /* index for A of first row in this column, or DEAD */
136 IndexType length ; /* number of rows in this column */
139 IndexType thickness ; /* number of original columns represented by this */
141 IndexType parent ; /* parent in parent tree super-column structure, if */
146 IndexType score ; /* the score used to maintain heap, if col is alive */
147 IndexType order ; /* pivot ordering of this column, if col is dead */
151 IndexType headhash ; /* head of a hash bucket, if col is at the head of */
153 IndexType hash ; /* hash value, if col is not in a degree list */
154 IndexType prev ; /* previous column in degree list, if col is in a */
159 IndexType degree_next ; /* next column, if col is in a degree list */
160 IndexType hash_next ; /* next column, if col is in a hash list */
165 template <typename IndexType>
168 IndexType start ; /* index for A of first col in this row */
169 IndexType length ; /* number of principal columns in this row */
172 IndexType degree ; /* number of principal & non-principal columns in row */
173 IndexType p ; /* used as a row pointer in init_rows_cols () */
177 IndexType mark ; /* for computing set differences and marking dead rows*/
178 IndexType first_column ;/* first column in row (used in garbage collection) */
198 Explicit typecast to IndexType added Sept. 23, 2002, COLAMD version 2.2, to avoid
201 template <typename IndexType>
202 inline IndexType colamd_c(IndexType n_col)
203 { return IndexType( ((n_col) + 1) * sizeof (colamd_col<IndexType>) / sizeof (IndexType) ) ; }
205 template <typename IndexType>
206 inline IndexType colamd_r(IndexType n_row)
207 { return IndexType(((n_row) + 1) * sizeof (Colamd_Row<IndexType>) / sizeof (IndexType)); }
210 template <typename IndexType>
211 static IndexType init_rows_cols (IndexType n_row, IndexType n_col, Colamd_Row<IndexType> Row [], colamd_col<IndexType> col [], IndexType A [], IndexType p [], IndexType stats[COLAMD_STATS] );
213 template <typename IndexType>
214 static void init_scoring (IndexType n_row, IndexType n_col, Colamd_Row<IndexType> Row [], colamd_col<IndexType> Col [], IndexType A [], IndexType head [], double knobs[COLAMD_KNOBS], IndexType *p_n_row2, IndexType *p_n_col2, IndexType *p_max_deg);
216 template <typename IndexType>
217 static IndexType find_ordering (IndexType n_row, IndexType n_col, IndexType Alen, Colamd_Row<IndexType> Row [], colamd_col<IndexType> Col [], IndexType A [], IndexType head [], IndexType n_col2, IndexType max_deg, IndexType pfree);
219 template <typename IndexType>
220 static void order_children (IndexType n_col, colamd_col<IndexType> Col [], IndexType p []);
222 template <typename IndexType>
223 static void detect_super_cols (colamd_col<IndexType> Col [], IndexType A [], IndexType head [], IndexType row_start, IndexType row_length ) ;
225 template <typename IndexType>
226 static IndexType garbage_collection (IndexType n_row, IndexType n_col, Colamd_Row<IndexType> Row [], colamd_col<IndexType> Col [], IndexType A [], IndexType *pfree) ;
228 template <typename IndexType>
229 static inline IndexType clear_mark (IndexType n_row, Colamd_Row<IndexType> Row [] ) ;
256 template <typename IndexType>
257 inline IndexType colamd_recommended ( IndexType nnz, IndexType n_row, IndexType n_col)
321 template <typename IndexType>
322 static bool colamd(IndexType n_row, IndexType n_col, IndexType Alen, IndexType *A, IndexType *p, double knobs[COLAMD_KNOBS], IndexType stats[COLAMD_STATS])
326 IndexType i ; /* loop index */
327 IndexType nnz ; /* nonzeros in A */
328 IndexType Row_size ; /* size of Row [], in integers */
329 IndexType Col_size ; /* size of Col [], in integers */
330 IndexType need ; /* minimum required length of A */
331 Colamd_Row<IndexType> *Row ; /* pointer into A of Row [0..n_row] array */
332 colamd_col<IndexType> *Col ; /* pointer into A of Col [0..n_col] array */
333 IndexType n_col2 ; /* number of non-dense, non-empty columns */
334 IndexType n_row2 ; /* number of non-dense, non-empty rows */
335 IndexType ngarbage ; /* number of garbage collections performed */
336 IndexType max_deg ; /* maximum row degree */
427 Col = (colamd_col<IndexType> *) &A [Alen] ;
428 Row = (Colamd_Row<IndexType> *) &A [Alen + Col_size] ;
481 template <typename IndexType>
482 static IndexType init_rows_cols /* returns true if OK, or false otherwise */
486 IndexType n_row, /* number of rows of A */
487 IndexType n_col, /* number of columns of A */
488 Colamd_Row<IndexType> Row [], /* of size n_row+1 */
489 colamd_col<IndexType> Col [], /* of size n_col+1 */
490 IndexType A [], /* row indices of A, of size Alen */
491 IndexType p [], /* pointers to columns in A, of size n_col+1 */
492 IndexType stats [COLAMD_STATS] /* colamd statistics */
497 IndexType col ; /* a column index */
498 IndexType row ; /* a row index */
499 IndexType *cp ; /* a column pointer */
500 IndexType *cp_end ; /* a pointer to the end of a column */
501 IndexType *rp ; /* a row pointer */
502 IndexType *rp_end ; /* a pointer to the end of a row */
503 IndexType last_row ; /* previous row */
697 template <typename IndexType>
702 IndexType n_row, /* number of rows of A */
703 IndexType n_col, /* number of columns of A */
704 Colamd_Row<IndexType> Row [], /* of size n_row+1 */
705 colamd_col<IndexType> Col [], /* of size n_col+1 */
706 IndexType A [], /* column form and row form of A */
707 IndexType head [], /* of size n_col+1 */
709 IndexType *p_n_row2, /* number of non-dense, non-empty rows */
710 IndexType *p_n_col2, /* number of non-dense, non-empty columns */
711 IndexType *p_max_deg /* maximum row degree */
716 IndexType c ; /* a column index */
717 IndexType r, row ; /* a row index */
718 IndexType *cp ; /* a column pointer */
719 IndexType deg ; /* degree of a row or column */
720 IndexType *cp_end ; /* a pointer to the end of a column */
721 IndexType *new_cp ; /* new column pointer */
722 IndexType col_length ; /* length of pruned column */
723 IndexType score ; /* current column score */
724 IndexType n_col2 ; /* number of non-dense, non-empty columns */
725 IndexType n_row2 ; /* number of non-dense, non-empty rows */
726 IndexType dense_row_count ; /* remove rows with more entries than this */
727 IndexType dense_col_count ; /* remove cols with more entries than this */
728 IndexType min_score ; /* smallest column score */
729 IndexType max_deg ; /* maximum row degree */
730 IndexType next_col ; /* Used to add to degree list.*/
735 dense_row_count = numext::maxi(IndexType(0), numext::mini(IndexType(knobs [COLAMD_DENSE_ROW] * n_col), n_col)) ;
736 dense_col_count = numext::maxi(IndexType(0), numext::mini(IndexType(knobs [COLAMD_DENSE_COL] * n_row), n_row)) ;
841 col_length = (IndexType) (new_cp - &A [Col [c].start]) ;
934 template <typename IndexType>
935 static IndexType find_ordering /* return the number of garbage collections */
939 IndexType n_row, /* number of rows of A */
940 IndexType n_col, /* number of columns of A */
941 IndexType Alen, /* size of A, 2*nnz + n_col or larger */
942 Colamd_Row<IndexType> Row [], /* of size n_row+1 */
943 colamd_col<IndexType> Col [], /* of size n_col+1 */
944 IndexType A [], /* column form and row form of A */
945 IndexType
946 IndexType n_col2, /* Remaining columns to order */
947 IndexType max_deg, /* Maximum row degree */
948 IndexType pfree /* index of first free slot (2*nnz on entry) */
953 IndexType k ; /* current pivot ordering step */
954 IndexType pivot_col ; /* current pivot column */
955 IndexType *cp ; /* a column pointer */
956 IndexType *rp ; /* a row pointer */
957 IndexType pivot_row ; /* current pivot row */
958 IndexType *new_cp ; /* modified column pointer */
959 IndexType *new_rp ; /* modified row pointer */
960 IndexType pivot_row_start ; /* pointer to start of pivot row */
961 IndexType pivot_row_degree ; /* number of columns in pivot row */
962 IndexType pivot_row_length ; /* number of supercolumns in pivot row */
963 IndexType pivot_col_score ; /* score of pivot column */
964 IndexType needed_memory ; /* free space needed for pivot row */
965 IndexType *cp_end ; /* pointer to the end of a column */
966 IndexType *rp_end ; /* pointer to the end of a row */
967 IndexType row ; /* a row index */
968 IndexType col ; /* a column index */
969 IndexType max_score ; /* maximum possible score */
970 IndexType cur_score ; /* score of current column */
972 IndexType head_column ; /* head of hash bucket */
973 IndexType first_col ; /* first column in hash bucket */
974 IndexType tag_mark ; /* marker value for mark array */
975 IndexType row_mark ; /* Row [row].shared2.mark */
976 IndexType set_difference ; /* set difference size of row with pivot row */
977 IndexType min_score ; /* smallest column score */
978 IndexType col_thickness ; /* "thickness" (no. of columns in a supercol) */
979 IndexType max_mark ; /* maximum value of tag_mark */
980 IndexType pivot_col_thickness ; /* number of columns represented by pivot col */
981 IndexType prev_col ; /* Used by Dlist operations. */
982 IndexType next_col ; /* Used by Dlist operations. */
983 IndexType ngarbage ; /* number of garbage collections performed */
1273 Col [col].length = (IndexType) (new_cp - &A [Col [col].start]) ;
1321 Col [col].shared3.hash = (IndexType) hash ;
1416 Row [pivot_row].length = (IndexType) (new_rp - &A[pivot_row_start]) ;
1445 template <typename IndexType>
1450 IndexType n_col, /* number of columns of A */
1451 colamd_col<IndexType> Col [], /* of size n_col+1 */
1452 IndexType p [] /* p [0 ... n_col-1] is the column permutation*/
1457 IndexType i ; /* loop counter for all columns */
1458 IndexType c ; /* column index */
1459 IndexType parent ; /* index of column's parent */
1460 IndexType order ; /* column's order */
1546 template <typename IndexType>
1551 colamd_col<IndexType> Col [], /* of size n_col+1 */
1552 IndexType A [], /* row indices of A */
1553 IndexType head [], /* head of degree lists and hash buckets */
1554 IndexType row_start, /* pointer to set of columns to check */
1555 IndexType row_length /* number of columns to check */
1560 IndexType hash ; /* hash value for a column */
1561 IndexType *rp ; /* pointer to a row */
1562 IndexType c ; /* a column index */
1563 IndexType super_c ; /* column index of the column to absorb into */
1564 IndexType *cp1 ; /* column pointer for column super_c */
1565 IndexType *cp2 ; /* column pointer for column c */
1566 IndexType length ; /* length of column super_c */
1567 IndexType prev_c ; /* column preceding c in hash bucket */
1568 IndexType i ; /* loop counter */
1569 IndexType *rp_end ; /* pointer to the end of the row */
1570 IndexType col ; /* a column index in the row to check */
1571 IndexType head_column ; /* first column in hash bucket or degree list */
1572 IndexType first_col ; /* first column in hash bucket */
1697 template <typename IndexType>
1698 static IndexType garbage_collection /* returns the new value of pfree */
1702 IndexType n_row, /* number of rows */
1703 IndexType n_col, /* number of columns */
1704 Colamd_Row<IndexType> Row [], /* row info */
1705 colamd_col<IndexType> Col [], /* column info */
1706 IndexType A [], /* A [0 ... Alen-1] holds the matrix */
1707 IndexType *pfree /* &A [0] ... pfree is in use */
1712 IndexType *psrc ; /* source pointer */
1713 IndexType *pdest ; /* destination pointer */
1714 IndexType j ; /* counter */
1715 IndexType r ; /* a row index */
1716 IndexType c ; /* a column index */
1717 IndexType length ; /* length of a row or column */
1730 Col [c].start = (IndexType) (pdest - &A [0]) ;
1740 Col [c].length = (IndexType) (pdest - &A [Col [c].start]) ;
1787 Row [r].start = (IndexType) (pdest - &A [0]) ;
1797 Row [r].length = (IndexType) (pdest - &A [Row [r].start]) ;
1806 return ((IndexType) (pdest - &A [0])) ;
1818 template <typename IndexType>
1819 static inline IndexType clear_mark /* return the new value for tag_mark */
1823 IndexType n_row, /* number of rows in A */
1824 Colamd_Row<IndexType> Row [] /* Row [0 ... n_row-1].shared2.mark is set to zero */
1829 IndexType r ;