DD-AVX  2.0.0
All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
dd_real_vector Class Reference

Double-double precision vector class. More...

#include <DD-AVX_dd_vector.hpp>

Collaboration diagram for dd_real_vector:
Collaboration graph

Public Member Functions

 dd_real_vector ()
 
 dd_real_vector (int n)
 create size N DD vector More...
 
 dd_real_vector (int n, double val)
 create size N, all element is val DD vector More...
 
 dd_real_vector (int n, dd_real val)
 create size N, all element is val DD vector More...
 
dd_real_vector_ref operator[] (int i)
 get vec[i] value More...
 
 operator std::vector< double > ()
 down cast to std::vector<double> More...
 
 operator double * ()
 down cast to double precision array More...
 
 operator d_real_vector ()
 down cast to d_real_vector More...
 
int size () const
 get size More...
 
double * data ()
 get hi array pointer More...
 
double * hi_data ()
 get hi array pointer More...
 
double * lo_data ()
 get lo array pointer More...
 
std::vector< double > HI ()
 get hi array pointer More...
 
std::vector< double > LO ()
 get lo array pointer More...
 
dd_real at (int i)
 get vec[i] value More...
 
void print_all ()
 output all elements to standard I/O More...
 
void print (int i)
 output vec[i] to standard I/O More...
 
void input (const char *filename)
 create vector from file More...
 
void input_mm (FILE *file)
 create vector from matrix market file More...
 
void input_plane (FILE *file)
 create vector from plane file More...
 
void output_mm (const char *filename)
 output vector to matrix market file More...
 
void output_plane (const char *filename)
 output vector to plane file More...
 
void resize (int n)
 resize, this method is almost same as std::vector More...
 
void resize (int n, double val)
 resize, this method is almost same as std::vector More...
 
void resize (int n, dd_real val)
 resize, this method is almost same as std::vector More...
 
void push_back (const double val)
 push_back, this method is almost same as std::vector More...
 
void push_back (const dd_real val)
 push_back, this method is almost same as std::vector More...
 
void clear ()
 clear, this method is almost same as std::vector More...
 
void copy (const dd_real_vector &vec)
 copy from dd_real_vector More...
 
void copy (const d_real_vector &vec)
 copy from d_real_vector More...
 
void copy (const std::vector< double > &vec)
 copy from std::vector<double> More...
 
void copy (const std::vector< dd_real > &vec)
 copy from std::vector<dd_real> More...
 
dd_real_vectoroperator= (const dd_real_vector &vec)
 copy from dd_real_vector More...
 
dd_real_vectoroperator= (const d_real_vector &vec)
 copy from d_real_vector More...
 
dd_real_vectoroperator= (const std::vector< double > &vec)
 copy from std::vector<double> More...
 
dd_real_vectoroperator= (const std::vector< dd_real > &vec)
 copy from std::vector<dd_real> More...
 
bool operator== (const dd_real_vector &vec)
 comparision function More...
 
bool operator== (const d_real_vector &vec)
 comparision function More...
 
bool operator== (const std::vector< double > &vec)
 comparision function More...
 
bool operator== (const std::vector< dd_real > &vec)
 comparision function More...
 
bool operator!= (const dd_real_vector &vec)
 comparision function More...
 
bool operator!= (const d_real_vector &vec)
 comparision function More...
 
bool operator!= (const std::vector< double > &vec)
 comparision function More...
 
bool operator!= (const std::vector< dd_real > &vec)
 comparision function More...
 
void minus ()
 sign More...
 
dd_real_vector operator- ()
 sign More...
 
void add (dd_real_vector &vec1, dd_real_vector &vec2)
 all elemetnt arithmetic function More...
 
void add (d_real_vector &vec1, dd_real_vector &vec2)
 all elemetnt arithmetic function More...
 
void add (dd_real_vector &vec1, d_real_vector &vec2)
 all elemetnt arithmetic function More...
 
void add (d_real_vector &vec1, d_real_vector &vec2)
 all elemetnt arithmetic function More...
 
dd_real_vector operator+ (dd_real_vector &vec)
 all elemetnt arithmetic function More...
 
dd_real_vector operator+ (d_real_vector &vec)
 all elemetnt arithmetic function More...
 
dd_real_vector operator+= (dd_real_vector &vec)
 all elemetnt arithmetic function More...
 
dd_real_vector operator+= (d_real_vector &vec)
 all elemetnt arithmetic function More...
 
void sub (dd_real_vector &vec1, dd_real_vector &vec2)
 all elemetnt arithmetic function More...
 
void sub (d_real_vector &vec1, dd_real_vector &vec2)
 all elemetnt arithmetic function More...
 
void sub (dd_real_vector &vec1, d_real_vector &vec2)
 all elemetnt arithmetic function More...
 
void sub (d_real_vector &vec1, d_real_vector &vec2)
 all elemetnt arithmetic function More...
 
dd_real_vector operator- (dd_real_vector &vec)
 all elemetnt arithmetic function More...
 
dd_real_vector operator- (d_real_vector &vec)
 all elemetnt arithmetic function More...
 
dd_real_vector operator-= (dd_real_vector &vec)
 all elemetnt arithmetic function More...
 
dd_real_vector operator-= (d_real_vector &vec)
 all elemetnt arithmetic function More...
 
void mul (dd_real_vector &vec1, dd_real_vector &vec2)
 all elemetnt arithmetic function More...
 
void mul (d_real_vector &vec1, dd_real_vector &vec2)
 all elemetnt arithmetic function More...
 
void mul (dd_real_vector &vec1, d_real_vector &vec2)
 all elemetnt arithmetic function More...
 
void mul (d_real_vector &vec1, d_real_vector &vec2)
 all elemetnt arithmetic function More...
 
dd_real_vector operator* (dd_real_vector &vec)
 all elemetnt arithmetic function More...
 
dd_real_vector operator* (d_real_vector &vec)
 all elemetnt arithmetic function More...
 
dd_real_vector operator*= (dd_real_vector &vec)
 all elemetnt arithmetic function More...
 
dd_real_vector operator*= (d_real_vector &vec)
 all elemetnt arithmetic function More...
 
void div (dd_real_vector &vec1, dd_real_vector &vec2)
 all elemetnt arithmetic function More...
 
void div (d_real_vector &vec1, dd_real_vector &vec2)
 all elemetnt arithmetic function More...
 
void div (dd_real_vector &vec1, d_real_vector &vec2)
 all elemetnt arithmetic function More...
 
void div (d_real_vector &vec1, d_real_vector &vec2)
 all elemetnt arithmetic function More...
 
dd_real_vector operator/ (dd_real_vector &vec)
 all elemetnt arithmetic function More...
 
dd_real_vector operator/ (d_real_vector &vec)
 all elemetnt arithmetic function More...
 
dd_real_vector operator/= (dd_real_vector &vec)
 all elemetnt arithmetic function More...
 
dd_real_vector operator/= (d_real_vector &vec)
 all elemetnt arithmetic function More...
 

Public Attributes

std::vector< double > hi
 
std::vector< double > lo
 

Private Attributes

int N =0
 

Detailed Description

Double-double precision vector class.

Definition at line 66 of file DD-AVX_dd_vector.hpp.

Constructor & Destructor Documentation

◆ dd_real_vector() [1/4]

dd_real_vector::dd_real_vector ( )
inline

Definition at line 74 of file DD-AVX_dd_vector.hpp.

◆ dd_real_vector() [2/4]

dd_real_vector::dd_real_vector ( int  n)
inline

create size N DD vector

Definition at line 77 of file DD-AVX_dd_vector.hpp.

◆ dd_real_vector() [3/4]

dd_real_vector::dd_real_vector ( int  n,
double  val 
)
inline

create size N, all element is val DD vector

Definition at line 84 of file DD-AVX_dd_vector.hpp.

◆ dd_real_vector() [4/4]

dd_real_vector::dd_real_vector ( int  n,
dd_real  val 
)
inline

create size N, all element is val DD vector

Definition at line 91 of file DD-AVX_dd_vector.hpp.

Member Function Documentation

◆ operator[]()

dd_real_vector_ref dd_real_vector::operator[] ( int  i)
inline

get vec[i] value

Definition at line 98 of file DD-AVX_dd_vector.hpp.

◆ operator std::vector< double >()

dd_real_vector::operator std::vector< double > ( )

down cast to std::vector<double>

◆ operator double *()

dd_real_vector::operator double * ( )

down cast to double precision array

◆ operator d_real_vector()

dd_real_vector::operator d_real_vector ( )

down cast to d_real_vector

◆ size()

int dd_real_vector::size ( ) const
inline

get size

Definition at line 113 of file DD-AVX_dd_vector.hpp.

Here is the caller graph for this function:

◆ data()

double* dd_real_vector::data ( )
inline

get hi array pointer

Definition at line 116 of file DD-AVX_dd_vector.hpp.

Here is the caller graph for this function:

◆ hi_data()

double* dd_real_vector::hi_data ( )
inline

get hi array pointer

Definition at line 118 of file DD-AVX_dd_vector.hpp.

◆ lo_data()

double* dd_real_vector::lo_data ( )
inline

get lo array pointer

Definition at line 120 of file DD-AVX_dd_vector.hpp.

◆ HI()

std::vector<double> dd_real_vector::HI ( )
inline

get hi array pointer

Definition at line 123 of file DD-AVX_dd_vector.hpp.

◆ LO()

std::vector<double> dd_real_vector::LO ( )
inline

get lo array pointer

Definition at line 125 of file DD-AVX_dd_vector.hpp.

◆ at()

dd_real dd_real_vector::at ( int  i)
inline

get vec[i] value

Definition at line 128 of file DD-AVX_dd_vector.hpp.

◆ print_all()

void dd_real_vector::print_all ( )
inline

output all elements to standard I/O

Definition at line 137 of file DD-AVX_dd_vector.hpp.

◆ print()

void dd_real_vector::print ( int  i)
inline

output vec[i] to standard I/O

Definition at line 139 of file DD-AVX_dd_vector.hpp.

◆ input()

void dd_real_vector::input ( const char *  filename)

create vector from file

◆ input_mm()

void dd_real_vector::input_mm ( FILE *  file)

create vector from matrix market file

◆ input_plane()

void dd_real_vector::input_plane ( FILE *  file)

create vector from plane file

◆ output_mm()

void dd_real_vector::output_mm ( const char *  filename)

output vector to matrix market file

◆ output_plane()

void dd_real_vector::output_plane ( const char *  filename)

output vector to plane file

◆ resize() [1/3]

void dd_real_vector::resize ( int  n)
inline

resize, this method is almost same as std::vector

Definition at line 154 of file DD-AVX_dd_vector.hpp.

Here is the caller graph for this function:

◆ resize() [2/3]

void dd_real_vector::resize ( int  n,
double  val 
)
inline

resize, this method is almost same as std::vector

Definition at line 161 of file DD-AVX_dd_vector.hpp.

◆ resize() [3/3]

void dd_real_vector::resize ( int  n,
dd_real  val 
)
inline

resize, this method is almost same as std::vector

Definition at line 168 of file DD-AVX_dd_vector.hpp.

◆ push_back() [1/2]

void dd_real_vector::push_back ( const double  val)
inline

push_back, this method is almost same as std::vector

Definition at line 175 of file DD-AVX_dd_vector.hpp.

◆ push_back() [2/2]

void dd_real_vector::push_back ( const dd_real  val)
inline

push_back, this method is almost same as std::vector

Definition at line 182 of file DD-AVX_dd_vector.hpp.

◆ clear()

void dd_real_vector::clear ( )
inline

clear, this method is almost same as std::vector

Definition at line 189 of file DD-AVX_dd_vector.hpp.

◆ copy() [1/4]

void dd_real_vector::copy ( const dd_real_vector vec)

copy from dd_real_vector

Definition at line 48 of file vector_copy.cpp.

Here is the caller graph for this function:

◆ copy() [2/4]

void dd_real_vector::copy ( const d_real_vector vec)

copy from d_real_vector

Definition at line 55 of file vector_copy.cpp.

◆ copy() [3/4]

void dd_real_vector::copy ( const std::vector< double > &  vec)

copy from std::vector<double>

Definition at line 62 of file vector_copy.cpp.

◆ copy() [4/4]

void dd_real_vector::copy ( const std::vector< dd_real > &  vec)

copy from std::vector<dd_real>

Definition at line 69 of file vector_copy.cpp.

◆ operator=() [1/4]

dd_real_vector & dd_real_vector::operator= ( const dd_real_vector vec)

copy from dd_real_vector

Definition at line 81 of file vector_copy.cpp.

◆ operator=() [2/4]

dd_real_vector & dd_real_vector::operator= ( const d_real_vector vec)

copy from d_real_vector

Definition at line 86 of file vector_copy.cpp.

◆ operator=() [3/4]

dd_real_vector & dd_real_vector::operator= ( const std::vector< double > &  vec)

copy from std::vector<double>

Definition at line 91 of file vector_copy.cpp.

◆ operator=() [4/4]

dd_real_vector & dd_real_vector::operator= ( const std::vector< dd_real > &  vec)

copy from std::vector<dd_real>

Definition at line 96 of file vector_copy.cpp.

◆ operator==() [1/4]

bool dd_real_vector::operator== ( const dd_real_vector vec)

comparision function

Definition at line 64 of file vector_comparison.cpp.

◆ operator==() [2/4]

bool dd_real_vector::operator== ( const d_real_vector vec)

comparision function

Definition at line 73 of file vector_comparison.cpp.

◆ operator==() [3/4]

bool dd_real_vector::operator== ( const std::vector< double > &  vec)

comparision function

Definition at line 81 of file vector_comparison.cpp.

◆ operator==() [4/4]

bool dd_real_vector::operator== ( const std::vector< dd_real > &  vec)

comparision function

Definition at line 89 of file vector_comparison.cpp.

◆ operator!=() [1/4]

bool dd_real_vector::operator!= ( const dd_real_vector vec)

comparision function

=

Definition at line 102 of file vector_comparison.cpp.

◆ operator!=() [2/4]

bool dd_real_vector::operator!= ( const d_real_vector vec)

comparision function

Definition at line 107 of file vector_comparison.cpp.

◆ operator!=() [3/4]

bool dd_real_vector::operator!= ( const std::vector< double > &  vec)

comparision function

Definition at line 112 of file vector_comparison.cpp.

◆ operator!=() [4/4]

bool dd_real_vector::operator!= ( const std::vector< dd_real > &  vec)

comparision function

Definition at line 117 of file vector_comparison.cpp.

◆ minus()

void dd_real_vector::minus ( )

sign

Definition at line 4 of file vector_minus.cpp.

◆ operator-() [1/3]

dd_real_vector dd_real_vector::operator- ( )

sign

Definition at line 38 of file vector_minus.cpp.

◆ add() [1/4]

void dd_real_vector::add ( dd_real_vector vec1,
dd_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 9 of file vector_add_dd.cpp.

◆ add() [2/4]

void dd_real_vector::add ( d_real_vector vec1,
dd_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 42 of file vector_add_dd.cpp.

◆ add() [3/4]

void dd_real_vector::add ( dd_real_vector vec1,
d_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 76 of file vector_add_dd.cpp.

◆ add() [4/4]

void dd_real_vector::add ( d_real_vector vec1,
d_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 81 of file vector_add_dd.cpp.

◆ operator+() [1/2]

dd_real_vector dd_real_vector::operator+ ( dd_real_vector vec)

all elemetnt arithmetic function

Definition at line 118 of file vector_add_dd.cpp.

◆ operator+() [2/2]

dd_real_vector dd_real_vector::operator+ ( d_real_vector vec)

all elemetnt arithmetic function

Definition at line 130 of file vector_add_dd.cpp.

◆ operator+=() [1/2]

dd_real_vector dd_real_vector::operator+= ( dd_real_vector vec)

all elemetnt arithmetic function

Definition at line 124 of file vector_add_dd.cpp.

◆ operator+=() [2/2]

dd_real_vector dd_real_vector::operator+= ( d_real_vector vec)

all elemetnt arithmetic function

Definition at line 136 of file vector_add_dd.cpp.

◆ sub() [1/4]

void dd_real_vector::sub ( dd_real_vector vec1,
dd_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 9 of file vector_sub_dd.cpp.

◆ sub() [2/4]

void dd_real_vector::sub ( d_real_vector vec1,
dd_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 44 of file vector_sub_dd.cpp.

◆ sub() [3/4]

void dd_real_vector::sub ( dd_real_vector vec1,
d_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 79 of file vector_sub_dd.cpp.

◆ sub() [4/4]

void dd_real_vector::sub ( d_real_vector vec1,
d_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 115 of file vector_sub_dd.cpp.

◆ operator-() [2/3]

dd_real_vector dd_real_vector::operator- ( dd_real_vector vec)

all elemetnt arithmetic function

Definition at line 133 of file vector_sub_dd.cpp.

◆ operator-() [3/3]

dd_real_vector dd_real_vector::operator- ( d_real_vector vec)

all elemetnt arithmetic function

Definition at line 145 of file vector_sub_dd.cpp.

◆ operator-=() [1/2]

dd_real_vector dd_real_vector::operator-= ( dd_real_vector vec)

all elemetnt arithmetic function

Definition at line 139 of file vector_sub_dd.cpp.

◆ operator-=() [2/2]

dd_real_vector dd_real_vector::operator-= ( d_real_vector vec)

all elemetnt arithmetic function

Definition at line 151 of file vector_sub_dd.cpp.

◆ mul() [1/4]

void dd_real_vector::mul ( dd_real_vector vec1,
dd_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 9 of file vector_mul_dd.cpp.

◆ mul() [2/4]

void dd_real_vector::mul ( d_real_vector vec1,
dd_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 75 of file vector_mul_dd.cpp.

◆ mul() [3/4]

void dd_real_vector::mul ( dd_real_vector vec1,
d_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 42 of file vector_mul_dd.cpp.

◆ mul() [4/4]

void dd_real_vector::mul ( d_real_vector vec1,
d_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 80 of file vector_mul_dd.cpp.

◆ operator*() [1/2]

dd_real_vector dd_real_vector::operator* ( dd_real_vector vec)

all elemetnt arithmetic function

Definition at line 117 of file vector_mul_dd.cpp.

◆ operator*() [2/2]

dd_real_vector dd_real_vector::operator* ( d_real_vector vec)

all elemetnt arithmetic function

Definition at line 129 of file vector_mul_dd.cpp.

◆ operator*=() [1/2]

dd_real_vector dd_real_vector::operator*= ( dd_real_vector vec)

all elemetnt arithmetic function

Definition at line 123 of file vector_mul_dd.cpp.

◆ operator*=() [2/2]

dd_real_vector dd_real_vector::operator*= ( d_real_vector vec)

all elemetnt arithmetic function

Definition at line 135 of file vector_mul_dd.cpp.

◆ div() [1/4]

void dd_real_vector::div ( dd_real_vector vec1,
dd_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 9 of file vector_div_dd.cpp.

◆ div() [2/4]

void dd_real_vector::div ( d_real_vector vec1,
dd_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 31 of file vector_div_dd.cpp.

◆ div() [3/4]

void dd_real_vector::div ( dd_real_vector vec1,
d_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 54 of file vector_div_dd.cpp.

◆ div() [4/4]

void dd_real_vector::div ( d_real_vector vec1,
d_real_vector vec2 
)

all elemetnt arithmetic function

Definition at line 76 of file vector_div_dd.cpp.

◆ operator/() [1/2]

dd_real_vector dd_real_vector::operator/ ( dd_real_vector vec)

all elemetnt arithmetic function

Definition at line 102 of file vector_div_dd.cpp.

◆ operator/() [2/2]

dd_real_vector dd_real_vector::operator/ ( d_real_vector vec)

all elemetnt arithmetic function

Definition at line 114 of file vector_div_dd.cpp.

◆ operator/=() [1/2]

dd_real_vector dd_real_vector::operator/= ( dd_real_vector vec)

all elemetnt arithmetic function

Definition at line 108 of file vector_div_dd.cpp.

◆ operator/=() [2/2]

dd_real_vector dd_real_vector::operator/= ( d_real_vector vec)

all elemetnt arithmetic function

Definition at line 120 of file vector_div_dd.cpp.

Member Data Documentation

◆ N

int dd_real_vector::N =0
private

Definition at line 69 of file DD-AVX_dd_vector.hpp.

◆ hi

std::vector<double> dd_real_vector::hi

Definition at line 72 of file DD-AVX_dd_vector.hpp.

◆ lo

std::vector<double> dd_real_vector::lo

Definition at line 73 of file DD-AVX_dd_vector.hpp.


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