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

Function InsertImplicitArray

Common/DataModel/Testing/Cxx/TestTable.cxx:201–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201void InsertImplicitArray(vtkTable* table, std::vector<std::vector<double>>& stdTable)
202{
203 vtkVariant name(table->GetNumberOfColumns());
204 vtkNew<vtkConstantArray<int>> arr;
205 arr->SetBackend(std::make_shared<vtkConstantImplicitBackend<int>>(42));
206 arr->SetNumberOfComponents(1);
207 arr->SetNumberOfTuples(table->GetNumberOfRows());
208 arr->SetName((name.ToString() + " (vtkConstantArray)").c_str());
209 table->InsertColumn(arr, 0);
210
211 std::vector<double> fillvec;
212 fillvec.resize(table->GetNumberOfRows(), 42);
213 stdTable.insert(stdTable.begin(), fillvec);
214
215 CheckEqual(table, stdTable, "InsertImplicitColumn");
216}
217
218void InsertRows(
219 vtkTable* table, std::vector<std::vector<double>>& stdTable, const vtkIdType r0, const int n)

Callers 1

TestTableFunction · 0.85

Calls 13

CheckEqualFunction · 0.85
GetNumberOfColumnsMethod · 0.45
SetBackendMethod · 0.45
SetNumberOfComponentsMethod · 0.45
SetNumberOfTuplesMethod · 0.45
GetNumberOfRowsMethod · 0.45
SetNameMethod · 0.45
c_strMethod · 0.45
ToStringMethod · 0.45
InsertColumnMethod · 0.45
resizeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected