35 #ifndef _BLAZE_MATH_DENSE_INITIALIZERVECTOR_H_ 36 #define _BLAZE_MATH_DENSE_INITIALIZERVECTOR_H_ 174 template<
typename Type
175 ,
bool TF = defaultTransposeFlag >
177 :
public DenseVector< InitializerVector<Type,TF>, TF >
201 template<
typename NewType >
210 template<
size_t NewN >
222 enum :
bool { simdEnabled =
false };
228 enum :
bool { smpAssignable =
false };
267 inline size_t size()
const noexcept;
268 inline size_t spacing()
const noexcept;
269 inline size_t capacity()
const noexcept;
278 template<
typename Other >
inline bool canAlias (
const Other* alias )
const noexcept;
279 template<
typename Other >
inline bool isAliased(
const Other* alias )
const noexcept;
323 template<
typename Type
341 template<
typename Type
344 :
size_( list.size() )
357 template<
typename Type
363 if( n < list.size() ) {
387 template<
typename Type
393 if( index <
list_.size() )
394 return list_.begin()[index];
411 template<
typename Type
416 if( index >=
size_ ) {
419 return (*
this)[index];
431 template<
typename Type
436 return list_.begin();
446 template<
typename Type
461 template<
typename Type
476 template<
typename Type
491 template<
typename Type
514 template<
typename Type
531 template<
typename Type
545 template<
typename Type
562 template<
typename Type
566 size_t nonzeros( 0 );
568 for(
size_t i=0UL; i<
list_.size(); ++i ) {
584 template<
typename Type
614 template<
typename Type
616 template<
typename Other >
619 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
634 template<
typename Type
636 template<
typename Other >
639 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
655 template<
typename Type,
bool TF >
658 template<
typename Type,
bool TF >
682 template<
typename Type
701 template<
typename Type
720 template<
typename T,
bool TF >
738 template<
typename T,
bool TF >
756 template<
typename T1,
bool TF,
typename T2 >
757 struct HighType< InitializerVector<T1,TF>, InitializerVector<T2,TF> >
775 template<
typename T1,
bool TF,
typename T2 >
776 struct LowType< InitializerVector<T1,TF>, InitializerVector<T2,TF> >
794 template<
typename T,
bool TF,
size_t I,
size_t N >
800 template<
typename T,
bool TF >
819 template<
typename T,
bool TF,
size_t... CEAs >
825 template<
typename T,
bool 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, a compilation error is created.
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:414
Compile time check for low-level access to constant data.This type trait tests whether the given data...
Definition: HasConstDataAccess.h:75
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, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
Header file for the UNUSED_PARAMETER function template.
Header file for basic type definitions.
Implementation of an iterator for (extended) initializer lists.The InitializerIterator represents a g...
Definition: InitializerIterator.h:56
InitializerIterator< Type > ConstIterator
Iterator over constant elements.
Definition: InitializerVector.h:195
ListType list_
The initializer list represented by the vector.
Definition: InitializerVector.h:292
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
const Type * ConstPointer
Pointer to a constant vector value.
Definition: InitializerVector.h:192
size_t size_
The current size/dimension of the vector.
Definition: InitializerVector.h:291
Dense vector representation of an initializer list.The InitializerVector class template is a dense ve...
Definition: InitializerVector.h:176
Header file for the DenseVector base class.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type, a compilation error is created.
Definition: Volatile.h:79
ConstIterator end() const noexcept
Returns an iterator just past the last element of the initializer vector.
Definition: InitializerVector.h:479
Efficient implementation of an arbitrary sized vector.The DynamicVector class template is the represe...
Definition: DynamicVector.h:185
InitializerVector(initializer_list< Type > list) noexcept
Constructor for InitializerVector.
Definition: InitializerVector.h:343
Header file for the extended initializer_list functionality.
Header file for the elements trait.
Constraint on the data type.
Efficient implementation of a fixed-sized vector.The StaticVector class template is the representatio...
Definition: Forward.h:61
Base template for the SubvectorTrait class.
Definition: SubvectorTrait.h:109
Header file for the LowType type trait.
Base template for the HighType type trait.
Definition: HighType.h:133
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5908
Header file for all forward declarations of the math module.
#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:547
ConstIterator cbegin() const noexcept
Returns an iterator to the first element of the initializer vector.
Definition: InitializerVector.h:464
Header file for the subvector trait.
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
const Type & Reference
Reference to a non-constant vector value.
Definition: InitializerVector.h:189
ConstIterator cend() const noexcept
Returns an iterator just past the last element of the initializer vector.
Definition: InitializerVector.h:494
size_t nonZeros() const
Returns the number of non-zero elements in the vector.
Definition: InitializerVector.h:564
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:637
Base template for the ElementsTrait class.
Definition: ElementsTrait.h:108
const Type & ReturnType
Return type for expression template evaluations.
Definition: InitializerVector.h:186
Type ElementType
Type of the vector elements.
Definition: InitializerVector.h:185
Compile time check for custom data types.This type trait tests whether the given data type represents...
Definition: IsInitializer.h:82
Base template for the LowType type trait.
Definition: LowType.h:133
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:449
const Type & ConstReference
Reference to a constant vector value.
Definition: InitializerVector.h:190
size_t spacing() const noexcept
Returns the minimum capacity of the vector.
Definition: InitializerVector.h:533
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:202
Resize mechanism to obtain a InitializerVector with a different fixed number of elements.
Definition: InitializerVector.h:211
#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, a compilation error is created.
Definition: Reference.h:79
Header file for the isDefault shim.
Constraint on the data type.
void swap(InitializerVector &v) noexcept
Swapping the contents of two vectors.
Definition: InitializerVector.h:586
const Type * Pointer
Pointer to a non-constant vector value.
Definition: InitializerVector.h:191
static const Type zero_
Neutral element for accesses to zero elements.
Definition: InitializerVector.h:299
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:390
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: InitializerVector.h:516
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:254
bool canAlias(const Other *alias) const noexcept
Returns whether the vector can alias with the given address alias.
Definition: InitializerVector.h:617
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:628
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
ConstPointer data() const noexcept
Low-level data access to the vector elements.
Definition: InitializerVector.h:434
Header file for the HighType type trait.
Header file for the TrueType type/value trait base class.