Stress test for PointIsolationAlg. More...
#include "larexamples/Algorithms/RemoveIsolatedSpacePoints/PointIsolationAlg.h"
#include <cmath>
#include <stdexcept>
#include <chrono>
#include <sstream>
#include <iostream>
#include <array>
Go to the source code of this file.
Functions | |
template<typename T > | |
T | cube (T side) |
template<typename Point > | |
std::vector< Point > | createPointsInCube (unsigned int pointsPerSide) |
template<typename T > | |
void | PrintConfiguration (typename lar::example::PointIsolationAlg< T >::Configuration_t const &config, std::ostream &out=std::cout) |
template<typename T > | |
void | StressTest (unsigned int pointsPerSide, typename lar::example::PointIsolationAlg< T >::Configuration_t const &config) |
int | main (int argc, char **argv) |
Stress test for PointIsolationAlg.
Runs a isolation removal algorithm on a set of points distributed in a cubic grid.
Usage:
PointIsolationAlg_test NumberOfPoints[+|-] IsolationRadius
where NumberOfPoints is an approximation of the number of points to be generated on a grid and processed. Due to the strict geometric pattern, only perfect cubes are allowed as number of points. The perfect cube closest to NumberOfPoints be effectively used, unless "+" or "-" are specified, in which cases the next non-smaller or non-larger cube will be used, respectively. The points are places in a simple grid, with a distance of 1 (arbitrary unit) one from the next on each direction. The IsolationRadius parameter is measured in the same unit.
On configuration failure, the test returns with exit code 1. On test failure, the test returns with exit code 2.
Definition in file PointIsolationAlgStress_test.cc.
std::vector<Point> createPointsInCube | ( | unsigned int | pointsPerSide | ) |
Definition at line 55 of file PointIsolationAlgStress_test.cc.
T cube | ( | T | side | ) |
Definition at line 52 of file PointIsolationAlgStress_test.cc.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 153 of file PointIsolationAlgStress_test.cc.
void PrintConfiguration | ( | typename lar::example::PointIsolationAlg< T >::Configuration_t const & | config, |
std::ostream & | out = std::cout |
||
) |
Definition at line 78 of file PointIsolationAlgStress_test.cc.
void StressTest | ( | unsigned int | pointsPerSide, |
typename lar::example::PointIsolationAlg< T >::Configuration_t const & | config | ||
) |
Definition at line 94 of file PointIsolationAlgStress_test.cc.