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> 88 const_iterator
begin(
void)
const;
93 const_iterator
end(
void)
const;
117 virtual bool isview(
void)
const=0;
122 size_t size(
void)
const;
314 gsl_vector* create_gsl_vector(
size_t n);
319 gsl_vector* create_gsl_vector(
size_t n,
double init);
332 gsl_vector* create_gsl_vector_copy(
const gsl_vector*);
336 bool overlap(
const gsl_vector* a,
const gsl_vector* b);
353 bool serial_overlap(
const gsl_vector* a,
const gsl_vector* b);
const gsl_vector * gsl_vector_p(void) const
const double & operator()(size_t i) const
Element access operator.
std::ostream & operator<<(std::ostream &s, const VectorBase &v)
The output operator for the VectorBase class.
double value_type
Definition: VectorBase.h:63
void sort_largest_index(std::vector< size_t > &sort_index, size_t k, const VectorBase &invec)
size_t min_index(const VectorBase &)
Locate the minimum value in the VectorBase.
The Department of Theoretical Physics namespace as we define it.
bool operator!=(const VectorBase &) const
Comparison operator. Takes linear time.
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
double max(const VectorBase &)
Get the maximum value of the VectorBase.
bool nan(const VectorBase &templat, Vector &flag)
Create a VectorBase flag indicating NaN's in another VectorBase templat.
const_iterator begin(void) const
bool operator==(const VectorBase &) const
Comparison operator. Takes linear time.
double sum(const VectorBase &)
Calculate the sum of all VectorBase elements.
void sort_smallest_index(std::vector< size_t > &sort_index, size_t k, const VectorBase &invec)
This is the yat interface to GSL vector.
Definition: Vector.h:59
This is the yat interface to GSL vector.
Definition: VectorBase.h:55
void sort_index(std::vector< size_t > &sort_index, const VectorBase &invec)
double operator*(const VectorBase &) const
bool equal(const VectorBase &, const double precision=0) const
Check whether VectorBases are equal within a user defined precision, set by precision.
double min(const VectorBase &)
Get the minimum value of the VectorBase.
const_iterator end(void) const
Definition: BasicVector.h:48
const double & const_reference
Definition: VectorBase.h:70
VectorBase(const gsl_vector *v=NULL)
Constructor.
virtual ~VectorBase(void)
bool isnull(const VectorBase &)
Check if all elements of the VectorBase are zero.
virtual bool isview(void) const =0
size_t max_index(const VectorBase &)
Locate the maximum value in the VectorBase.
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:310