31#ifndef SPARSE_COLETREE_H
32#define SPARSE_COLETREE_H
39template<
typename Index,
typename IndexVector>
60template <
typename MatrixType,
typename IndexVector>
63 typedef typename MatrixType::StorageIndex StorageIndex;
66 StorageIndex diagSize = (std::min)(nc,
m);
71 parent.resize(
mat.cols());
75 firstRowElt.segment(0, diagSize).setLinSpaced(diagSize, 0, diagSize-1);
77 for (StorageIndex
col = 0;
col < nc;
col++)
81 for (
typename MatrixType::InnerIterator
it(
mat,
pcol);
it; ++
it)
92 for (StorageIndex
col = 0;
col < nc;
col++)
106 if(
it)
i =
it.index();
129template <
typename IndexVector>
132 typedef typename IndexVector::Scalar StorageIndex;
177template <
typename IndexVector>
180 typedef typename IndexVector::Scalar StorageIndex;
190 for (StorageIndex
v =
n-1;
v >= 0;
v--)
192 StorageIndex
dad = parent(
v);
Matrix3f m
Definition AngleAxis_mimic_euler.cpp:1
Array< int, Dynamic, 1 > v
Definition Array_initializer_list_vector_cxx11.cpp:1
int n
Definition BiCGSTAB_simple.cpp:1
int i
Definition BiCGSTAB_step_by_step.cpp:9
MatrixXf mat
Definition Tutorial_AdvancedInitialization_CommaTemporary.cpp:1
float * p
Definition Tutorial_Map_using.cpp:9
MatrixXf MatrixType
Definition benchmark-blocking-sizes.cpp:52
int coletree(const MatrixType &mat, IndexVector &parent, IndexVector &firstRowElt, typename MatrixType::StorageIndex *perm=0)
Definition SparseColEtree.h:61
EIGEN_CONSTEXPR Index first(const T &x) EIGEN_NOEXCEPT
Definition IndexedViewHelper.h:81
void treePostorder(typename IndexVector::Scalar n, IndexVector &parent, IndexVector &post)
Post order a tree.
Definition SparseColEtree.h:178
void nr_etdfs(typename IndexVector::Scalar n, IndexVector &parent, IndexVector &first_kid, IndexVector &next_kid, IndexVector &post, typename IndexVector::Scalar postnum)
Definition SparseColEtree.h:130
Index etree_find(Index i, IndexVector &pp)
Definition SparseColEtree.h:40
Namespace containing all symbols from the Eigen library.
Definition bench_norm.cpp:85
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
Definition BandTriangularSolver.h:13
Definition ForwardDeclarations.h:17