48 throw std::logic_error(
"You cannot push back integer values in a Continuous Property.");
59 DLL_IMPORT_OR_EXPORT
virtual gsoap_resqml2_0_1::resqml20__ResqmlUom
getUom()
const = 0;
89 double minimumValue,
double maximumValue, EML2_NS::AbstractHdfProxy* proxy =
nullptr);
90 using AbstractValuesProperty::pushBackDoubleHdf5Array1dOfValues;
117 double minimumValue,
double maximumValue, EML2_NS::AbstractHdfProxy* proxy =
nullptr);
118 using AbstractValuesProperty::pushBackDoubleHdf5Array2dOfValues;
146 DLL_IMPORT_OR_EXPORT
void pushBackDoubleHdf5Array3dOfValues(
const double * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim,
147 double minimumValue,
double maximumValue, EML2_NS::AbstractHdfProxy* proxy =
nullptr);
148 using AbstractValuesProperty::pushBackDoubleHdf5Array3dOfValues;
178 double * minimumValue,
double * maximumValue, EML2_NS::AbstractHdfProxy* proxy =
nullptr);
179 using AbstractValuesProperty::pushBackDoubleHdf5ArrayOfValues;
187 float minimumValue,
float maximumValue, EML2_NS::AbstractHdfProxy* proxy =
nullptr);
188 using AbstractValuesProperty::pushBackFloatHdf5Array1dOfValues;
196 float minimumValue,
float maximumValue, EML2_NS::AbstractHdfProxy* proxy =
nullptr);
197 using AbstractValuesProperty::pushBackFloatHdf5Array2dOfValues;
204 DLL_IMPORT_OR_EXPORT
void pushBackFloatHdf5Array3dOfValues(
const float * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim,
205 float minimumValue,
float maximumValue, EML2_NS::AbstractHdfProxy* proxy =
nullptr);
206 using AbstractValuesProperty::pushBackFloatHdf5Array3dOfValues;
217 float * minimumValue,
float * maximumValue, EML2_NS::AbstractHdfProxy* proxy =
nullptr);
218 using AbstractValuesProperty::pushBackFloatHdf5ArrayOfValues;
233 DLL_IMPORT_OR_EXPORT
virtual double getMinimumValue(
unsigned int index = 0)
const = 0;
248 DLL_IMPORT_OR_EXPORT
virtual double getMaximumValue(
unsigned int index = 0)
const = 0;
259 DLL_IMPORT_OR_EXPORT
virtual void setMinimumValue(
double value,
unsigned int index = 0)
const = 0;
270 DLL_IMPORT_OR_EXPORT
virtual void setMaximumValue(
double value,
unsigned int index = 0)
const = 0;
300 COMMON_NS::AbstractObject::numericalDatatypeEnum datatype,
301 uint64_t
const * numValues,
302 unsigned int numArrayDimensions,
303 double * minimumValue,
double * maximumValue,
304 EML2_NS::AbstractHdfProxy* proxy =
nullptr
306 using AbstractValuesProperty::pushBackHdf5ArrayOfValues;
330 COMMON_NS::AbstractObject::numericalDatatypeEnum datatype,
332 double minimumValue,
double maximumValue,
333 EML2_NS::AbstractHdfProxy* proxy =
nullptr
335 using AbstractValuesProperty::pushBackHdf5Array1dOfValues;
362 COMMON_NS::AbstractObject::numericalDatatypeEnum datatype,
363 uint64_t valueCountInFastestDim,
364 uint64_t valueCountInMiddleDim,
365 double minimumValue,
double maximumValue,
366 EML2_NS::AbstractHdfProxy* proxy =
nullptr
368 using AbstractValuesProperty::pushBackHdf5Array2dOfValues;
397 COMMON_NS::AbstractObject::numericalDatatypeEnum datatype,
398 uint64_t valueCountInFastestDim,
399 uint64_t valueCountInMiddleDim,
400 uint64_t valueCountInSlowestDim,
401 double minimumValue,
double maximumValue,
402 EML2_NS::AbstractHdfProxy* proxy =
nullptr
404 using AbstractValuesProperty::pushBackHdf5Array3dOfValues;
446 float const * values,
447 uint64_t valueCountInFastestDim,
448 uint64_t valueCountInMiddleDim,
449 uint64_t valueCountInSlowestDim,
450 uint64_t offsetInFastestDim,
451 uint64_t offsetInMiddleDim,
452 uint64_t offsetInSlowestDim,
454 EML2_NS::AbstractHdfProxy* proxy =
nullptr,
455 uint64_t patchIndex = (std::numeric_limits<uint64_t>::max)()
457 using AbstractValuesProperty::setValuesOfFloatHdf5Array3dOfValues;
458 DLL_IMPORT_OR_EXPORT
void setValuesOfDoubleHdf5Array3dOfValues(
459 double const * values,
460 uint64_t valueCountInFastestDim,
461 uint64_t valueCountInMiddleDim,
462 uint64_t valueCountInSlowestDim,
463 uint64_t offsetInFastestDim,
464 uint64_t offsetInMiddleDim,
465 uint64_t offsetInSlowestDim,
467 EML2_NS::AbstractHdfProxy* proxy =
nullptr,
468 uint64_t patchIndex = (std::numeric_limits<uint64_t>::max)()
470 using AbstractValuesProperty::setValuesOfDoubleHdf5Array3dOfValues;
506 float const * values,
507 uint64_t
const * numValues,
508 uint64_t
const * offsetValues,
509 unsigned int numArrayDimensions,
511 EML2_NS::AbstractHdfProxy* proxy =
nullptr,
512 uint64_t patchIndex = (std::numeric_limits<uint64_t>::max)()
514 using AbstractValuesProperty::setValuesOfFloatHdf5ArrayOfValues;
516 DLL_IMPORT_OR_EXPORT
void setValuesOfDoubleHdf5ArrayOfValues(
517 double const * values,
518 uint64_t
const * numValues,
519 uint64_t
const * offsetValues,
520 unsigned int numArrayDimensions,
522 EML2_NS::AbstractHdfProxy* proxy =
nullptr,
523 uint64_t patchIndex = (std::numeric_limits<uint64_t>::max)()
525 using AbstractValuesProperty::setValuesOfDoubleHdf5ArrayOfValues;
528 DLL_IMPORT_OR_EXPORT
static const char*
XML_TAG;
530 DLL_IMPORT_OR_EXPORT
virtual std::string getXmlTag() const final {
return XML_TAG; }
542 ContinuousProperty() {}
549 ContinuousProperty(gsoap_resqml2_0_1::_resqml20__ContinuousProperty* fromGsoap) : AbstractValuesProperty(fromGsoap) {}
556 ContinuousProperty(gsoap_eml2_3::_resqml22__ContinuousProperty* fromGsoap) : AbstractValuesProperty(fromGsoap) {}
558 virtual size_t getMinimumValueSize()
const = 0;
559 virtual size_t getMaximumValueSize()
const = 0;
580 void setPropertyMinMax(
582 uint64_t
const * numValuesInEachDimension,
583 unsigned int numArrayDimensions,
584 T * minimumValue =
nullptr, T * maximumValue =
nullptr)
586 const unsigned int elementCount = getElementCountPerValue();
589 if (minimumValue !=
nullptr) {
590 for (
unsigned int propIndex = 0; propIndex < elementCount; ++propIndex) {
591 setMinimumValue(getMinimumValueSize() > propIndex ? fmin(getMinimumValue(propIndex), minimumValue[propIndex]) : minimumValue[propIndex], propIndex);
594 if (maximumValue !=
nullptr) {
595 for (
unsigned int propIndex = 0; propIndex < elementCount; ++propIndex) {
596 setMaximumValue(getMaximumValueSize() > propIndex ? fmax(getMaximumValue(propIndex), maximumValue[propIndex]) : maximumValue[propIndex], propIndex);
599 if (minimumValue !=
nullptr && maximumValue !=
nullptr)
return;
601 uint64_t nValues = numValuesInEachDimension[0];
603 for (
unsigned int dim = 1; dim < (elementCount == 1 ? numArrayDimensions : numArrayDimensions - 1); ++dim) {
604 nValues *= numValuesInEachDimension[dim];
608 std::unique_ptr<T[]> allComputedMin(
new T[elementCount]);
609 std::unique_ptr<T[]> allComputedMax(
new T[elementCount]);
610 for (
size_t propIndex = 0; propIndex < elementCount; ++propIndex) {
611 allComputedMin[propIndex] = std::numeric_limits<T>::quiet_NaN();
612 allComputedMax[propIndex] = std::numeric_limits<T>::quiet_NaN();
613 for (
size_t i = 0; i < nValues; i += elementCount) {
614 allComputedMin[propIndex] = fmin(allComputedMin[propIndex], values[i]);
615 allComputedMax[propIndex] = fmax(allComputedMax[propIndex], values[i]);
618 setPropertyMinMax(values, numValuesInEachDimension, numArrayDimensions, allComputedMin.get(), allComputedMax.get());