Chi-Tech
|
#include <dynamic_vector.h>
Public Member Functions | |
DynamicVector () | |
DynamicVector (size_t N) | |
DynamicVector (size_t N, NumberFormat value) | |
DynamicVector (const DynamicVector &other) | |
DynamicVector & | operator= (const DynamicVector &other) |
DynamicVector (DynamicVector &&other) noexcept | |
DynamicVector & | operator= (DynamicVector &&other) noexcept |
DynamicVector (const std::vector< double > &in) | |
DynamicVector & | operator= (const std::vector< double > &in) |
DynamicVector (std::initializer_list< NumberFormat > in) | |
DynamicVector & | operator= (std::initializer_list< NumberFormat > in) |
NumberFormat & | operator[] (size_t i) |
const NumberFormat & | operator[] (size_t i) const |
NumberFormat & | at (size_t i) |
NumberFormat & | back () |
NumberFormat & | front () |
NumberFormat * | data () |
void | clear () |
void | resize (size_t dim) |
void | resize (size_t dim, const NumberFormat &val) |
void | reserve (size_t dim) |
void | push_back (const NumberFormat &val) |
void | pop_back () |
bool | empty () const noexcept |
std::vector< NumberFormat >::iterator | begin () |
std::vector< NumberFormat >::iterator | end () |
size_t | size () const |
void | bounds_check (const size_t a, const size_t b) const |
DynamicVector | operator+ (const DynamicVector &rhs) const |
DynamicVector & | operator+= (const DynamicVector &rhs) |
DynamicVector | operator- (const DynamicVector &rhs) const |
DynamicVector & | operator-= (const DynamicVector &rhs) |
DynamicVector | operator* (const NumberFormat value) const |
DynamicVector & | operator*= (const NumberFormat value) |
DynamicVector | operator* (const DynamicVector &rhs) const |
DynamicVector & | operator*= (const DynamicVector &rhs) |
DynamicVector | operator/ (const NumberFormat value) const |
DynamicVector & | operator/= (const NumberFormat value) |
DynamicVector | operator/ (const DynamicVector &rhs) const |
DynamicVector & | operator/= (const DynamicVector &rhs) |
NumberFormat | Dot (const DynamicVector &rhs) const |
NumberFormat | Norm () const |
NumberFormat | NormSquare () const |
void | Normalize () |
DynamicVector | Normalized () const |
void | Set (NumberFormat value) |
std::string | PrintStr () const |
Data Fields | |
std::vector< NumberFormat > | elements_ |
General dynamic vector utility.
Definition at line 22 of file dynamic_vector.h.
|
inline |
Default constructor. Does nothing.
Definition at line 28 of file dynamic_vector.h.
|
inlineexplicit |
Constructor with number of entries. Value defaults.
Definition at line 36 of file dynamic_vector.h.
|
inline |
Constructor with number of entries and default value.
Definition at line 44 of file dynamic_vector.h.
|
inline |
Copy constructor.
Definition at line 52 of file dynamic_vector.h.
|
inlinenoexcept |
Move constructor.
Definition at line 62 of file dynamic_vector.h.
|
inlineexplicit |
Constructor with vector.
Definition at line 75 of file dynamic_vector.h.
|
inline |
Constructor with vector.
Definition at line 85 of file dynamic_vector.h.
|
inline |
Definition at line 98 of file dynamic_vector.h.
|
inline |
Definition at line 100 of file dynamic_vector.h.
|
inline |
Definition at line 124 of file dynamic_vector.h.
|
inline |
Definition at line 133 of file dynamic_vector.h.
|
inline |
Definition at line 106 of file dynamic_vector.h.
|
inline |
Definition at line 104 of file dynamic_vector.h.
|
inline |
Vector dot-product.
Definition at line 279 of file dynamic_vector.h.
|
inlinenoexcept |
Definition at line 121 of file dynamic_vector.h.
|
inline |
Definition at line 129 of file dynamic_vector.h.
|
inline |
Definition at line 102 of file dynamic_vector.h.
|
inline |
Computes the L2-norm of the vector. Otherwise known as the length of a 3D vector.
Definition at line 291 of file dynamic_vector.h.
|
inline |
Normalizes the vector in-place.
Definition at line 314 of file dynamic_vector.h.
|
inline |
Returns a normalized version of the vector.
Definition at line 322 of file dynamic_vector.h.
|
inline |
Computes the square of the L2-norm of the vector. This eliminates the usage of the square root and is therefore less expensive that a proper L2-norm. Useful if only comparing distances.
Definition at line 304 of file dynamic_vector.h.
|
inline |
Vector component-wise multiplication.
Definition at line 210 of file dynamic_vector.h.
|
inline |
Vector component-wise multiplication by scalar.
Definition at line 189 of file dynamic_vector.h.
|
inline |
Vector in-place component-wise multiplication.
Definition at line 222 of file dynamic_vector.h.
|
inline |
Vector in-place component-wise multiplication by scalar.
Definition at line 200 of file dynamic_vector.h.
|
inline |
Component-wise addition of two vectors.
Definition at line 141 of file dynamic_vector.h.
|
inline |
In-place component-wise addition of two vectors.
Definition at line 153 of file dynamic_vector.h.
|
inline |
Component-wise subtraction.
Definition at line 165 of file dynamic_vector.h.
|
inline |
In-place component-wise subtraction.
Definition at line 177 of file dynamic_vector.h.
|
inline |
Vector component-wise division.
Definition at line 255 of file dynamic_vector.h.
|
inline |
Vector component-wise division by scalar.
Definition at line 234 of file dynamic_vector.h.
|
inline |
Vector in-place component-wise division.
Definition at line 267 of file dynamic_vector.h.
|
inline |
Vector in-place component-wise division by scalar.
Definition at line 245 of file dynamic_vector.h.
|
inline |
Assignment operator.
Definition at line 55 of file dynamic_vector.h.
|
inline |
Copy constructor with vector.
Definition at line 78 of file dynamic_vector.h.
|
inlinenoexcept |
Move assignment operator.
Definition at line 68 of file dynamic_vector.h.
|
inline |
Copy constructor with vector.
Definition at line 88 of file dynamic_vector.h.
|
inline |
Definition at line 95 of file dynamic_vector.h.
|
inline |
Definition at line 96 of file dynamic_vector.h.
|
inline |
Definition at line 119 of file dynamic_vector.h.
|
inline |
Prints the vector to a string and then returns the string.
Definition at line 340 of file dynamic_vector.h.
|
inline |
Definition at line 118 of file dynamic_vector.h.
|
inline |
Definition at line 116 of file dynamic_vector.h.
|
inline |
Definition at line 108 of file dynamic_vector.h.
|
inline |
Definition at line 109 of file dynamic_vector.h.
|
inline |
Sets all the elements of the vector to the specified value.
Definition at line 333 of file dynamic_vector.h.
|
inline |
Definition at line 131 of file dynamic_vector.h.
std::vector<NumberFormat> chi_math::DynamicVector< NumberFormat >::elements_ |
Definition at line 25 of file dynamic_vector.h.