25int main(
int argc,
char* argv[])
37 JParser<> zap(
"Example program to find smallest distance between two points.");
47 catch(
const exception &error) {
48 FATAL(error.what() << endl);
51 gRandom->SetSeed(seed);
61 if (inputFile !=
"") {
63 ifstream in(inputFile.c_str());
65 for (
double x, y, z; in >> x >> y >> z; ) {
86 for (const_iterator i = buffer.begin(); i != buffer.end(); ++i)
87 out <<
setw(7) << i->getX() <<
' '
88 <<
setw(7) << i->getX() <<
' '
95 if (buffer.size() < 2) {
99 for (const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
100 DEBUG(i->getX() <<
' ' << i->getY() <<
' ' << i->getZ() <<
endl);
111 for (const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
112 for (const_iterator j = i; ++j != buffer.end(); ) {
114 const double d = i->getDistance(*j);
129 JTimer timer(
"O(n log(n))");
133 const double dmin = getSmallestDistance3D(buffer.begin(), buffer.end());
int main(int argc, char *argv[])
General purpose messaging.
#define DEBUG(A)
Message macros.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
I/O formatting auxiliaries.
Auxiliary class for CPU timing and usage.
void print(std::ostream &out, const JScale_t scale=milli_t) const
Print timer data.
Data structure for vector in three dimensions.
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.