MCPcopy Create free account
hub / github.com/PDAL/PDAL / TEST

Function TEST

test/unit/filters/LloydKMeansFilterTest.cpp:43–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41{
42
43TEST(LloydKMeansFilterTest, simple)
44{
45 Options ro;
46 ro.add("filename", Support::datapath("las/sample_c.las"));
47
48 StageFactory factory;
49 Stage& r = *(factory.createStage("readers.las"));
50 r.setOptions(ro);
51
52 Options fo;
53 fo.add("k", "10");
54 fo.add("maxiters", "10");
55 fo.add("dimensions", "X,Y,Z");
56
57 Stage& f = *(factory.createStage("filters.lloydkmeans"));
58 f.setInput(r);
59 f.setOptions(fo);
60
61 PointTable table;
62 f.prepare(table);
63 PointViewSet viewSet = f.execute(table);
64 PointViewPtr view = *viewSet.begin();
65
66 EXPECT_EQ(1u, viewSet.size());
67 EXPECT_EQ(14408u, view->size());
68}
69
70} // namespace pdal

Callers

nothing calls this directly

Calls 8

datapathFunction · 0.85
createStageMethod · 0.80
setOptionsMethod · 0.80
addMethod · 0.45
prepareMethod · 0.45
executeMethod · 0.45
beginMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected