softsusy is hosted by Hepforge, IPPP Durham
DoubleVector Class Reference

DoubleVector is of variable length, and contains double precision. More...

#include <linalg.h>

Inheritance diagram for DoubleVector:
Indexable< double, DoubleVector >

Public Member Functions

 DoubleVector (int e)
 DoubleVector (int s, int e)
 DoubleVector (double a, double b)
template<class E >
DoubleVectoroperator= (const Xpr< double, E > &x)
 this is the only required operator to make this class work with ETs
DoubleVectoroperator= (const DoubleVector &other)
template<typename E >
 DoubleVector (const Xpr< double, E > &v)
double & operator() (int i)
 Reference a single element.
double operator() (int i) const
double display (int i) const
 display one element
void set (int i, double f)
 sets ith element
int displayStart () const
 start of dimension
int displayEnd () const
 returns end of dimension
const DoubleVectordisplay () const
 returns whole thing
double compare (const DoubleVector &a) const
void append (double)
 appends an element at the end
void setEnd (int e)
DoubleVector abs () const
 returns absolute of vector
double norm () const
DoubleVector apply (double(*fn)(double)) const
 applies fn to every element in a vector
double nmin (int &p) const
double max () const
 maximum element in vector
double max (int &p) const
double min (int &p) const
 minimum element in vector
double absmax (int &p) const
 returns absolute maximum
double sumElements () const
 Returns sum of absolute values of all elements.
std::size_t size () const
void swap (int i, int j)
 swaps ith and jth elements of a vector
double dot (const DoubleVector &v) const
DoubleVector sort () const
DoubleVector divide (DoubleVector const &v) const
 Acts on each, element by element, dividing each element by v(i)
double average () const
 Average element of the vector. More...
int closest (double a) const
 Closest element of the vector to the input.
void fillArray (double *array, unsigned offset=0) const
 fill array, starting at offset
- Public Member Functions inherited from Indexable< double, DoubleVector >
double operator() (int n) const
int displayStart () const
int displayEnd () const
DoubleVectorassign_from (const Xpr< double, E > &x)
DoubleVector copy_from (const Xpr< double, E > &x)
Indexableoperator+= (const Xpr< double, E > &x)
Indexableoperator-= (const Xpr< double, E > &x)
Indexableoperator*= (double x)


class DoubleMatrix

Detailed Description

DoubleVector is of variable length, and contains double precision.

Constructor & Destructor Documentation

◆ DoubleVector() [1/2]

DoubleVector::DoubleVector ( int  e)
eDefault dimensions start at 1, end at e

◆ DoubleVector() [2/2]

DoubleVector::DoubleVector ( int  s,
int  e 
eDimensions start at s, end at e

Member Function Documentation

◆ average()

double DoubleVector::average ( ) const

Average element of the vector.

average element

◆ dot()

double DoubleVector::dot ( const DoubleVector v) const

< dot product

◆ setEnd()

void DoubleVector::setEnd ( int  e)

Changes the length of a vector - copies as many elements of old one as possible, and fills any extra up with zeroes

The documentation for this class was generated from the following files: