VTK  9.7.20261118
vtk::keys::SparseKeys< TKey, TElementId > Class Template Reference

#include <vtkKeys.h>

Detailed Description

template<typename TKey = vtkIdType, typename TElementId = vtkIdType>
class vtk::keys::SparseKeys< TKey, TElementId >

The sparse keys of the elements, returned by ScatterSparse(): the distinct keys, in increasing order of their operator<, whose key id is their position.

The keys can be of any type ordered by operator<, e.g., a std::pair of point ids for edges. The distinct keys are shared with the reductions of these keys.

Definition at line 259 of file vtkKeys.h.

Inheritance diagram for vtk::keys::SparseKeys< TKey, TElementId >:
[legend]
Collaboration diagram for vtk::keys::SparseKeys< TKey, TElementId >:
[legend]

Public Types

using KeyType = TKey
using KeyIdType = TElementId
Public Types inherited from vtk::keys::KeysBase< vtkIdType, vtkIdType, vtkIdType >
using KeyType
using ElementIdType
using KeyIdType

Public Member Functions

KeyType GetKey (KeyIdType keyId) const
 The key of a key id, and the key id of a key, -1 if absent, by a binary search.
KeyIdType FindKeyId (KeyType key) const
void Reset ()
 Release the memory, the distinct keys once no reduction shares them.
Public Member Functions inherited from vtk::keys::KeysBase< vtkIdType, vtkIdType, vtkIdType >
vtkIdType GetNumberOfRecords () const
vtkIdType GetNumberOfElements () const
KeyIdType GetNumberOfKeys () const
ElementIdType GetOffset (KeyIdType keyId) const
 The first element of a key id, 0 <= keyId <= GetNumberOfKeys().
const ElementIdType * GetOffsets () const
 The first element of every key id, GetNumberOfKeys() + 1 values, nullptr without element.
ElementIdType GetNumberOfElementsOfKey (KeyIdType keyId) const

Friends

struct detail::SparseScatterer
struct detail::Reducer
struct detail::Grouper

Additional Inherited Members

Protected Member Functions inherited from vtk::keys::KeysBase< vtkIdType, vtkIdType, vtkIdType >
void ResetBase ()
void CopyBaseFrom (const KeysBase &other)
Protected Attributes inherited from vtk::keys::KeysBase< vtkIdType, vtkIdType, vtkIdType >
vtkIdType NumberOfRecords
vtkIdType NumberOfElements
KeyIdType NumberOfKeys
std::unique_ptr< ElementIdType[]> Offsets

Member Typedef Documentation

◆ KeyType

template<typename TKey = vtkIdType, typename TElementId = vtkIdType>
using vtk::keys::SparseKeys< TKey, TElementId >::KeyType = TKey

Definition at line 262 of file vtkKeys.h.

◆ KeyIdType

template<typename TKey = vtkIdType, typename TElementId = vtkIdType>
using vtk::keys::SparseKeys< TKey, TElementId >::KeyIdType = TElementId

Definition at line 263 of file vtkKeys.h.

Member Function Documentation

◆ GetKey()

template<typename TKey = vtkIdType, typename TElementId = vtkIdType>
KeyType vtk::keys::SparseKeys< TKey, TElementId >::GetKey ( KeyIdType keyId) const
inline

The key of a key id, and the key id of a key, -1 if absent, by a binary search.

Definition at line 270 of file vtkKeys.h.

◆ FindKeyId()

template<typename TKey = vtkIdType, typename TElementId = vtkIdType>
KeyIdType vtk::keys::SparseKeys< TKey, TElementId >::FindKeyId ( KeyType key) const

◆ Reset()

template<typename TKey = vtkIdType, typename TElementId = vtkIdType>
void vtk::keys::SparseKeys< TKey, TElementId >::Reset ( )
inline

Release the memory, the distinct keys once no reduction shares them.

Definition at line 276 of file vtkKeys.h.

◆ detail::SparseScatterer

template<typename TKey = vtkIdType, typename TElementId = vtkIdType>
friend struct detail::SparseScatterer
friend

Definition at line 283 of file vtkKeys.h.

◆ detail::Reducer

template<typename TKey = vtkIdType, typename TElementId = vtkIdType>
friend struct detail::Reducer
friend

Definition at line 284 of file vtkKeys.h.

◆ detail::Grouper

template<typename TKey = vtkIdType, typename TElementId = vtkIdType>
friend struct detail::Grouper
friend

Definition at line 285 of file vtkKeys.h.


The documentation for this class was generated from the following file: