MCPcopy Create free account
hub / github.com/PX4/eigen / etree_find

Function etree_find

Eigen/src/SparseCore/SparseColEtree.h:40–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38/** Find the root of the tree/set containing the vertex i : Use Path halving */
39template<typename Index, typename IndexVector>
40Index etree_find (Index i, IndexVector& pp)
41{
42 Index p = pp(i); // Parent
43 Index gp = pp(p); // Grand parent
44 while (gp != p)
45 {
46 pp(i) = gp; // Parent pointer on find path is changed to former grand parent
47 i = gp;
48 p = pp(i);
49 gp = pp(p);
50 }
51 return p;
52}
53
54/** Compute the column elimination tree of a sparse matrix
55 * \param mat The matrix in column-major format.

Callers 1

coletreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected