VTK: vtkReservoirSampler< Integer, Monotonic > Class Template Reference

| VTK 9.3.1

Public Member Functions | Protected Member Functions | List of all members
vtkReservoirSampler< Integer, Monotonic > Class Template Reference

`#include <vtkReservoirSampler.h>`

Inheritance diagram for vtkReservoirSampler< Integer, Monotonic >:
[legend]
Collaboration diagram for vtkReservoirSampler< Integer, Monotonic >:
[legend]

## Public Member Functions
const std::vector< Integer > & | operator() (Integer kk, Integer nn) const
| Choose kk items from a sequence of (0, nn - 1). More...
const std::vector< Integer > & | operator() (Integer kk, vtkAbstractArray *array) const
| Choose kk items from a sequence of (0, array->GetNumberOfTuples() - 1). More...

## Protected Member Functions
void | GenerateSample (Integer kk, Integer nn, std::vector< Integer > &data) const

## Additional Inherited Members
Protected Types inherited from vtkReservoirSamplerBase
using | SeedType = typename std::random_device::result_type
Static Protected Member Functions inherited from vtkReservoirSamplerBase
static SeedType | RandomSeed ()

## Detailed Description

### template<typename Integer, bool Monotonic = true>
class vtkReservoirSampler< Integer, Monotonic >

Definition at line 45 of file vtkReservoirSampler.h.

## Member Function Documentation

## ◆ operator()() [1/2]

template<typename Integer , bool Monotonic = true>

const std::vector<Integer>& vtkReservoirSampler< Integer, Monotonic >::operator() | ( | Integer | kk,
|  | Integer | nn
| ) |  | const
| inline

Choose kk items from a sequence of (0, nn - 1).

This will throw an exception if kk <= 0.

Definition at line 51 of file vtkReservoirSampler.h.

## ◆ operator()() [2/2]

template<typename Integer , bool Monotonic = true>

const std::vector<Integer>& vtkReservoirSampler< Integer, Monotonic >::operator() | ( | Integer | kk,
|  | vtkAbstractArray * | array
| ) |  | const
| inline

Choose kk items from a sequence of (0, array->GetNumberOfTuples() - 1).

This will throw an exception if kk <= 0.

Definition at line 61 of file vtkReservoirSampler.h.

## ◆ GenerateSample()

template<typename Integer , bool Monotonic = true>

void vtkReservoirSampler< Integer, Monotonic >::GenerateSample | ( | Integer | kk,
|  | Integer | nn,
|  | std::vector< Integer > & | data
| ) |  | const
| inlineprotected

Definition at line 77 of file vtkReservoirSampler.h.

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

- Common/Math/vtkReservoirSampler.h