OpenVDB  9.0.1
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SparseStencilMatrix< ValueType_, STENCIL_SIZE >::RowEditor Class Reference

Read/write accessor to a row of this matrix. More...

#include <openvdb/math/ConjGradient.h>

Inherits SparseStencilMatrix< ValueType_, STENCIL_SIZE >::RowBase< DataType_ >.

Public Types

using DataType = DataType_
 

Public Member Functions

 RowEditor (ValueType *valueHead, SizeType *columnHead, SizeType &rowSize, SizeType colSize)
 
void clear ()
 Set the number of entries in this row to zero. More...
 
SizeType setValue (SizeType column, const ValueType &value)
 Set the value of the entry in the specified column. More...
 
bool empty () const
 
const SizeTypesize () const
 
const ValueTypegetValue (SizeType columnIdx, bool &active) const
 
const ValueTypegetValue (SizeType columnIdx) const
 
ConstValueIter cbegin () const
 Return an iterator over the stored values in this row. More...
 
template<typename OtherDataType >
bool eq (const RowBase< OtherDataType > &other, ValueType eps=Tolerance< ValueType >::value()) const
 Return true if this row is equivalent to the given row to within the specified tolerance. More...
 
template<typename VecValueType >
VecValueType dot (const VecValueType *inVec, SizeType vecSize) const
 Return the dot product of this row with the first vecSize elements of inVec. More...
 
template<typename VecValueType >
VecValueType dot (const Vector< VecValueType > &inVec) const
 Return the dot product of this row with the given vector. More...
 
std::string str () const
 Return a string representation of this row. More...
 
template<typename Scalar >
void scale (const Scalar &)
 Scale all of the entries in this row. More...
 
template<typename Scalar >
RowEditoroperator*= (const Scalar &s)
 Scale all of the entries in this row. More...
 

Static Public Member Functions

static SizeType capacity ()
 

Protected Member Functions

const ValueTypevalue (SizeType i) const
 
SizeType column (SizeType i) const
 
SizeType find (SizeType columnIdx) const
 Return the array index of the first column index that is equal to or greater than the given column index. More...
 

Protected Attributes

DataType mData
 

Detailed Description

template<typename ValueType_, SizeType STENCIL_SIZE>
class openvdb::v9_0::math::pcg::SparseStencilMatrix< ValueType_, STENCIL_SIZE >::RowEditor

Read/write accessor to a row of this matrix.

Member Typedef Documentation

using DataType = DataType_
inherited

Constructor & Destructor Documentation

RowEditor ( ValueType valueHead,
SizeType columnHead,
SizeType rowSize,
SizeType  colSize 
)
inline

Member Function Documentation

static SizeType capacity ( )
inlinestaticinherited
SparseStencilMatrix< ValueType, STENCIL_SIZE >::ConstValueIter cbegin ( ) const
inlineinherited

Return an iterator over the stored values in this row.

void clear ( )
inline

Set the number of entries in this row to zero.

SizeType column ( SizeType  i) const
inlineprotectedinherited
VecValueType dot ( const VecValueType *  inVec,
SizeType  vecSize 
) const
inlineinherited

Return the dot product of this row with the first vecSize elements of inVec.

Warning
inVec must have at least vecSize elements.
VecValueType dot ( const Vector< VecValueType > &  inVec) const
inlineinherited

Return the dot product of this row with the given vector.

bool empty ( ) const
inlineinherited
bool eq ( const RowBase< OtherDataType > &  other,
ValueType  eps = Tolerance<ValueType>::value() 
) const
inlineinherited

Return true if this row is equivalent to the given row to within the specified tolerance.

SizeType find ( SizeType  columnIdx) const
inlineprotectedinherited

Return the array index of the first column index that is equal to or greater than the given column index.

Note
If columnIdx is larger than any existing column index, the return value will point beyond the end of the array.
const ValueType & getValue ( SizeType  columnIdx,
bool &  active 
) const
inlineinherited
const ValueType & getValue ( SizeType  columnIdx) const
inlineinherited
RowEditor& operator*= ( const Scalar &  s)
inline

Scale all of the entries in this row.

void scale ( const Scalar &  s)
inline

Scale all of the entries in this row.

SizeType setValue ( SizeType  column,
const ValueType value 
)
inline

Set the value of the entry in the specified column.

Returns
the current number of entries stored in this row.
const SizeType& size ( ) const
inlineinherited
std::string str ( ) const
inlineinherited

Return a string representation of this row.

const ValueType& value ( SizeType  i) const
inlineprotectedinherited

Member Data Documentation

DataType mData
protectedinherited