-
assigned issue to
Klaus Iglberger
Description
Currently, Blaze only provides a couple of componentwise operations (e.g. abs(), real(), and imag()). Many useful operations are still missing, such as for instance exp(), log(), pow(), sqrt(), floor(), ceil(), or sign(). However, many more componentwise operations and variations of these operations are possible. Therefore the Blaze library should both provide the most common componentwise operations as well as provide users with the opportunity to define custom operations, which can be tailored to the specific needs of an application.
Conceptual Example
DynamicVector<double> a, b;
DynamicMatrix<double> A, B;
// ... Initializing the dense vector a
b = forEach( a, []( double a ){ return std::sqrt( a ); } ); // Compute the square root of each vector element
B = forEach( A, []( double a ){ return std::log( a ); } ); // Compute the natural logarithm of each matrix element
Tasks
- design an interface for the convenient definition of custom operations
- implement custom operations for both dense and sparse vectors
- implement custom operations for both dense and sparse matrices
- provide convenience functions for the most common operations
- ensure compatibility with all existing vector and matrix classes
- ensure compatibility with all existing vector and matrix expressions
- add the necessary number of test cases for the functionality
- provide a detailed documentation of the feature