Function Dune::XT::Common::create

Function template Dune::XT::Common::create

template<class MatrixType, size_t ROWS = MatrixAbstraction<MatrixType>::static_rows, size_t COLS = MatrixAbstraction<MatrixType>::static_cols, class FieldType = typename MatrixAbstraction<MatrixType>::S, class SparsityPatternType = FullPattern>
typename std::enable_if<is_matrix<MatrixType>::value, typename MatrixAbstraction<MatrixType>::template MatrixTypeTemplate<ROWS, COLS, FieldType>>::type Dune::XT::Common::create(const size_t rows, const size_t cols, const FieldType &val = 0, const SparsityPatternType &pattern = SparsityPatternType())

creates a matrix of the given size, filled with val and respecting the given sparsity pattern

Function template Dune::XT::Common::create

template<class VectorType, size_t SIZE = VectorAbstraction<VectorType>::static_size>
typename std::enable_if_t<is_vector<VectorType>::value, typename VectorAbstraction<VectorType>::template VectorTypeTemplate<SIZE>> Dune::XT::Common::create(const size_t sz, const typename VectorAbstraction<VectorType>::ScalarType &val = 0)

creates a vector of the given size, filled with val (via VectorAbstraction)