forked from boostorg/ublas
-
Notifications
You must be signed in to change notification settings - Fork 1
Modification
Cem Bassoy edited this page Jul 26, 2018
·
4 revisions
While the tensor template class and its auxiliary classes inherits the implementation style of the matrix and vector template class, they deviate in some points. This document shall give an overview of the changes.
The methodsinsert
or erase
of the tensor concept are renamed by write
and read
.
I did not fully comprehend the reason behind the Matrix/Vector/Scalar Expression concepts, especially the functions and iterators of such. Therefore, I decided to postpone the development of expression concept for tensors.
- The current implementation of the tensor template class only compiles with compilers supporting C++17 mostly because
constexpr if
is used. - Function
max_size()
in vector and matrix class is removed. It can still be queried through the underlying storage array. Note thatmax_size()
is depcretated since C++17 for the std::vector. - Functions like
find_element()
are put outside the tensor template class as free functions. - All iterator structures are removed.
- Member function
data()
returns apointer
orconst_pointer
instead of anarray_type
. - Data access functions are implemented with
operator[]
and functionat()
. - Function
operator()
will be used to select/project sections of tensors. - Functions
insert_element()
anderase_element()
will not be used. - Function
resize()
will be renamed toreshape()
using extents. - Proxy shortcuts for tensor expressions are not used. It does not make user code more readible or convenient.
- Expression templates include tensor types as an additional template parameter.
- Arithmetic assignment operators are placed outside the tensor template class.
- Single-index access for fast tensor access included.
- Single-index access for tensor expression templates used instead of multi-index.
- Tensor expression template only returns a const reference to the derived expression type
- Binary and unary tensor expression templates only return a const reference with the access operator
- Single-Index Access included.
- Single-Index Access included.
- Move copy constructor included.
- The boost unit-test framework is dynamically linked.
- Unit-Tests are not executed when compiled.
- Renamed unit test folder according to the tested template classes and functions.
- Utilized some of the latest features of the boost unit-test framework version 1.67 such as fixtures and templates.
- Pragmas not included for unit testing.
- README for a better view changed.