Class ae108::cpppetsc::Vector::Inserter
template <InsertMode Mode>
ClassList > ae108 > cpppetsc > Vector > Inserter
Provides element() and elements() access functions to set/add single/multiple elements. These calls can be chained (vector is a Vector object)More...
Public Types
Type | Name |
---|---|
typedef Vector< Policy >::size_type | size_type |
typedef Vector< Policy >::value_type | value_type |
Public Functions
Type | Name |
---|---|
Inserter (Vector *const vector) |
|
Inserter (const Inserter &) = default |
|
Inserter (Inserter &&) noexcept |
|
const Inserter & | element (const size_type index, const value_type value) const |
const Inserter & | elements (const std::vector< size_type > & indices, const std::vector< value_type > & values) const |
void | fill (const value_type value) const |
void | flush () const |
InsertionProxy< Mode > | operator() (const typename Vector::size_type index) const |
Inserter & | operator= (const Inserter &) = default |
Inserter & | operator= (Inserter &&) noexcept |
void | setZero () const |
size_type | size () const |
~Inserter () |
Detailed Description
vector.replace().element(0, 7.).element(1, 3.);
It is also possible to set/add entries by accessing the index first:
instance.replace()(0) = 7.;
This way, the Inserter class can be used as a "vector" for assembly.
Public Types Documentation
typedef size_type
using ae108::cpppetsc::Vector< Policy >::Inserter< Mode >::size_type = Vector<Policy>::size_type;
typedef value_type
using ae108::cpppetsc::Vector< Policy >::Inserter< Mode >::value_type = Vector<Policy>::value_type;
Public Functions Documentation
function Inserter [1/3]
inline explicit ae108::cpppetsc::Vector::Inserter::Inserter (
Vector *const vector
)
function Inserter [2/3]
ae108::cpppetsc::Vector::Inserter::Inserter (
const Inserter &
) = default
function Inserter [3/3]
ae108::cpppetsc::Vector::Inserter::Inserter (
Inserter &&
) noexcept
function element
inline const Inserter & ae108::cpppetsc::Vector::Inserter::element (
const size_type index,
const value_type value
) const
function elements
inline const Inserter & ae108::cpppetsc::Vector::Inserter::elements (
const std::vector< size_type > & indices,
const std::vector< value_type > & values
) const
function fill
inline void ae108::cpppetsc::Vector::Inserter::fill (
const value_type value
) const
function flush
inline void ae108::cpppetsc::Vector::Inserter::flush () const
function operator()
inline InsertionProxy < Mode > ae108::cpppetsc::Vector::Inserter::operator() (
const typename Vector::size_type index
) const
function operator=
Inserter & ae108::cpppetsc::Vector::Inserter::operator= (
const Inserter &
) = default
function operator=
Inserter & ae108::cpppetsc::Vector::Inserter::operator= (
Inserter &&
) noexcept
function setZero
inline void ae108::cpppetsc::Vector::Inserter::setZero () const
function size
inline size_type ae108::cpppetsc::Vector::Inserter::size () const
function ~Inserter
inline ae108::cpppetsc::Vector::Inserter::~Inserter ()
The documentation for this class was generated from the following file cpppetsc/src/include/ae108/cpppetsc/Vector.h