Go to the documentation of this file.
14 #define StiffArrayConstr_D 0
15 #define StiffArrayDestr_D 0
28 template<u
int dim,
class F>
54 F* d =
data_;
const H* e = (
const H*)a;
55 for(uint i = dim; i--;) *d++ = fnc(*e++);
65 F* d =
data_;
const H* e = (
const H*)a;
66 for(uint i = dim; i--;) *d++ = fnc(*e++);
83 operator const F*()
const {
return data_; }
97 "i = " << i <<
", dim = " << dim);
103 "i = " << i <<
", dim = " << dim);
109 F* d =
data_;
for(uint i = dim; i--;) *d++ *= n;
114 F* d =
data_;
for(uint i = dim; i--;) *d++ /= n;
119 F* d =
data_;
for(uint i = dim; i--;) *d++ = n;
124 F* d =
data_;
for(uint i = dim; i--;) *d++ += n;
129 F* d =
data_;
for(uint i = dim; i--;) *d++ -= n;
134 F* d =
data_;
const F* e = (
const F*)a;
135 for(uint i = dim; i--;) *d++ *= *e++;
141 F* d =
data_;
for(uint i = dim; i--;) *d = fnc(*d++);
145 virtual std::ostream&
info(std::ostream& os)
const;
151 template<u
int dim,
class F>
155 for (uint i = dim; i--;)
156 os << *d++ << ((i == 0) ?
"" :
", ");
198 operator F()
const {
return data_; }
213 data_ *= n;
return *
this;
217 data_ /= n;
return *
this;
221 data_ = n;
return *
this;
225 data_ += n;
return *
this;
229 data_ -= n;
return *
this;
237 virtual std::ostream&
info(std::ostream& os)
const;
264 #endif // stiffArray_hh
uint size() const
Returns the requested size of the array.
StiffArray< 1, F > & operator+=(const F n)
Addition operator.
#define conceptsException(exc)
Prepares an exception for throwing.
StiffArray(const StiffArray< 1, F > &a)
Copy constructor.
StiffArray< 1, F > & apply(F &fnc(F &))
Application operator to each component, e.g.
#define conceptsAssert(cond, exc)
Assert that a certain condition is fulfilled.
An array of objects of fix length, defined by template parameter dim.
StiffArray(const F &dft)
Constructor.
#define StiffArrayDestr_D
void zeros()
Fills the memory with zeros.
#define DEBUGL(doit, msg)
const F * data() const
Returns a pointer to the data in the array.
StiffArray< dim, F > & apply(F &fnc(F &))
Application operator to each component, e.g.
StiffArray< dim, F > & operator*=(const F n)
Scaling operator.
F * data()
Returns a pointer to the data in the array.
Exception class for assertions.
StiffArray(const StiffArray< 1, H > &a, F fnc(const H &))
Constructor.
StiffArray(const Array< F > &dft)
Constructor.
StiffArray< dim, F > & operator/=(const F n)
Division operator.
StiffArray(const StiffArray< dim, F > &a)
Copy constructor.
StiffArray(const StiffArray< dim, H > &a, F fnc(const H &))
Constructor.
const F & operator[](const int i) const
Index operator.
StiffArray< dim, F > & operator*=(const StiffArray< dim, F > &a)
Multiplication operator.
StiffArray(const StiffArray< dim, H > &a, const F &fnc(const H &))
Constructor.
void memorycpy(F *dest, const G *src, size_t n)
Copies n entries from src to dest (faster than std::memcpy)
void zeros()
Fills the memory with zeros.
Exception class to express a missing feature.
StiffArray< dim, F > & operator+=(const F n)
Addition operator.
StiffArray< 1, F > & operator*=(const F n)
Scaling operator.
StiffArray< 1, F > & operator/=(const F n)
Division operator.
#define conceptsAssert3(cond, exc, msg)
Assert that a certain condition is fulfilled.
std::string typeOf(const T &t)
Return the typeid name of a class object.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
StiffArray< 1, F > & operator-=(const F n)
Subtraction operator.
Array< F > array_data() const
StiffArray(const Array< F > &dft)
Constructor.
Class providing an output operator.
StiffArray< 1, F > & operator=(const F n)
Assignement operator.
StiffArray(const F &dft)
Constructor.
StiffArray< dim, F > & operator-=(const F n)
Subtraction operator.
Basic namespace for Concepts-2.
StiffArray< dim, F > & operator=(const F n)
Assignement operator.