1#ifndef PSCF_AM_ITERATOR_DARRAY_TPP
2#define PSCF_AM_ITERATOR_DARRAY_TPP
11#include "NanException.h"
22 template <
typename Iterator>
30 template <
typename Iterator>
38 for (
int i = 0; i < n; i++) {
40 if (std::isnan(a[i]) || std::isnan(b[i])) {
41 throw NanException(
"AmIteratorDArray<Iterator>::dotProduct",
52 template <
typename Iterator>
53 double AmIteratorDArray<Iterator>::maxAbs(
DArray<double> const & a)
58 for (
int i = 0; i < n; i++) {
60 if (std::isnan(value)) {
61 throw NanException(
"AmIteratorDArray<Iterator>::dotProduct",
64 if (fabs(value) > max)
73 template <
typename Iterator>
81 for (
int i = 0; i < n; i++) {
89 template <
typename Iterator>
96 for (
int i = 0; i < n; i++) {
Exception thrown when not-a-number (NaN) is encountered.
int capacity() const
Return allocated size.
Dynamically allocatable contiguous array template.
File containing preprocessor macros for error handling.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
double max(Array< double > const &in)
Get maximum of array elements .
PSCF package top-level namespace.
float product(float a, float b)
Product for float Data.