1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #ifndef UPDATE_ENGINE_PAYLOAD_GENERATOR_TARJAN_H_
- #define UPDATE_ENGINE_PAYLOAD_GENERATOR_TARJAN_H_
- #include <vector>
- #include "update_engine/payload_generator/graph_types.h"
- namespace chromeos_update_engine {
- class TarjanAlgorithm {
- public:
- TarjanAlgorithm() : index_(0), required_vertex_(0) {}
-
- void Execute(Vertex::Index vertex,
- Graph* graph,
- std::vector<Vertex::Index>* out);
- private:
- void Tarjan(Vertex::Index vertex, Graph* graph);
- Vertex::Index index_;
- Vertex::Index required_vertex_;
- std::vector<Vertex::Index> stack_;
- std::vector<std::vector<Vertex::Index>> components_;
- };
- }
- #endif
|