19 template <
class dataType>
23#ifndef TTK_ENABLE_KAMIKAZE
28 const dataType *inputData
29 =
reinterpret_cast<const dataType *
>(voidPointer);
36#ifdef TTK_ENABLE_OPENMP
37#pragma omp parallel for num_threads(threadNumber_)
39 for(
size_t i = 0; i < numberOfVertices; i++) {
44#ifdef TTK_ENABLE_OPENMP
45#pragma omp parallel for num_threads(threadNumber_)
47 for(
size_t i = 0; i < numberOfVertices; i++) {
61 std::pair<dataType, dataType>
getRange()
const {
113 template <
class dataType>
115#ifndef TTK_ENABLE_KAMIKAZE
131 for(
size_t i = 0; i < static_cast<size_t>(
numberOfBins_); i++) {
157 std::vector<double> &histogram)
const;
169 inline void setRange(
const double min,
const double max) {
191 template <
class dataType>
287template <
class dataType>
293#ifndef TTK_ENABLE_KAMIKAZE
314 dataType **inputData = (dataType **)
inputData_.data();
317#ifdef TTK_ENABLE_OPENMP
318#pragma omp parallel for num_threads(threadNumber_)
328 outputLowerBoundField[v] = inputData[0][v];
333 if(inputData[inp][v] < outputLowerBoundField[v])
334 outputLowerBoundField[v] = inputData[inp][v];
341 outputUpperBoundField[v] = inputData[0][v];
346 if(inputData[inp][v] > outputUpperBoundField[v])
347 outputUpperBoundField[v] = inputData[inp][v];
353#ifdef TTK_ENABLE_OPENMP
371 range[0] = outputLowerBoundField[0];
372 range[1] = outputUpperBoundField[0];
375 if(outputLowerBoundField[v] < range[0])
376 range[0] = outputLowerBoundField[v];
377 if(outputUpperBoundField[v] > range[1])
378 range[1] = outputUpperBoundField[v];
382 double const dx = (range[1] - range[0]) / (
double)
BinCount;
386 binValues_[b] = range[0] + (dx / 2.0) + (
double)b * dx;
391#ifdef TTK_ENABLE_OPENMP
392#pragma omp parallel for private(idx) num_threads(threadNumber_)
396 idx = (int)floor((inputData[i][v] - range[0]) *
BinCount
397 / (range[1] - range[0]));
408 sum +=
static_cast<double>(inputData[i][v]);
413 this->
printMsg(std::vector<std::vector<std::string>>{
416 "Data-set processed", 1.0, t.
getElapsedTime(), this->threadNumber_);
Minimalist debugging class.
std::vector< dataType > lowerBound_
void setNumberOfVertices(const SimplexId number)
SimplexId numberOfVertices_
dataType getRangeMax() const
dataType * getUpperBoundPointer()
std::vector< dataType > upperBound_
dataType * getLowerBoundPointer()
int evaluateRealization(const void *voidPointer)
dataType getRangeMin() const
std::pair< dataType, dataType > getRange() const
void getVertexHistogram(const SimplexId vertexId, std::vector< double > &histogram) const
void setNumberOfVertices(const SimplexId number)
std::vector< double > binValue_
int evaluateRealization(const dataType *inputData)
void setRange(const double min, const double max)
double * getBinFieldPointer(const int binId)
SimplexId numberOfVertices_
std::vector< std::vector< double > > probability_
void setNumberOfBins(const int number)
TTK processing package that takes an input ensemble data set (represented by a list of scalar fields)...
std::vector< double * > outputProbability_
void setOutputLowerBoundField(void *const data)
void * outputLowerBoundField_
void setOutputMeanField(void *const data)
void setVertexNumber(const SimplexId &vertexNumber)
int setInputDataPointer(const int idx, void *const data)
void setComputeUpperBound(const bool state)
void setBinCount(const int binCount)
void setOutputUpperBoundField(void *const data)
void setOutputProbability(const int idx, double *const data)
void setNumberOfInputs(const int numberOfInputs)
void setComputeLowerBound(const bool state)
double getBinValue(int b)
std::vector< double > binValues_
std::vector< void * > inputData_
void * outputUpperBoundField_
virtual int updateProgress(const float &progress)=0
virtual bool needsToAbort()=0
int SimplexId
Identifier type for simplices of any dimension.
printMsg(debug::output::BOLD+" | | | | | . \\ | | (__| | / __/| |_| / __/|__ _|"+debug::output::ENDCOLOR, debug::Priority::PERFORMANCE, debug::LineMode::NEW, stream)