Datum.cpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2004 CSIRO ICT Centre
00003  *
00004  * $Id: Datum.cpp 587 2004-12-03 15:06:33Z nch $
00005  */
00006 
00007 #include <iostream>
00008 
00009 #include "Datum.h"
00010 #include "Object.h"
00011 
00012 
00013 Datum::Datum(unsigned long long i, double r, double d, double sigma)
00014     : Object(r, d),
00015       id(i),
00016       orthoSD(sigma),
00017       decSD(sigma),
00018       validSD(true),
00019       sd(sigma)
00020 {
00021 }
00022 
00023 Datum::Datum(unsigned long long i, double r, double rSD, double d, double dSD)
00024     : Object(r, d),
00025       id(i),
00026       orthoSD(rSD),
00027       decSD(dSD),
00028       validSD(false),
00029       sd(0.0)
00030 {
00031 }
00032 
00033 double Datum::getSD() const
00034 {
00035   if (!validSD)
00036   {
00037     sd = (orthoSD > decSD) ? orthoSD : decSD;
00038     validSD = true;
00039   }
00040 
00041   return sd;
00042 }
00043 
00044 void Datum::print(std::ostream & os) const
00045 {
00046   os << getId() << " ";
00047 
00048   Object::print(os);
00049 }
Generated on Mon Oct 4 10:39:55 2010 for Matching.kdevelop by  doxygen 1.6.3