MTL 4: mtl Namespace Reference
Classes | |
| struct | Collection |
| Concept Collection. More... | |
| struct | MutableCollection |
| Concept MutableCollection. More... | |
| struct | ConstantSizeCollection |
| Concept ConstantSizeCollection: size parameters of collection are completely given at compile time. More... | |
| struct | AlgebraicCollection |
| Concept AlgebraicCollection: common requirements of matrices, vectors, and scalars in computations. More... | |
| struct | ConstantSizeAlgebraicCollection |
| Concept ConstantSizeAlgebraicCollection: extension of AlgebraicCollection with meta-functions. More... | |
| struct | TraversableCollection |
| Concept TraversableCollection: collections that can be traversed by cursor or iterator. More... | |
| struct | TraversableMutableCollection |
| Concept TraversableMutableCollection: collections that can be traversed by (mutable) iterator. More... | |
| struct | OrientedCollection |
| Concept OrientedCollection: collections with concept-awareness in terms of associated type. More... | |
| struct | Magnitude |
| Concept/Type-trait for magnitudes of scalar values. More... | |
| struct | Matrix |
| Concept Matrix. More... | |
| struct | MatrixInserter |
| Concept MatrixInserter: classes that enable efficient insertion into matrices, esp. compressed sparse. More... | |
| struct | InsertableMatrix |
| Concept InsertableMatrix: matrix that can be filled by means of inserter. More... | |
| struct | MutableMatrix |
| Concept MutableMatrix. More... | |
| struct | ConstantSizeMatrix |
| Concept ConstantSizeMatrix. More... | |
| struct | ResizeableMatrix |
| Concept ResizeableMatrix. More... | |
| struct | RowTraversableMatrix |
| Concept RowTraversableMatrix: provides begin and end cursor to traverse rows. More... | |
| struct | ColumnTraversableMatrix |
| Concept ColumnTraversableMatrix: provides begin and end cursor to traverse columns. More... | |
| struct | MajorTraversableMatrix |
| Concept MajorTraversableMatrix: traversable on major dimension. More... | |
| struct | MinorTraversableMatrix |
| Concept MinorTraversableMatrix: traversable on minor dimension. More... | |
| struct | AllTraversableMatrix |
| Concept AllTraversableMatrix: provides traversion over all elements. More... | |
| struct | NonZeroTraversableSubMatrix |
| Concept NonZeroTraversableSubMatrix: provides traversion of non-zero in rows or columns of matrices. More... | |
| struct | IteratableSubMatrix |
| Concept IteratableSubMatrix: provides iteration over elements within rows or columns of matrices. More... | |
| struct | StaticUnaryFunctor |
| Concept/Type-trait for static unary functors. More... | |
| struct | StaticBinaryFunctor |
| Concept/Type-trait for static binary functors. More... | |
| class | Addable |
| Concept Addable: Binary operation. More... | |
| class | Subtractable |
| Concept Subtractable: Binary operation. More... | |
| class | Multiplicable |
| Concept Multiplicable: Binary operation. More... | |
| class | Divisible |
| Concept Divisible: Binary operation. More... | |
| struct | UnaryFunctor |
| Concept UnaryFunctor. More... | |
| struct | UnaryStaticFunctor |
| Concept UnaryStaticFunctor. More... | |
| struct | BinaryFunctor |
| Concept BinaryFunctor. More... | |
| struct | BinaryStaticFunctor |
| Concept BinaryStaticFunctor. More... | |
| struct | Vector |
| Concept Vector. More... | |
| struct | MutableVector |
| Concept MutableVector. More... | |
| struct | ConstantSizeVector |
| Concept ConstantSizeVector. More... | |
| struct | bin_op_expr |
| Minimalistic expression template for binary operation: keeps only references. More... | |
| struct | ColumnInMatrix |
| Type of column in matrix as vector if accessible. More... | |
| struct | RowInMatrix |
| Type of row in matrix as vector if accessible. More... | |
| struct | static_num_cols |
| Number of columns given at compile time. More... | |
| struct | static_num_cols< Value[Size]> |
| static_num_cols implementation for (1D) arrays interpreted as vectors More... | |
| struct | static_num_cols< Value[Rows][Cols]> |
| static_num_cols implementation for (2D and higher) arrays interpreted as matrices More... | |
| struct | static_num_rows |
| Number of rows given at compile time. More... | |
| struct | static_num_rows< Value[Size]> |
| static_num_rows implementation for (1D) arrays interpreted as vectors More... | |
| struct | static_num_rows< Value[Rows][Cols]> |
| static_num_rows implementation for (2D and higher) arrays interpreted as matrices More... | |
| struct | static_size |
| Number of rows times columns given at compile time. More... | |
| struct | lsb_bits |
| Last N bits of Value. More... | |
| struct | same_mask |
| Compares two masks. More... | |
| struct | row_major_mask |
| Row-major mask for 2^K by 2^K base case. More... | |
| struct | col_major_mask |
| Column-major mask for 2^K by 2^K base case. More... | |
| struct | is_k_power_base_case_row_major |
| Checks whether 2^K by 2^K base case of hybric matrix, defined by Mask, is a row-major matrix. More... | |
| struct | is_k_power_base_case_col_major |
| Checks whether 2^K by 2^K base case of hybric matrix, defined by Mask, is a column-major matrix. More... | |
| struct | is_32_base_case_row_major |
| Checks whether 32x32 base case of hybric matrix, defined by Mask, is a row-major matrix. More... | |
| struct | is_32_base_case_col_major |
| Checks whether 32x32 base case of hybric matrix, defined by Mask, is a col-major matrix. More... | |
| struct | row_major_shark_mask |
| Row-major mask for 2^K by 2^K base case with 2^T shark teeth. More... | |
| struct | col_major_shark_mask |
| Row-major mask for 2^K by 2^K base case with 2^T shark teeth. More... | |
| struct | is_k_power_base_case_row_major_t_shark |
| struct | is_k_power_base_case_col_major_t_shark |
| struct | i_order_mask |
| N-order mask of N bits. More... | |
| struct | z_order_mask |
| Z-order mask of N bits. More... | |
| class | generate_mask |
| struct | dense_el_cursor |
| Cursor over every element of matrix, matrix row/column, or vector. More... | |
| struct | index_out_of_range |
| Exception for indices out of range. More... | |
| struct | range_error |
| Exception for invalid range definitions, esp. in constructors. More... | |
| struct | domain_error |
| Domain errors in MTL4. More... | |
| struct | incompatible_size |
| Exception for arguments with incompatible sizes. More... | |
| struct | change_static_size |
| Exception for trying to change a fixed size (to another value). More... | |
| struct | argument_result_conflict |
| Exception for arguments with incompatible shapes, e.g. adding matrices and vectors. More... | |
| struct | incompatible_shape |
| Exception for arguments with incompatible shapes, e.g. adding matrices and vectors. More... | |
| struct | matrix_not_square |
| Exception for arguments with incompatible sizes. More... | |
| struct | matrix_too_small |
| Exception for matrices too small for certain algorithms. More... | |
| struct | matrix_singular |
| Exception for singular matrices in solvers. More... | |
| struct | missing_diagonal |
| Exception for arguments with incompatible sizes. More... | |
| struct | access_during_insertion |
| Accessing (illegally) matrix or vector during insertion phase (dense non-distributed can be accessed always). More... | |
| struct | unexpected_result |
| Exception for a result that is not what it should be. More... | |
| struct | runtime_error |
| Exception for run-time errors that doesn't fit into specific categories. More... | |
| struct | logic_error |
| Exception for logic errors that doesn't fit into specific categories. More... | |
| class | irange |
| Class to define a half open index ranges. More... | |
| struct | make_in_copy_or_reference |
| Helper class to avoid avoidable copies for input parameters. More... | |
| struct | make_out_copy_or_reference |
| Helper class to avoid avoidable copies for output parameters. More... | |
| struct | make_in_out_copy_or_reference |
| Helper class to avoid avoidable copies for input-output parameters. More... | |
| struct | strided_dense_el_cursor |
| Cursor going in strides over element of matrix, matrix row/column, or vector. More... | |
| struct | strided_dense_el_const_iterator |
| Iterator going in strides over element of matrix, matrix row/column, or vector. More... | |
| struct | strided_dense_el_iterator |
| Iterator going in strides over element of matrix, matrix row/column, or vector. More... | |
| struct | Magnitude< std::complex< T > > |
| Specialization for complex numbers. More... | |
Namespaces | |
| namespace | ashape |
| Namespace for algebraic shapes; used for sophisticated dispatching between operations. | |
| namespace | assign |
| Namespace for static assignment functors. | |
| namespace | complexity_classes |
| Namespace for complexity classes. | |
| namespace | concept |
| Namespace for concepts. | |
| namespace | fixed |
| Namespace for compile-time parameters, e.g. matrix dimensions. | |
| namespace | io |
| Namespace for I/O operations. | |
| namespace | matrix |
| Namespace for matrices and views and operations exclusively on matrices. | |
| namespace | non_fixed |
| Namespace for run-time parameters, e.g. matrix dimensions. | |
| namespace | operations |
| Namespace for operations (if not defined in mtl). | |
| namespace | recursion |
| Namespace for recursive operations and types with recursive memory layout. | |
| namespace | sfunctor |
| Namespace for functors with static function apply and fully typed paramaters. | |
| namespace | tag |
| Namespace for tags used for concept-free dispatching. | |
| namespace | tfunctor |
| Namespace for functors with application operator and fully typed paramaters. | |
| namespace | traits |
| Namespace for type traits. | |
| namespace | utility |
| Namespace for utilities. | |
| namespace | vector |
| Namespace for vectors and views and operations exclusively on vectors. | |
| namespace | wrec |
| Namespace for implementations using recursators. | |
Functions | |
| template<class Tag, class Collection> | |
| traits::range_generator< Tag, Collection >::type | begin (Collection const &c) |
| Returns begin cursor over the Collection or a subset of the Collection. | |
| template<class Tag, class Collection> | |
| traits::range_generator< Tag, Collection >::type | end (Collection const &c) |
| Corresponding end cursor. | |
| template<typename Collection> | |
| void | swap (Collection &c1, Collection &c2) |
| Free function defined for all matrix and vector types. | |
| template<typename Collection, typename Functor> | |
| void | assign_each_nonzero (Collection &c, const Functor &f) |
Assign f(i) to each non-zero i in collection c. | |
| template<typename T> | |
| boost::enable_if< is_clonable< T >, T >::type | clone (const T &x) |
| Move-semantics-related anti-dot: always copy in constructor. | |
| template<typename Value> | |
| sfunctor::real< Value >::result_type | real (const Value &v) |
| real part of scalars (including non-complex) | |
| template<typename Value> | |
| sfunctor::imag< Value >::result_type | imag (const Value &v) |
| imaginary part of scalars (including non-complex) | |
| template<typename Value> | |
| sfunctor::signum< Value >::result_type | signum (const Value &v) |
| sign of scalars; for complex numbers sign of real part | |
| template<typename MatrixSrc, typename MatrixDest> | |
| void | matrix_copy (const MatrixSrc &src, MatrixDest &dest) |
Copy matrix src into matrix dest. | |
| template<typename MatrixSrc, typename MatrixDest> | |
| void | matrix_copy_plus (const MatrixSrc &src, MatrixDest &dest) |
Add matrix src to matrix dest in copy-like style. | |
| template<typename MatrixSrc, typename MatrixDest> | |
| void | matrix_copy_minus (const MatrixSrc &src, MatrixDest &dest) |
Subtract matrix src from matrix dest in copy-like style. | |
| template<typename MatrixSrc, typename MatrixDest> | |
| void | matrix_copy_ele_times (const MatrixSrc &src, MatrixDest &dest) |
Multiply matrix src element-wise with matrix dest in copy-like style. | |
| template<typename VectorSrc, typename VectorDest> | |
| void | vector_copy (const VectorSrc &src, VectorDest &dest) |
Copy vector src into vector dest. | |
| template<typename VectorSrc, typename VectorDest> | |
| void | vector_copy_plus (const VectorSrc &src, VectorDest &dest) |
Add vector src to vector dest in copy-like style. | |
| template<typename VectorSrc, typename VectorDest> | |
| void | vector_copy_minus (const VectorSrc &src, VectorDest &dest) |
Subtract vector src from vector dest in copy-like style. | |
| template<typename Factor, typename Collection> | |
| void | divide_by_inplace (Collection &c, const Factor &alpha, tag::scalar) |
Divide collection c (from right) by scalar factor alpha; c is altered. | |
| template<typename Factor, typename Collection> | |
| void | divide_by_inplace (Collection &c, const Factor &alpha) |
Divide collection c (from right) by factor alpha; c is altered. | |
| template<typename Collection> | |
| traits::num_cols< Collection >::type | num_cols (const Collection &c) |
| num_cols function for non-MTL types (uses implicit enable_if), 1D interpreted as Column vector | |
| template<typename Collection> | |
| traits::num_rows< Collection >::type | num_rows (const Collection &c) |
| num_rows function for non-MTL types (uses implicit enable_if), 1D interpreted as Column vector | |
| template<unsigned long Unroll, typename Value> | |
| Collection< Value >::value_type | product (const Value &value) |
| Returns product of all collection-entries (vector-entries). | |
| template<typename Factor, typename Collection> | |
| void | right_scale_inplace (Collection &c, const Factor &alpha, tag::scalar) |
Scale collection c from right with scalar factor alpha; c is altered. | |
| template<typename Factor, typename Collection> | |
| void | right_scale_inplace (Collection &c, const Factor &alpha, tag::matrix) |
Scale collection c from right with matrix factor alpha; c is altered. | |
| template<typename Factor, typename Collection> | |
| void | right_scale_inplace (Collection &c, const Factor &alpha) |
Scale collection c from right with factor alpha; c is altered. | |
| template<typename Collection> | |
| traits::size< Collection >::type | size (const Collection &c) |
| size function for non-MTL types (uses implicit enable_if) | |
| template<typename Vector> | |
| traits::size< Vector >::type | size1D (const Vector &v) |
| One-dimensional size function. | |
| template<unsigned long Unroll, typename Value> | |
| Collection< Value >::value_type | sum (const Value &value) |
| Return sum of all vector-entries. | |
| template<class Tag, class Coll> | |
| traits::range_generator< Tag, Coll >::type | lower_bound (Coll const &c, typename Collection< Coll >::size_type position) |
Cursor to an element with index equal or larger than position in a one-dimensional traversion. | |
| template<typename Value, typename Allocator> | |
| void | shrink_stl_vector (std::vector< Value, Allocator > &v) |
| Shrink memory consumption of an STL vector to its size. | |
| template<typename EnumType, typename Array> | |
| EnumType | string_to_enum (const std::string &s, const Array &l, EnumType) |
Variables | |
| const std::size_t | imax = std::numeric_limits<std::size_t>::max() |
| Maximal index. | |
| traits::range_generator< Tag, Collection >::type mtl::begin | ( | Collection const & | c | ) | [inline] |
Returns begin cursor over the Collection or a subset of the Collection.
Form of traversal depends on Tag, cf utility/glas_tag.hpp On nested traversals, cursors of level > 1 must provide at least one range generator
| boost::disable_if< is_clonable< T >, T >::type mtl::clone | ( | const T & | x | ) | [inline] |
Move-semantics-related anti-dot: always copy in constructor.
Some collections have referring semantics in copy constructors, e.g. sub-matrices. That means
Matrix B= sub_matrix(A, ...);
Matrix B= clone(sub_matrix(A, ...));
is_clonable<T> : boost::mpl::true_ {};
| traits::range_generator<Tag, Coll>::type mtl::lower_bound | ( | Coll const & | c, | |
| typename Collection< Coll >::size_type | position | |||
| ) | [inline] |
Cursor to an element with index equal or larger than position in a one-dimensional traversion.
This function is only defined where Tag represents an obvious one-dimensional traversion of Collection allowing for an interpretation of position. Examples are tag::row for a dense matrix or row-major compressed matrix. tag::all regarding an entire matrix (i.e. going over all entries of a matrix) does not characterize a one-dimensional traversion so that position has no unique meaning. Traversing all entries of a matrix row is one-dimensional and position is understood as looking for a column index, i.e. lower_bound<tag::all>(row_cursor, 7) returns a cursor to a matrix element whose row is the one of row_cursor and whose column is 7. Likewise traversing all non-zeros of a row will return a cursor that points to an entry with according row index and column index at least 7. If the searched index could not be found in the one-dimensional collection the returned cursor will be identical to the one returned by the end function.
| traits::size<Vector>::type mtl::size1D | ( | const Vector & | v | ) | [inline] |
| EnumType mtl::string_to_enum | ( | const std::string & | s, | |
| const Array & | l, | |||
| EnumType | ||||
| ) | [inline] |
Searches string s in list l of strings and returns enum
List l is given as array of const char*, which is the easiest to initialize. The search is case sensitive, thus (de)-capitalize your string upfront, e.g., with boost::to_lower(). If the string is not found then a runtime_error is thrown.
mtl Namespace Reference -- MTL 4 -- Peter Gottschling and Andrew Lumsdaine
-- Generated on 13 Nov 2009 by Doxygen 1.5.2 -- Copyright 2008-09 by TU Dresden and the Trustees of Indiana University.