MCPcopy Create free account
hub / github.com/Kitware/VTK / GenerateRandomTuple

Function GenerateRandomTuple

Filters/General/vtkRandomAttributeGenerator.cxx:43–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41//------------------------------------------------------------------------------
42template <class T>
43void GenerateRandomTuple(
44 T* data, vtkIdType i, int numComp, int minComp, int maxComp, double min, double max)
45{
46 for (int comp = minComp; comp <= maxComp; comp++)
47 {
48 // Now generate a random component value
49 data[i * numComp + comp] = static_cast<T>(vtkMath::Random(min, max));
50 }
51}
52
53//------------------------------------------------------------------------------
54void GenerateRandomTupleBit(vtkDataArray* data, vtkIdType i, int minComp, int maxComp)

Callers 1

GenerateRandomTuplesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected