Go to the documentation of this file.
16 #include <initializer_list>
78 :
std::vector<F>(seq) {}
85 inline operator std::set<F>()
const {
87 for(
typename std::vector<F>::
88 const_iterator i = this->begin(); i != this->end(); ++i)
96 template<
class G,
class H>
101 template<
class G,
class H>
106 template<
class G,
class H,
class I,
class J>
129 virtual std::ostream&
info(std::ostream& os)
const;
146 if (str.size() > 0) {
157 this->push_back(q.front());
172 template<
class G,
class H>
175 for(
typename std::vector<F>::
176 const_iterator i = this->begin(); i != this->end(); ++i) {
177 G val = ((*i)->*fun)();
184 template<
class G,
class H>
187 for(
typename std::vector<F>::
188 const_iterator i = this->begin(); i != this->end();++i) {
189 G* val = &((*i)->*fun)();
196 template<
class G,
class H,
class I,
class J>
199 for(
typename std::vector<F>::
200 const_iterator is = this->begin(); is != this->end();++is) {
201 G val = ((*is)->*fun)(i);
211 std::vector<bool> result(this->size(),
false);
213 std::vector<bool>::iterator i = result.begin();
214 typename std::vector<F>::
215 const_iterator it = this->begin(), is = seq.begin();
216 for(; it != this->end(); ++it, ++is, ++i)
225 std::vector<bool> result(this->size(),
false);
227 std::vector<bool>::iterator i = result.begin();
228 typename std::vector<F>::
229 const_iterator it = this->begin(), is = seq.begin();
230 for(; it != this->end(); ++it, ++is, ++i)
237 std::set<F> set = seq;
238 std::vector<F> result;
239 result.reserve(this->size());
240 for(
typename std::vector<F>::
241 const_iterator i = this->begin(); i != this->end(); ++i)
242 if (set.find(*i) == set.end()) result.push_back(*i);
248 std::vector<F> result;
249 result.reserve(this->size());
250 for(
typename std::vector<F>::
251 const_iterator i = this->begin(); i != this->end(); ++i)
252 if (!(*i == val)) result.push_back(*i);
258 std::vector<F> result(this->size() + seq.size());
259 typename std::vector<F>::iterator i = result.begin();
260 typename std::vector<F>::
261 const_iterator it = this->begin(), is = seq.begin();
262 for(; it != this->end(); ++it, ++i) *i = *it;
263 for(; is != seq.end(); ++is, ++i) *i = *is;
269 std::vector<bool> result(this->size());
274 std::vector<bool>::iterator i = result.begin();
275 for(
typename std::vector<F>::
276 const_iterator it = this->begin(); it != this->end(); ++it, ++i)
309 std::vector<F> result(count(seq.begin(), seq.end(),
true));
310 if (result.size() > 0) {
311 std::vector<bool>::const_iterator is = seq.begin();
312 typename std::vector<F>::const_iterator it = this->begin();
313 typename std::vector<F>::iterator i = result.begin();
314 for(; it != this->end(); ++it, ++is)
325 for(
typename std::vector<F>::
326 const_iterator i = this->begin(); i != this->end(); ++i)
328 if (*i == val)
return true;
337 for(
typename std::vector<F>::
338 const_iterator i = this->begin(); i != this->end();) {
340 if (++i != this->end()) os <<
", ";
380 va_start(param, first);
381 for(uint i = 1; i < n; ++i)
382 data[i] = va_arg(param, F);
396 uint n = list.size();
411 F current = *i++ = first;
412 for(; i != data.end(); ++i)
413 *i++ = (current+=diff);
432 template<
class F,
class G>
441 for(; i1 != seq1.end(); )
442 seq.push_back( *i1++ * *i2++);
446 template<
class F,
class G>
447 Sequence<typename Combtype<F,G>::type>
452 for(; i1 != seq1.end(); )
453 seq.push_back( *i1++ * factor);
459 template<
class F,
class G>
460 Sequence<typename Combtype<F,G>::type>
468 for(; i1 != seq1.end(); )
469 seq.push_back( *i1++ / *i2++);
473 template<
class F,
class G>
474 Sequence<typename Combtype<F,G>::type>
479 for(; i1 != seq1.end(); )
480 seq.push_back( *i1++ / divisor);
486 #endif // sequence_hh
bool exist(F val) const
Returns true, if a value is in the seq.
Sequence< bool > operator|(const Sequence< bool > &seq) const
Set each bit, which is set in \seq.
ElementFormulaContainer< Real > operator/(const ElementFormulaContainer< Real > frm1, const ElementFormulaContainer< Real > frm2)
Division of a element formulas by a scalar element formula via /-operator.
void pointerOutput(std::ostream &os, const F &val)
virtual std::ostream & info(std::ostream &os) const
Point< typename Combtype< F, Real >::type, dim > operator*(const Real x, const Point< F, dim > &y)
Sequence(const F &seq)
Constructor, which uses the constructor of the base class BaseSequence.
Sequence< F > makeEquidistantSequence(uint n, const F &first, const F &diff)
#define conceptsAssert(cond, exc)
Assert that a certain condition is fulfilled.
std::istream & operator>>(std::istream &is, BaseSequence< F > &seq)
BaseSequence(const std::string &str)
Constructor, sequence is defined by a string.
Sequence< F > operator-(const Sequence< F > &seq) const
Sequence()
Standard Constructor.
#define DEBUGL(doit, msg)
Sequence< F > operator+(const Sequence< F > &seq) const
Sequence< G > operator()(G(H::*fun)() const) const
Returns element wise application of a member function, e.g.
Sequence< G * > operator()(G &(H::*fun)() const) const
Returns element wise application of a member function, e.g.
Exception class for assertions.
Sequence< bool > operator~() const
Returns copy of this sequence with negate bits.
BaseSequence(std::queue< F > q)
Constructor taking a queue (takes a copy)
Sequence with operations, output operator, and method of the particular element types.
std::vector< bool > operator==(const F val) const
Returns true for the elements with are equal to val.
Sequence< F > operator()(const BaseSequence< bool > &seq) const
Returns subsequence which indices are true in seq.
std::vector< bool > operator&&(const Sequence< F > &set) const
BaseSequence(const G &seq)
Constructor, which uses the constructor of the base class std::vector.
Sequence< F > operator-(const F &val) const
std::vector< bool > operator||(const Sequence< F > &set) const
Sequence with operations and output operator.
Sequence< int > makeRangeSequence(uint n)
Returns the sequence 0,1,...,n-1.
std::string typeOf(const T &t)
Return the typeid name of a class object.
Sequence< bool > operator&(const Sequence< bool > &seq) const
Deletes each bit, which is not set in \seq.
BaseSequence(const int N)
Constructor taking an integer.
Sequence< G > operator()(G(H::*fun)(I) const, J i) const
Returns element wise application of a member function, e.g.
Class providing an output operator.
Sequence< F > makeSequence(uint n, const F &first,...)
Creates an sequence of length from a comma separated list of values.
Basic namespace for Concepts-2.