1 #ifndef _theplu_yat_utility_vector_base_ 2 #define _theplu_yat_utility_vector_base_ 31 #include "BasicVector.h" 32 #include "BLAS_level1.h" 33 #include "BLAS_level2.h" 34 #include "StrideIterator.h" 35 #include "VectorExpression.h" 41 #include <gsl/gsl_vector.h> 117 virtual bool isview(
void)
const=0;
122 size_t size(
void)
const;
306 std::ostream& operator<<(std::ostream& s,
const VectorBase& v);
324 gsl_vector* create_gsl_vector(
size_t n);
329 gsl_vector* create_gsl_vector(
size_t n,
double init);
342 gsl_vector* create_gsl_vector_copy(
const gsl_vector*);
346 bool overlap(
const gsl_vector* a,
const gsl_vector* b);
363 bool serial_overlap(
const gsl_vector* a,
const gsl_vector* b);
bool operator==(const VectorBase &) const
Comparison operator. Takes linear time.
const_iterator begin(void) const
double value_type
Definition: VectorBase.h:63
The Department of Theoretical Physics namespace as we define it.
const gsl_vector * gsl_vector_p(void) const
StrideIterator< const double * > const_iterator
VectorBase::const_iterator.
Definition: VectorBase.h:73
const gsl_vector * const_vec_
pointer to underlying GSL vector
Definition: VectorBase.h:168
void sort_smallest_index(std::vector< size_t > &sort_index, size_t k, const VectorBase &invec)
bool equal(const VectorBase &, const double precision=0) const
Check whether VectorBases are equal within a user defined precision, set by precision.
T max(const T &a, const T &b, const T &c)
Definition: stl_utility.h:699
const_iterator end(void) const
This is the yat interface to GSL vector.
Definition: Vector.h:59
This is the yat interface to GSL vector.
Definition: VectorBase.h:55
virtual bool isview(void) const =0
void sort_index(InputIterator first, InputIterator last, std::vector< size_t > &sort_index)
Definition: sort_index.h:146
Definition: BasicVector.h:48
const double & const_reference
Definition: VectorBase.h:70
VectorBase(const gsl_vector *v=NULL)
Constructor.
virtual ~VectorBase(void)
const double & operator()(size_t i) const
Element access operator.
double operator*(const VectorBase &) const
void sort_largest_index(std::vector< size_t > &sort_index, size_t k, const VectorBase &invec)
Adaptor using a stride on underlying iterator.
Definition: StrideIterator.h:50
bool overlap(const yat::utility::Segment< T, Compare > &lhs, const yat::utility::Segment< T, Compare > &rhs)
Definition: Segment.h:322
bool operator!=(const VectorBase &) const
Comparison operator. Takes linear time.