20 #ifndef LIBMESH_DENSE_VECTOR_BASE_H 21 #define LIBMESH_DENSE_VECTOR_BASE_H 25 #include "libmesh/libmesh_common.h" 26 #include "libmesh/int_range.h" 65 virtual void zero() = 0;
70 virtual T
el(
const unsigned int i)
const = 0;
75 virtual T &
el(
const unsigned int i) = 0;
80 virtual unsigned int size()
const = 0;
85 virtual bool empty()
const {
return (this->
size() == 0); }
90 void print(std::ostream & os)
const;
96 friend std::ostream & operator << (std::ostream & os, const DenseVectorBase<T> & v)
122 #endif // LIBMESH_DENSE_VECTOR_BASE_H The libMesh namespace provides an interface to certain functionality in the library.
virtual void zero()=0
Set every element in the vector to 0.
DenseVectorBase & operator=(const DenseVectorBase &)=default
virtual unsigned int size() const =0
void print_scientific(std::ostream &os, unsigned precision=8) const
Prints the entries of the vector with additional decimal places in scientific notation.
void print(std::ostream &os) const
Pretty-print the vector to stdout.
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
virtual ~DenseVectorBase()=default
DenseVectorBase()=default
Constructor.
virtual T el(const unsigned int i) const =0
virtual bool empty() const