HDK
|
Lightweight, variable-length vector. More...
#include <ConjGradient.h>
Classes | |
struct | DeterministicDotProductOp |
struct | InfNormOp |
struct | IsFiniteOp |
Public Types | |
using | ValueType = T |
using | Ptr = SharedPtr< Vector > |
Public Member Functions | |
Vector () | |
Construct an empty vector. More... | |
Vector (SizeType n) | |
Construct a vector of n elements, with uninitialized values. More... | |
Vector (SizeType n, const ValueType &val) | |
Construct a vector of n elements and initialize each element to the given value. More... | |
~Vector () | |
Vector (const Vector &) | |
Deep copy the given vector. More... | |
Vector & | operator= (const Vector &) |
Deep copy the given vector. More... | |
SizeType | size () const |
Return the number of elements in this vector. More... | |
bool | empty () const |
Return true if this vector has no elements. More... | |
void | resize (SizeType n) |
Reset this vector to have n elements, with uninitialized values. More... | |
void | swap (Vector &other) |
Swap internal storage with another vector, which need not be the same size. More... | |
void | fill (const ValueType &value) |
Set all elements of this vector to value. More... | |
ValueType | dot (const Vector &) const |
Return the dot product of this vector with the given vector, which must be the same size. More... | |
ValueType | infNorm () const |
Return the infinity norm of this vector. More... | |
ValueType | l2Norm () const |
Return the L2 norm of this vector. More... | |
bool | isFinite () const |
Return true if every element of this vector has a finite value. More... | |
template<typename OtherValueType > | |
bool | eq (const Vector< OtherValueType > &other, ValueType eps=Tolerance< ValueType >::value()) const |
Return true if this vector is equivalent to the given vector to within the specified tolerance. More... | |
std::string | str () const |
Return a string representation of this vector. More... | |
template<typename Scalar > | |
void | scale (const Scalar &s) |
Multiply each element of this vector by s. More... | |
template<typename Scalar > | |
Vector & | operator*= (const Scalar &s) |
Multiply each element of this vector by s. More... | |
T & | at (SizeType i) |
Return the value of this vector's ith element. More... | |
const T & | at (SizeType i) const |
Return the value of this vector's ith element. More... | |
T & | operator[] (SizeType i) |
Return the value of this vector's ith element. More... | |
const T & | operator[] (SizeType i) const |
Return the value of this vector's ith element. More... | |
T * | data () |
Return a pointer to this vector's elements. More... | |
const T * | data () const |
Return a pointer to this vector's elements. More... | |
const T * | constData () const |
Return a pointer to this vector's elements. More... | |
Lightweight, variable-length vector.
Definition at line 37 of file ConjGradient.h.
using openvdb::OPENVDB_VERSION_NAME::math::pcg::Vector< ValueType >::Ptr = SharedPtr<Vector> |
Definition at line 142 of file ConjGradient.h.
using openvdb::OPENVDB_VERSION_NAME::math::pcg::Vector< ValueType >::ValueType = T |
Definition at line 141 of file ConjGradient.h.
|
inline |
Construct an empty vector.
Definition at line 145 of file ConjGradient.h.
|
inline |
Construct a vector of n elements, with uninitialized values.
Definition at line 147 of file ConjGradient.h.
|
inline |
Construct a vector of n elements and initialize each element to the given value.
Definition at line 149 of file ConjGradient.h.
|
inline |
Definition at line 151 of file ConjGradient.h.
|
inline |
Deep copy the given vector.
Definition at line 559 of file ConjGradient.h.
|
inline |
Return the value of this vector's ith element.
Definition at line 201 of file ConjGradient.h.
|
inline |
Return the value of this vector's ith element.
Definition at line 202 of file ConjGradient.h.
|
inline |
Return a pointer to this vector's elements.
Definition at line 211 of file ConjGradient.h.
|
inline |
Return a pointer to this vector's elements.
Definition at line 209 of file ConjGradient.h.
|
inline |
Return a pointer to this vector's elements.
Definition at line 210 of file ConjGradient.h.
|
inline |
Return the dot product of this vector with the given vector, which must be the same size.
Definition at line 664 of file ConjGradient.h.
|
inline |
Return true
if this vector has no elements.
Definition at line 161 of file ConjGradient.h.
|
inline |
Return true
if this vector is equivalent to the given vector to within the specified tolerance.
Definition at line 788 of file ConjGradient.h.
|
inline |
Set all elements of this vector to value.
Definition at line 600 of file ConjGradient.h.
|
inline |
Return the infinity norm of this vector.
Definition at line 723 of file ConjGradient.h.
|
inline |
Return true
if every element of this vector has a finite value.
Definition at line 753 of file ConjGradient.h.
|
inline |
Return the L2 norm of this vector.
Definition at line 185 of file ConjGradient.h.
|
inline |
Multiply each element of this vector by s.
Definition at line 176 of file ConjGradient.h.
|
inline |
Deep copy the given vector.
Definition at line 568 of file ConjGradient.h.
|
inline |
Return the value of this vector's ith element.
Definition at line 203 of file ConjGradient.h.
|
inline |
Return the value of this vector's ith element.
Definition at line 204 of file ConjGradient.h.
|
inline |
Reset this vector to have n elements, with uninitialized values.
Definition at line 588 of file ConjGradient.h.
|
inline |
Multiply each element of this vector by s.
Definition at line 624 of file ConjGradient.h.
|
inline |
Return the number of elements in this vector.
Definition at line 159 of file ConjGradient.h.
|
inline |
Return a string representation of this vector.
Definition at line 800 of file ConjGradient.h.
|
inline |
Swap internal storage with another vector, which need not be the same size.
Definition at line 168 of file ConjGradient.h.