mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-18 03:05:57 +08:00

* 1. Remove all global include_directories. * 2. Move 3d party dependencies from src to budled deps if possible. * Unify and enforce one way of including headers: e.g. #include "libslic3r/GCode.hpp" vs #include "GCode.hpp" (always use the "libslic3r/GCode.hpp" option). * Make all dependencies (also header only) a cmake target.
55 lines
1.4 KiB
C++
55 lines
1.4 KiB
C++
#ifndef IGL_BFS_H
|
|
#define IGL_BFS_H
|
|
#include "igl_inline.h"
|
|
#include <Eigen/Core>
|
|
#include <vector>
|
|
#include <Eigen/Sparse>
|
|
namespace igl
|
|
{
|
|
// Traverse a **directed** graph represented by an adjacency list using
|
|
// breadth first search
|
|
//
|
|
// Inputs:
|
|
// A #V list of adjacency lists or #V by #V adjacency matrix
|
|
// s starting node (index into A)
|
|
// Outputs:
|
|
// D #V list of indices into rows of A in the order in which graph nodes
|
|
// are discovered.
|
|
// P #V list of indices into rows of A of predecessor in resulting
|
|
// spanning tree {-1 indicates root/not discovered), order corresponds to
|
|
// V **not** D.
|
|
template <
|
|
typename AType,
|
|
typename DerivedD,
|
|
typename DerivedP>
|
|
IGL_INLINE void bfs(
|
|
const AType & A,
|
|
const size_t s,
|
|
Eigen::PlainObjectBase<DerivedD> & D,
|
|
Eigen::PlainObjectBase<DerivedP> & P);
|
|
|
|
template <
|
|
typename AType,
|
|
typename DType,
|
|
typename PType>
|
|
IGL_INLINE void bfs(
|
|
const std::vector<std::vector<AType> > & A,
|
|
const size_t s,
|
|
std::vector<DType> & D,
|
|
std::vector<PType> & P);
|
|
template <
|
|
typename AType,
|
|
typename DType,
|
|
typename PType>
|
|
IGL_INLINE void bfs(
|
|
const Eigen::SparseMatrix<AType> & A,
|
|
const size_t s,
|
|
std::vector<DType> & D,
|
|
std::vector<PType> & P);
|
|
}
|
|
#ifndef IGL_STATIC_LIBRARY
|
|
# include "bfs.cpp"
|
|
#endif
|
|
#endif
|
|
|