3 #ifndef CPPQEDELEMENTS_UTILS_PARTICLEINITIALCONDITION_H_INCLUDED
4 #define CPPQEDELEMENTS_UTILS_PARTICLEINITIALCONDITION_H_INCLUDED
6 #include<boost/tuple/tuple_io.hpp>
14 typedef boost::tuple<double,double,double,bool> Impl;
16 InitialCondition(
double x0,
double k0,
double sig,
bool isItInK=
false) : impl_(x0,k0,sig,isItInK) {}
18 double getX0 ()
const {
return impl_.get<0>();}
19 double getK0 ()
const {
return impl_.get<1>();}
20 double getSig()
const {
return impl_.get<2>();}
21 bool isInK ()
const {
return impl_.get<3>();}
23 const Impl&
get()
const {
return impl_;}
25 Impl&
get() {
return const_cast<Impl&
>(
static_cast<const InitialCondition&
>(*this).get());}
34 inline std::istream&
operator>>(std::istream& is, InitialCondition& ic) {
return is>>ic.get();}
41 #endif // CPPQEDELEMENTS_UTILS_PARTICLEINITIALCONDITION_H_INCLUDED
std::ostream & operator<<(std::ostream &, Method)
std::istream & operator>>(std::istream &, Method &)