36 template <
typename dataType>
39 template <
typename dataType,
41 int execute(
const triangulationType *)
const;
81template <
typename dataType,
class triangulationType>
92 std::fill(dist, dist +
vertexNumber_, std::numeric_limits<dataType>::max());
96 std::set<SimplexId> isSource;
98 isSource.insert(identifiers[k]);
99 std::vector<SimplexId> sources(isSource.begin(), isSource.end());
103 std::vector<std::vector<dataType>> scalars(sources.size());
107#ifdef TTK_ENABLE_OPENMP
108#pragma omp parallel for num_threads(threadNumber_)
110 for(
size_t i = 0; i < sources.size(); ++i) {
111 int const ret = Dijkstra::shortestPath<dataType>(
112 sources[i], *triangulation_, scalars[i]);
115 "Algorithm not successful (error code: " + std::to_string(ret) +
").");
119#ifdef TTK_ENABLE_OPENMP
120#pragma omp parallel for num_threads(threadNumber_)
123 for(
size_t i = 0; i < sources.size(); ++i) {
124 if(i == 0 or dist[k] > scalars[i][k]) {
125 dist[k] = scalars[i][k];
126 origin[k] = sources[i];
133 "Complete", 1.0, globalTimer.
getElapsedTime(), this->threadNumber_);
AbstractTriangulation is an interface class that defines an interface for efficient traversal methods...
virtual int preconditionVertexNeighbors()
Minimalist debugging class.
int printErr(const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
TTK processing package for distance field computation on PL manifolds.
void setOutputIdentifiers(void *data)
void * outputIdentifiers_
void * outputScalarFieldPointer_
void setVertexNumber(SimplexId vertexNumber)
void setVertexIdentifierScalarFieldPointer(SimplexId *const data)
void setOutputScalarFieldPointer(void *data)
int execute(const triangulationType *) const
SimplexId * vertexIdentifierScalarFieldPointer_
void * outputSegmentation_
void setOutputSegmentation(void *data)
int preconditionTriangulation(AbstractTriangulation *triangulation)
void setSourceNumber(SimplexId sourceNumber)
dataType getDistance(const SimplexId a, const SimplexId b) const
int SimplexId
Identifier type for simplices of any dimension.
printMsg(debug::output::BOLD+" | | | | | . \\ | | (__| | / __/| |_| / __/|__ _|"+debug::output::ENDCOLOR, debug::Priority::PERFORMANCE, debug::LineMode::NEW, stream)