35#ifndef _BLAZE_MATH_DENSE_INITIALIZERVECTOR_H_
36#define _BLAZE_MATH_DENSE_INITIALIZERVECTOR_H_
177template<
typename Type
181 :
public DenseVector< InitializerVector<Type,TF,Tag>, TF >
211 template<
typename NewType >
220 template<
size_t NewN >
281 inline
size_t size() const noexcept;
292 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
293 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
337template< typename
Type
356template<
typename Type
360 :
size_( list.size() )
373template<
typename Type
380 if( n < list.size() ) {
381 BLAZE_THROW_INVALID_ARGUMENT(
"Invalid initializer list dimension" );
404template<
typename Type
411 if( index <
list_.size() )
412 return list_.begin()[index];
429template<
typename Type
435 if( index >=
size_ ) {
438 return (*
this)[index];
450template<
typename Type
456 return list_.begin();
466template<
typename Type
482template<
typename Type
498template<
typename Type
514template<
typename Type
538template<
typename Type
556template<
typename Type
571template<
typename Type
590template<
typename Type
595 size_t nonzeros( 0 );
597 for(
size_t i=0UL; i<
list_.size(); ++i ) {
613template<
typename Type
644template<
typename Type
647template<
typename Other >
650 return static_cast<const void*
>( this ) ==
static_cast<const void*
>( alias );
665template<
typename Type
668template<
typename Other >
671 return static_cast<const void*
>( this ) ==
static_cast<const void*
>( alias );
687template<
typename Type,
bool TF,
typename Tag >
690template<
typename Type,
bool TF,
typename Tag >
714template<
typename Type
734template<
typename Type
754template<
typename T,
bool TF,
typename Tag >
755struct HasConstDataAccess< InitializerVector<T,TF,Tag> >
772template<
typename T,
bool TF,
typename Tag >
790template<
typename T1,
bool TF,
typename Tag,
typename T2 >
793 using Type = InitializerVector< typename HighType<T1,T2>::Type, TF, Tag >;
809template<
typename T1,
bool TF,
typename Tag,
typename T2 >
812 using Type = InitializerVector< typename LowType<T1,T2>::Type, TF, Tag >;
Header file for run time assertion macros.
Constraint on the data type.
Header file for the HasConstDataAccess type trait.
Header file for the HighType type trait.
Header file for the InitializerIterator class template.
Header file for the IntegralConstant class template.
Header file for the isDefault shim.
Header file for the IsInitializer type trait.
Header file for the LowType type trait.
Header file for the MAYBE_UNUSED function template.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Efficient implementation of an arbitrary sized vector.
Definition DynamicVector.h:223
Implementation of an iterator for (extended) initializer lists.
Definition InitializerIterator.h:57
Dense vector representation of an initializer list.
Definition InitializerVector.h:182
const Type & Reference
Reference to a non-constant vector value.
Definition InitializerVector.h:199
static constexpr bool smpAssignable
Definition InitializerVector.h:238
ConstIterator cbegin() const noexcept
initializer_list< NewType > ListType
Definition InitializerVector.h:299
const Type & ReturnType
Return type for expression template evaluations.
Definition InitializerVector.h:196
InitializerIterator< Type > ConstIterator
Iterator over constant elements.
Definition InitializerVector.h:205
DynamicVector< Type,!TF > TransposeType
Transpose type for expression template evaluations.
Definition InitializerVector.h:192
const Type & ConstReference
Reference to a constant vector value.
Definition InitializerVector.h:200
size_t capacity() const noexcept
Tag TagType
Tag type of this InitializerVector instance.
Definition InitializerVector.h:195
InitializerVector(initializer_list< Type > list) noexcept
Constructor for InitializerVector.
Definition InitializerVector.h:359
ConstReference operator[](size_t index) const noexcept
Subscript operator for the direct access to the vector elements.
Definition InitializerVector.h:408
ConstIterator cend() const noexcept
const Type * Pointer
Pointer to a non-constant vector value.
Definition InitializerVector.h:201
static const NewType zero_
Definition InitializerVector.h:313
const InitializerVector & CompositeType
Data type for composite expression templates.
Definition InitializerVector.h:197
bool canAlias(const Other *alias) const noexcept
ConstReference at(size_t index) const
Checked access to the vector elements.
Definition InitializerVector.h:433
size_t spacing() const noexcept
DynamicVector< Type, TF > ResultType
Result type for expression template evaluations.
Definition InitializerVector.h:189
const Type * ConstPointer
Pointer to a constant vector value.
Definition InitializerVector.h:202
ConstPointer data() const noexcept
Low-level data access to the vector elements.
Definition InitializerVector.h:454
InitializerVector< Type, TF, Tag > This
Type of this InitializerVector instance.
Definition InitializerVector.h:185
Type ElementType
Type of the vector elements.
Definition InitializerVector.h:194
void swap(InitializerVector &v) noexcept
size_t size_
Definition InitializerVector.h:305
bool isAliased(const Other *alias) const noexcept
static constexpr bool simdEnabled
Definition InitializerVector.h:232
size_t size() const noexcept
ConstIterator begin() const noexcept
ConstIterator end() const noexcept
DenseVector< This, TF > BaseType
Base type of this InitializerVector instance.
Definition InitializerVector.h:186
InitializerVector(initializer_list< Type > list, size_t n)
Constructor for InitializerVector.
Definition InitializerVector.h:376
ListType list_
Definition InitializerVector.h:306
InitializerIterator< Type > Iterator
Iterator over non-constant elements.
Definition InitializerVector.h:204
Initializer list type of the Blaze library.
Header file for the DenseVector base class.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.
Definition Volatile.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.
Definition Pointer.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.
Definition Const.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.
Definition Reference.h:79
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition DiagonalMatrix.h:207
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition DiagonalMatrix.h:225
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition DiagonalMatrix.h:169
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition Assert.h:117
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition MaybeUnused.h:81
BoolConstant< true > TrueType
Type traits base class.
Definition IntegralConstant.h:132
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition Exception.h:331
Header file for the exception macros of the math module.
Header file for all forward declarations of the math module.
Header file for the extended initializer_list functionality.
Base template for the HighType type trait.
Definition HighType.h:322
Rebind mechanism to obtain a InitializerVector with different data/element type.
Definition InitializerVector.h:212
InitializerVector< NewType, TF, Tag > Other
The type of the other InitializerVector.
Definition InitializerVector.h:213
Resize mechanism to obtain a InitializerVector with a different fixed number of elements.
Definition InitializerVector.h:221
InitializerVector< Type, TF, Tag > Other
The type of the other InitializerVector.
Definition InitializerVector.h:222
Compile time check for custom data types.
Definition IsInitializer.h:83
Base template for the LowType type trait.
Definition LowType.h:322
Header file for basic type definitions.