NC::Fitter::CoordBase< T > Class Template Reference

Base class for coordinate types. More...

#include <NCFitterTypes.h>

List of all members.

Public Member Functions

 CoordBase ()
 CoordBase (int n)
 Create with n slots preallocated.
 CoordBase (T x, T y)
 Special-case constructor for 2D coordinates.
std::ostream & Print (std::ostream &os=std::cout) const
 Helper function for the operator<< functions.
T & x ()
 Convenience accessor function.
T & y ()
 Convenience accessor function.
T & z ()
 Convenience accessor function.
x () const
 Convenience accessor function.
y () const
 Convenience accessor function.
z () const
 Convenience accessor function.

Detailed Description

template<class T>
class NC::Fitter::CoordBase< T >

Base class for coordinate types.

You don't want to be creating one of these explicity use CoordNDim or CoordInt

See also:
CoordNDim CoordInt

Definition at line 28 of file NCFitterTypes.h.


Constructor & Destructor Documentation

template<class T>
NC::Fitter::CoordBase< T >::CoordBase (  )  [inline]

Definition at line 31 of file NCFitterTypes.h.

00031 {}

template<class T>
NC::Fitter::CoordBase< T >::CoordBase ( int  n  )  [inline]

Create with n slots preallocated.

Definition at line 33 of file NCFitterTypes.h.

00033 : std::vector<T>(n){}

template<class T>
NC::Fitter::CoordBase< T >::CoordBase ( x,
y 
) [inline]

Special-case constructor for 2D coordinates.

Todo:
Inconsistent with std::vector constructor

Definition at line 37 of file NCFitterTypes.h.

00037 {this->push_back(x); this->push_back(y);}


Member Function Documentation

template<class T >
std::ostream & NC::Fitter::CoordBase< T >::Print ( std::ostream &  os = std::cout  )  const [inline]

Helper function for the operator<< functions.

Definition at line 24 of file NCFitterTypes.cxx.

References n, and size.

Referenced by NC::Fitter::operator<<().

00025   {
00026     os << "[ ";
00027     for(unsigned int n = 0; n < this->size(); ++n) os << this->at(n) << " ";
00028     os << "]";
00029     return os;
00030   }

template<class T>
T NC::Fitter::CoordBase< T >::x (  )  const [inline]

Convenience accessor function.

Definition at line 45 of file NCFitterTypes.h.

template<class T>
T& NC::Fitter::CoordBase< T >::x (  )  [inline]

Convenience accessor function.

Definition at line 42 of file NCFitterTypes.h.

Referenced by NC::Fitter::MarginalizeSimpleInt::EvalAtEx().

template<class T>
T NC::Fitter::CoordBase< T >::y (  )  const [inline]

Convenience accessor function.

Definition at line 46 of file NCFitterTypes.h.

template<class T>
T& NC::Fitter::CoordBase< T >::y (  )  [inline]

Convenience accessor function.

Definition at line 43 of file NCFitterTypes.h.

Referenced by NC::Fitter::MarginalizeSimpleInt::EvalAtEx().

template<class T>
T NC::Fitter::CoordBase< T >::z (  )  const [inline]

Convenience accessor function.

Definition at line 47 of file NCFitterTypes.h.

template<class T>
T& NC::Fitter::CoordBase< T >::z (  )  [inline]

Convenience accessor function.

Definition at line 44 of file NCFitterTypes.h.


The documentation for this class was generated from the following files:

Generated on 18 Jan 2018 for loon by  doxygen 1.6.1