|
NABLA
Nabla Ain't Basic Linear Algebra
|
The type of elements – value_t – manipulated by various enities, that is the template parameter of several entities, have the same requirements as in the C++ Standard Template Library (STL): value_t must supply
- public default constructor, - public copy constructor, - public destructor, - public assignment operator and - public equivalence operator. .
Typically the element type has value semantics and automatically satisfies the requirements above.
If you use a complex type other than std::complex it is assumed that conj() function is defined for this type. If the function have different name than conj() then you have to define a redirection function in type's namespace. It may look like this:
Additionally several entities use special constants defined in traits template class. To use this entities value_t must supply constructor taking 0 and 1 integer literals to represent zero (additive identity) and unit (multiplicative identity) entities respectively. This requirement is met when e.g. floating point types (i.e. float or double) or STL complex class are used. Otherwise traits class must be specialized with proper traits::zero and traits::unit initialization.
Here goes a list of entities which use special constants.
traits<value_t>::zero. traits<value_t>::zero. traits<value_t>::zero. traits<value_t>::zero. traits<value_t>::zero. traits<value_t>::zero. traits<value_t>::zero. traits<value_t>::zero. traits<value_t>::zero. traits<value_t>::zero.
1.8.1.2