35 #ifndef _BLAZE_MATH_DENSE_INITIALIZERVECTOR_H_ 36 #define _BLAZE_MATH_DENSE_INITIALIZERVECTOR_H_ 172 template<
typename Type
173 ,
bool TF = defaultTransposeFlag >
175 :
public DenseVector< InitializerVector<Type,TF>, TF >
199 template<
typename NewType >
208 template<
size_t NewN >
269 inline
size_t size() const noexcept;
270 inline
size_t spacing() const noexcept;
271 inline
size_t capacity() const noexcept;
280 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
281 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
325 template< typename Type
343 template<
typename Type
346 :
size_( list.size() )
359 template<
typename Type
365 if( n < list.size() ) {
389 template<
typename Type
395 if( index < list_.size() )
396 return list_.begin()[index];
413 template<
typename Type
418 if( index >= size_ ) {
421 return (*
this)[index];
433 template<
typename Type
438 return list_.begin();
448 template<
typename Type
463 template<
typename Type
478 template<
typename Type
493 template<
typename Type
516 template<
typename Type
533 template<
typename Type
547 template<
typename Type
564 template<
typename Type
568 size_t nonzeros( 0 );
570 for(
size_t i=0UL; i<list_.size(); ++i ) {
586 template<
typename Type
592 swap( size_, v.size_ );
593 swap( list_, v.list_ );
616 template<
typename Type
618 template<
typename Other >
621 return static_cast<const void*>(
this ) == static_cast<const void*>( alias );
636 template<
typename Type
638 template<
typename Other >
641 return static_cast<const void*>(
this ) == static_cast<const void*>( alias );
657 template<
typename Type,
bool TF >
660 template<
typename Type,
bool TF >
684 template<
typename Type
703 template<
typename Type
722 template<
typename T,
bool TF >
723 struct HasConstDataAccess< InitializerVector<T,TF> >
740 template<
typename T,
bool TF >
741 struct IsInitializer< InitializerVector<T,TF> >
758 template<
typename T1,
bool TF,
typename T2 >
759 struct HighType< InitializerVector<T1,TF>, InitializerVector<T2,TF> >
761 using Type = InitializerVector< typename HighType<T1,T2>::Type, TF >;
777 template<
typename T1,
bool TF,
typename T2 >
778 struct LowType< InitializerVector<T1,TF>, InitializerVector<T2,TF> >
780 using Type = InitializerVector< typename LowType<T1,T2>::Type, TF >;
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.In case the given data type is a const-qualified type,...
Definition: Const.h:79
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
ConstReference at(size_t index) const
Checked access to the vector elements.
Definition: InitializerVector.h:416
Header file for the IsInitializer type trait.
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression,...
Definition: Assert.h:117
Header file for basic type definitions.
Implementation of an iterator for (extended) initializer lists.The InitializerIterator represents a g...
Definition: InitializerIterator.h:56
ListType list_
The initializer list represented by the vector.
Definition: InitializerVector.h:294
const Type * ConstPointer
Pointer to a constant vector value.
Definition: InitializerVector.h:190
size_t size_
The current size/dimension of the vector.
Definition: InitializerVector.h:293
Dense vector representation of an initializer list.The InitializerVector class template is a dense ve...
Definition: InitializerVector.h:174
Header file for the DenseVector base class.
Header file for the MAYBE_UNUSED function template.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type,...
Definition: Volatile.h:79
ConstIterator end() const noexcept
Returns an iterator just past the last element of the initializer vector.
Definition: InitializerVector.h:481
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: IntegralConstant.h:132
Header file for all forward declarations of the math module.
static constexpr bool simdEnabled
Compilation flag for SIMD optimization.
Definition: InitializerVector.h:220
Efficient implementation of an arbitrary sized vector.The DynamicVector class template is the represe...
Definition: DynamicVector.h:198
InitializerVector(initializer_list< Type > list) noexcept
Constructor for InitializerVector.
Definition: InitializerVector.h:345
Header file for the extended initializer_list functionality.
Constraint on the data type.
Header file for the LowType type trait.
void swap(InitializerVector< Type, TF > &a, InitializerVector< Type, TF > &b) noexcept
Swapping the contents of two vectors.
Definition: InitializerVector.h:705
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.In case the given data type T is not a pointer type, a compilation error ...
Definition: Pointer.h:79
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
size_t capacity() const noexcept
Returns the maximum capacity of the vector.
Definition: InitializerVector.h:549
ConstIterator cbegin() const noexcept
Returns an iterator to the first element of the initializer vector.
Definition: InitializerVector.h:466
Constraint on the data type.
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
const Type & Reference
Reference to a non-constant vector value.
Definition: InitializerVector.h:187
ConstIterator cend() const noexcept
Returns an iterator just past the last element of the initializer vector.
Definition: InitializerVector.h:496
size_t nonZeros() const
Returns the number of non-zero elements in the vector.
Definition: InitializerVector.h:566
Header file for the exception macros of the math module.
bool isAliased(const Other *alias) const noexcept
Returns whether the vector is aliased with the given address alias.
Definition: InitializerVector.h:639
const Type & ReturnType
Return type for expression template evaluations.
Definition: InitializerVector.h:184
Type ElementType
Type of the vector elements.
Definition: InitializerVector.h:183
Header file for the HasConstDataAccess type trait.
ConstIterator begin() const noexcept
Returns an iterator to the first element of the initializer vector.
Definition: InitializerVector.h:451
const Type & ConstReference
Reference to a constant vector value.
Definition: InitializerVector.h:188
size_t spacing() const noexcept
Returns the minimum capacity of the vector.
Definition: InitializerVector.h:535
Header file for run time assertion macros.
Constraint on the data type.
Rebind mechanism to obtain a InitializerVector with different data/element type.
Definition: InitializerVector.h:200
Resize mechanism to obtain a InitializerVector with a different fixed number of elements.
Definition: InitializerVector.h:209
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type,...
Definition: Reference.h:79
Header file for the isDefault shim.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:282
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: InitializerVector.h:226
Constraint on the data type.
void swap(InitializerVector &v) noexcept
Swapping the contents of two vectors.
Definition: InitializerVector.h:588
const Type * Pointer
Pointer to a non-constant vector value.
Definition: InitializerVector.h:189
static const Type zero_
Neutral element for accesses to zero elements.
Definition: InitializerVector.h:301
Header file for the default transpose flag for all vectors of the Blaze library.
ConstReference operator[](size_t index) const noexcept
Subscript operator for the direct access to the vector elements.
Definition: InitializerVector.h:392
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: InitializerVector.h:518
Header file for the IntegralConstant class template.
Header file for the InitializerIterator class template.
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:264
bool canAlias(const Other *alias) const noexcept
Returns whether the vector can alias with the given address alias.
Definition: InitializerVector.h:619
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:635
ConstPointer data() const noexcept
Low-level data access to the vector elements.
Definition: InitializerVector.h:436
Header file for the HighType type trait.