OpenVDB
9.0.1
|
Lightweight, variable-length vector. More...
#include <openvdb/math/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.
using ValueType = T |
|
inline |
Construct an empty vector.
Construct a vector of n elements and initialize each element to the given value.
|
inline |
|
inline |
Return the value of this vector's ith element.
|
inline |
Return the value of this vector's ith element.
|
inline |
Return a pointer to this vector's elements.
|
inline |
Return a pointer to this vector's elements.
|
inline |
Return a pointer to this vector's elements.
|
inline |
Return the dot product of this vector with the given vector, which must be the same size.
|
inline |
Return true
if this vector has no elements.
|
inline |
Return true
if this vector is equivalent to the given vector to within the specified tolerance.
|
inline |
Set all elements of this vector to value.
|
inline |
Return the infinity norm of this vector.
|
inline |
Return true
if every element of this vector has a finite value.
|
inline |
Return the L2 norm of this vector.
|
inline |
Multiply each element of this vector by s.
|
inline |
Return the value of this vector's ith element.
|
inline |
Return the value of this vector's ith element.
|
inline |
Reset this vector to have n elements, with uninitialized values.
|
inline |
Multiply each element of this vector by s.
|
inline |
Return the number of elements in this vector.
|
inline |
Return a string representation of this vector.
|
inline |
Swap internal storage with another vector, which need not be the same size.