Home | History | Annotate | Download | only in OrderingMethods

Lines Matching refs:Index

138 template <typename Index>
141 Index start ; /* index for A of first row in this column, or DEAD */
143 Index length ; /* number of rows in this column */
146 Index thickness ; /* number of original columns represented by this */
148 Index parent ; /* parent in parent tree super-column structure, if */
153 Index score ; /* the score used to maintain heap, if col is alive */
154 Index order ; /* pivot ordering of this column, if col is dead */
158 Index headhash ; /* head of a hash bucket, if col is at the head of */
160 Index hash ; /* hash value, if col is not in a degree list */
161 Index prev ; /* previous column in degree list, if col is in a */
166 Index degree_next ; /* next column, if col is in a degree list */
167 Index hash_next ; /* next column, if col is in a hash list */
172 template <typename Index>
175 Index start ; /* index for A of first col in this row */
176 Index length ; /* number of principal columns in this row */
179 Index degree ; /* number of principal & non-principal columns in row */
180 Index p ; /* used as a row pointer in init_rows_cols () */
184 Index mark ; /* for computing set differences and marking dead rows*/
185 Index first_column ;/* first column in row (used in garbage collection) */
205 Explicit typecast to Index added Sept. 23, 2002, COLAMD version 2.2, to avoid
208 template <typename Index>
209 inline Index colamd_c(Index n_col)
210 { return Index( ((n_col) + 1) * sizeof (colamd_col<Index>) / sizeof (Index) ) ; }
212 template <typename Index>
213 inline Index colamd_r(Index n_row)
214 { return Index(((n_row) + 1) * sizeof (Colamd_Row<Index>) / sizeof (Index)); }
217 template <typename Index>
218 static Index init_rows_cols (Index n_row, Index n_col, Colamd_Row<Index> Row [], colamd_col<Index> col [], Index A [], Index p [], Index stats[COLAMD_STATS] );
220 template <typename Index>
221 static void init_scoring (Index n_row, Index n_col, Colamd_Row<Index> Row [], colamd_col<Index> Col [], Index A [], Index head [], double knobs[COLAMD_KNOBS], Index *p_n_row2, Index *p_n_col2, Index *p_max_deg);
223 template <typename Index>
224 static Index find_ordering (Index n_row, Index n_col, Index Alen, Colamd_Row<Index> Row [], colamd_col<Index> Col [], Index A [], Index head [], Index n_col2, Index max_deg, Index pfree);
226 template <typename Index>
227 static void order_children (Index n_col, colamd_col<Index> Col [], Index p []);
229 template <typename Index>
230 static void detect_super_cols (colamd_col<Index> Col [], Index A [], Index head [], Index row_start, Index row_length ) ;
232 template <typename Index>
233 static Index garbage_collection (Index n_row, Index n_col, Colamd_Row<Index> Row [], colamd_col<Index> Col [], Index A [], Index *pfree) ;
235 template <typename Index>
236 static inline Index clear_mark (Index n_row, Colamd_Row<Index> Row [] ) ;
263 template <typename Index>
264 inline Index colamd_recommended ( Index nnz, Index n_row, Index n_col)
328 template <typename Index>
329 static bool colamd(Index n_row, Index n_col, Index Alen, Index *A, Index *p, double knobs[COLAMD_KNOBS], Index stats[COLAMD_STATS])
333 Index i ; /* loop index */
334 Index nnz ; /* nonzeros in A */
335 Index Row_size ; /* size of Row [], in integers */
336 Index Col_size ; /* size of Col [], in integers */
337 Index need ; /* minimum required length of A */
338 Colamd_Row<Index> *Row ; /* pointer into A of Row [0..n_row] array */
339 colamd_col<Index> *Col ; /* pointer into A of Col [0..n_col] array */
340 Index n_col2 ; /* number of non-dense, non-empty columns */
341 Index n_row2 ; /* number of non-dense, non-empty rows */
342 Index ngarbage ; /* number of garbage collections performed */
343 Index max_deg ; /* maximum row degree */
434 Col = (colamd_col<Index> *) &A [Alen] ;
435 Row = (Colamd_Row<Index> *) &A [Alen + Col_size] ;
488 template <typename Index>
489 static Index init_rows_cols /* returns true if OK, or false otherwise */
493 Index n_row, /* number of rows of A */
494 Index n_col, /* number of columns of A */
495 Colamd_Row<Index> Row [], /* of size n_row+1 */
496 colamd_col<Index> Col [], /* of size n_col+1 */
497 Index A [], /* row indices of A, of size Alen */
498 Index p [], /* pointers to columns in A, of size n_col+1 */
499 Index stats [COLAMD_STATS] /* colamd statistics */
504 Index col ; /* a column index */
505 Index row ; /* a row index */
506 Index *cp ; /* a column pointer */
507 Index *cp_end ; /* a pointer to the end of a column */
508 Index *rp ; /* a row pointer */
509 Index *rp_end ; /* a pointer to the end of a row */
510 Index last_row ; /* previous row */
571 /* row index are unsorted or repeated (or both), thus col */
704 template <typename Index>
709 Index n_row, /* number of rows of A */
710 Index n_col, /* number of columns of A */
711 Colamd_Row<Index> Row [], /* of size n_row+1 */
712 colamd_col<Index> Col [], /* of size n_col+1 */
713 Index A [], /* column form and row form of A */
714 Index head [], /* of size n_col+1 */
716 Index *p_n_row2, /* number of non-dense, non-empty rows */
717 Index *p_n_col2, /* number of non-dense, non-empty columns */
718 Index *p_max_deg /* maximum row degree */
723 Index c ; /* a column index */
724 Index r, row ; /* a row index */
725 Index *cp ; /* a column pointer */
726 Index deg ; /* degree of a row or column */
727 Index *cp_end ; /* a pointer to the end of a column */
728 Index *new_cp ; /* new column pointer */
729 Index col_length ; /* length of pruned column */
730 Index score ; /* current column score */
731 Index n_col2 ; /* number of non-dense, non-empty columns */
732 Index n_row2 ; /* number of non-dense, non-empty rows */
733 Index dense_row_count ; /* remove rows with more entries than this */
734 Index dense_col_count ; /* remove cols with more entries than this */
735 Index min_score ; /* smallest column score */
736 Index max_deg ; /* maximum row degree */
737 Index next_col ; /* Used to add to degree list.*/
848 col_length = (Index) (new_cp - &A [Col [c].start]) ;
941 template <typename Index>
942 static Index find_ordering /* return the number of garbage collections */
946 Index n_row, /* number of rows of A */
947 Index n_col, /* number of columns of A */
948 Index Alen, /* size of A, 2*nnz + n_col or larger */
949 Colamd_Row<Index> Row [], /* of size n_row+1 */
950 colamd_col<Index> Col [], /* of size n_col+1 */
951 Index A [], /* column form and row form of A */
952 Index head [], /* of size n_col+1 */
953 Index n_col2, /* Remaining columns to order */
954 Index max_deg, /* Maximum row degree */
955 Index pfree /* index of first free slot (2*nnz on entry) */
960 Index
961 Index pivot_col ; /* current pivot column */
962 Index *cp ; /* a column pointer */
963 Index *rp ; /* a row pointer */
964 Index pivot_row ; /* current pivot row */
965 Index *new_cp ; /* modified column pointer */
966 Index *new_rp ; /* modified row pointer */
967 Index pivot_row_start ; /* pointer to start of pivot row */
968 Index pivot_row_degree ; /* number of columns in pivot row */
969 Index pivot_row_length ; /* number of supercolumns in pivot row */
970 Index pivot_col_score ; /* score of pivot column */
971 Index needed_memory ; /* free space needed for pivot row */
972 Index *cp_end ; /* pointer to the end of a column */
973 Index *rp_end ; /* pointer to the end of a row */
974 Index row ; /* a row index */
975 Index col ; /* a column index */
976 Index max_score ; /* maximum possible score */
977 Index cur_score ; /* score of current column */
979 Index head_column ; /* head of hash bucket */
980 Index first_col ; /* first column in hash bucket */
981 Index tag_mark ; /* marker value for mark array */
982 Index row_mark ; /* Row [row].shared2.mark */
983 Index set_difference ; /* set difference size of row with pivot row */
984 Index min_score ; /* smallest column score */
985 Index col_thickness ; /* "thickness" (no. of columns in a supercol) */
986 Index max_mark ; /* maximum value of tag_mark */
987 Index pivot_col_thickness ; /* number of columns represented by pivot col */
988 Index prev_col ; /* Used by Dlist operations. */
989 Index next_col ; /* Used by Dlist operations. */
990 Index ngarbage ; /* number of garbage collections performed */
1118 /* === Select a row index to use as the new pivot row =============== */
1280 Col [col].length = (Index) (new_cp - &A [Col [col].start]) ;
1328 Col [col].shared3.hash = (Index) hash ;
1423 Row [pivot_row].length = (Index) (new_rp - &A[pivot_row_start]) ;
1452 template <typename Index>
1457 Index n_col, /* number of columns of A */
1458 colamd_col<Index> Col [], /* of size n_col+1 */
1459 Index p [] /* p [0 ... n_col-1] is the column permutation*/
1464 Index i ; /* loop counter for all columns */
1465 Index c ; /* column index */
1466 Index parent ; /* index of column's parent */
1467 Index order ; /* column's order */
1553 template <typename Index>
1558 colamd_col<Index> Col [], /* of size n_col+1 */
1559 Index A [], /* row indices of A */
1560 Index head [], /* head of degree lists and hash buckets */
1561 Index row_start, /* pointer to set of columns to check */
1562 Index row_length /* number of columns to check */
1567 Index hash ; /* hash value for a column */
1568 Index *rp ; /* pointer to a row */
1569 Index c ; /* a column index */
1570 Index super_c ; /* column index of the column to absorb into */
1571 Index *cp1 ; /* column pointer for column super_c */
1572 Index *cp2 ; /* column pointer for column c */
1573 Index length ; /* length of column super_c */
1574 Index prev_c ; /* column preceding c in hash bucket */
1575 Index i ; /* loop counter */
1576 Index *rp_end ; /* pointer to the end of the row */
1577 Index col ; /* a column index in the row to check */
1578 Index head_column ; /* first column in hash bucket or degree list */
1579 Index first_col ; /* first column in hash bucket */
1699 the index of the first free position in A, after garbage collection. The
1704 template <typename Index>
1705 static Index garbage_collection /* returns the new value of pfree */
1709 Index n_row, /* number of rows */
1710 Index n_col, /* number of columns */
1711 Colamd_Row<Index> Row [], /* row info */
1712 colamd_col<Index> Col [], /* column info */
1713 Index A [], /* A [0 ... Alen-1] holds the matrix */
1714 Index *pfree /* &A [0] ... pfree is in use */
1719 Index *psrc ; /* source pointer */
1720 Index *pdest ; /* destination pointer */
1721 Index j ; /* counter */
1722 Index r ; /* a row index */
1723 Index c ; /* a column index */
1724 Index length ; /* length of a row or column */
1737 Col [c].start = (Index) (pdest - &A [0]) ;
1747 Col [c].length = (Index) (pdest - &A [Col [c].start]) ;
1765 /* save first column index in Row [r].shared2.first_column */
1785 /* get the row index */
1788 /* restore first column index */
1794 Row [r].start = (Index) (pdest - &A [0]) ;
1804 Row [r].length = (Index) (pdest - &A [Row [r].start]) ;
1813 return ((Index) (pdest - &A [0])) ;
1825 template <typename Index>
1826 static inline Index clear_mark /* return the new value for tag_mark */
1830 Index n_row, /* number of rows in A */
1831 Colamd_Row<Index> Row [] /* Row [0 ... n_row-1].shared2.mark is set to zero */
1836 Index r ;