OpenVDB 13.0.0

Loading...
Searching...
No Matches
SparseStencilMatrix< ValueType_, STENCIL_SIZE >::RowEditor Class Reference

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

`#include <openvdb/math/ConjGradient.h>`

## 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.
SizeType | setValue (SizeType column, const ValueType &value)
| Set the value of the entry in the specified column.
template<typename Scalar>
void | scale (const Scalar &)
| Scale all of the entries in this row.
template<typename Scalar>
RowEditor & | operator*= (const Scalar &s)
bool | empty () const
const SizeType & | size () const
const ValueType & | getValue (SizeType columnIdx, bool &active) const
const ValueType & | getValue (SizeType columnIdx) const
ConstValueIter | cbegin () const
| Return an iterator over the stored values in this row.
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.
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.
template<typename VecValueType>
VecValueType | dot (const Vector< VecValueType > &inVec) const
| Return the dot product of this row with the given vector.
std::string | str () const
| Return a string representation of this row.

## Static Public Member Functions
static SizeType | capacity ()

## Protected Member Functions
const ValueType & | value (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.

## Protected Attributes
DataType | mData

## Detailed Description

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

Read/write accessor to a row of this matrix.

## Member Typedef Documentation

## ◆ DataType

template<typename ValueType_, SizeType STENCIL_SIZE>
template<typename DataType_ = RowData>

using DataType = DataType_
| inherited

## Constructor & Destructor Documentation

## ◆ RowEditor()

template<typename ValueType, SizeType STENCIL_SIZE>

RowEditor | ( | ValueType * | valueHead,
|  | SizeType * | columnHead,
|  | SizeType & | rowSize,
|  | SizeType | colSize )
| inline

## Member Function Documentation

## ◆ capacity()

template<typename ValueType_, SizeType STENCIL_SIZE>
template<typename DataType_ = RowData>

SizeType capacity | ( |  | ) |
| inline static inherited

## ◆ cbegin()

template<typename ValueType, SizeType STENCIL_SIZE>
template<typename DataType>

SparseStencilMatrix< ValueType, STENCIL_SIZE >::ConstValueIter cbegin | ( |  | ) | const
| inline inherited

Return an iterator over the stored values in this row.

## ◆ clear()

template<typename ValueType, SizeType STENCIL_SIZE>

void clear | ( |  | ) |
| inline

Set the number of entries in this row to zero.

## ◆ column()

template<typename ValueType_, SizeType STENCIL_SIZE>
template<typename DataType_ = RowData>

SizeType column | ( | SizeType | i | ) | const
| inline protected inherited

## ◆ dot() [1/2]

template<typename ValueType, SizeType STENCIL_SIZE>
template<typename DataType>
template<typename VecValueType>

VecValueType dot | ( | const Vector< VecValueType > & | inVec | ) | const
| inline inherited

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

## ◆ dot() [2/2]

template<typename ValueType, SizeType STENCIL_SIZE>
template<typename DataType>
template<typename VecValueType>

VecValueType dot | ( | const VecValueType * | inVec,
|  | SizeType | vecSize ) const
| inline inherited

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

Warning
  inVec must have at least vecSize elements.

## ◆ empty()

template<typename ValueType_, SizeType STENCIL_SIZE>
template<typename DataType_ = RowData>

bool empty | ( |  | ) | const
| inline inherited

## ◆ eq()

template<typename ValueType, SizeType STENCIL_SIZE>
template<typename DataType>
template<typename OtherDataType>

bool eq | ( | const RowBase< OtherDataType > & | other,
|  | ValueType | eps = Tolerance<ValueType>::value() ) const
| inline inherited

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

## ◆ find()

template<typename ValueType, SizeType STENCIL_SIZE>
template<typename DataType>

SizeType find | ( | SizeType | columnIdx | ) | const
| inline protected inherited

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.

## ◆ getValue() [1/2]

template<typename ValueType, SizeType STENCIL_SIZE>
template<typename DataType>

const ValueType & getValue | ( | SizeType | columnIdx | ) | const
| inline inherited

## ◆ getValue() [2/2]

template<typename ValueType, SizeType STENCIL_SIZE>
template<typename DataType>

const ValueType & getValue | ( | SizeType | columnIdx,
|  | bool & | active ) const
| inline inherited

## ◆ operator*=()

template<typename ValueType_, SizeType STENCIL_SIZE>
template<typename Scalar>

RowEditor & operator*= | ( | const Scalar & | s | ) |
| inline

## ◆ scale()

template<typename ValueType, SizeType STENCIL_SIZE>
template<typename Scalar>

void scale | ( | const Scalar & | s | ) |
| inline

Scale all of the entries in this row.

## ◆ setValue()

template<typename ValueType, SizeType STENCIL_SIZE>

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.

## ◆ size()

template<typename ValueType_, SizeType STENCIL_SIZE>
template<typename DataType_ = RowData>

const SizeType & size | ( |  | ) | const
| inline inherited

## ◆ str()

template<typename ValueType, SizeType STENCIL_SIZE>
template<typename DataType>

std::string str | ( |  | ) | const
| inline inherited

Return a string representation of this row.

## ◆ value()

template<typename ValueType_, SizeType STENCIL_SIZE>
template<typename DataType_ = RowData>

const ValueType & value | ( | SizeType | i | ) | const
| inline protected inherited

## Member Data Documentation

## ◆ mData

template<typename ValueType_, SizeType STENCIL_SIZE>
template<typename DataType_ = RowData>

DataType mData
| protected inherited