Operator overloads

Operator overloads. More...

Functions

std::ostream & Sequence::operator<< (std::ostream &s, const chromosome &c)
 output operator for chromosome types in coalescent simulation Outputs the segments contained by the chromosome
std::ostream & Sequence::operator<< (std::ostream &s, const marginal &m)
 Write a marginal tree to an ostream.
std::ostream & Sequence::operator<< (std::ostream &o, const samflag &s)
std::istream & Sequence::operator>> (std::istream &i, samflag &s)
std::istream & Sequence::operator>> (std::istream &i, samrecord &b)
std::ostream & Sequence::operator<< (std::ostream &o, const samrecord &b)
std::ostream & Sequence::operator<< (std::ostream &stream, class SimParams &object)
std::istream & Sequence::operator>> (std::istream &s, SimParams &c)
template<typename T >
std::istream & Sequence::operator>> (std::istream &s, AlignStream< T > &c)
template<typename T >
std::ostream & Sequence::operator<< (std::ostream &s, const AlignStream< T > &c)
template<typename key , typename value >
std::vector< std::pair< key,
value > > 
Sequence::operator+ (const std::vector< std::pair< key, value > > &lhs, const std::vector< std::pair< key, value > > &rhs)
template<typename key , typename value >
std::vector< std::pair< key,
value > > 
Sequence::operator+= (std::vector< std::pair< key, value > > &lhs, const std::vector< std::pair< key, value > > &rhs)
template<typename key , typename value , typename comparison >
std::map< key, value, comparison > Sequence::operator+ (const std::map< key, value, comparison > &lhs, const std::map< key, value, comparison > &rhs)
template<typename key , typename value , typename comparison >
std::map< key, value, comparison > Sequence::operator+= (std::map< key, value, comparison > &lhs, const std::map< key, value, comparison > &rhs)
std::istream & Sequence::operator>> (std::istream &s, PolyTable &c)
std::ostream & Sequence::operator<< (std::ostream &o, const PolyTable &c)
std::ostream & Sequence::operator<< (std::ostream &s, const Seq &c)
std::istream & Sequence::operator>> (std::istream &s, Seq &c)
std::ostream & Sequence::operator<< (std::ostream &s, const SeqException &c)

Detailed Description

Operator overloads.


Function Documentation

template<typename key , typename value , typename comparison >
std::map< key, value, comparison > Sequence::operator+ ( const std::map< key, value, comparison > &  lhs,
const std::map< key, value, comparison > &  rhs 
) [inline]

Add 2 maps together. The return vector contains all the elements of type T present in lhs and rhs. For all elements T that lhs and rhs have in common, the associated value of element I is the sum of the values in lhs and rhs.

Note:
operator== must be defined for type T, and operator+ must be valid for type value

Definition at line 66 of file CountingOperators.tcc.

template<typename key , typename value >
std::vector< std::pair< key, value > > Sequence::operator+ ( const std::vector< std::pair< key, value > > &  lhs,
const std::vector< std::pair< key, value > > &  rhs 
) [inline]

Add 2 vectors of pairs together. The return vector contains all the elements of type T present in lhs and rhs. For all elements T that lhs and rhs have in common, the associated value of element I is the sum of the values in lhs and rhs.

Note:
operator== must be defined for type T, and operator+ must be valid for type value

Definition at line 33 of file CountingOperators.tcc.

template<typename key , typename value , typename comparison >
std::map< key, value, comparison > Sequence::operator+= ( std::map< key, value, comparison > &  lhs,
const std::map< key, value, comparison > &  rhs 
) [inline]

operator+= for two maps

Note:
operator== must be defined for type key, and operator+ must be valid for type value

Definition at line 89 of file CountingOperators.tcc.

template<typename key , typename value >
std::vector< std::pair< key, value > > Sequence::operator+= ( std::vector< std::pair< key, value > > &  lhs,
const std::vector< std::pair< key, value > > &  rhs 
) [inline]

operator+= for two vectors of pairs.

Note:
operator== must be defined for type key, and operator+ must be valid for type value

Definition at line 59 of file CountingOperators.tcc.

std::ostream& Sequence::operator<< ( std::ostream &  s,
const SeqException &  c 
) [inline]

Allows objects derived from Sequence::SeqException to be written to output streams. This operator acts by a call to the funtion Sequence::SeqException::print

Definition at line 76 of file SeqExceptions.hpp.

std::ostream& Sequence::operator<< ( std::ostream &  s,
const Seq &  c 
) [inline]

Allows objects derived from Sequence::Seq to be written to output streams. This operator acts by a call to the virtual funtion Sequence::Seq::print

Definition at line 104 of file Seq.hpp.

std::ostream& Sequence::operator<< ( std::ostream &  o,
const PolyTable &  c 
) [inline]

Allows objects derived from Sequence::PolyTable to be written out to streams

Definition at line 270 of file PolyTable.hpp.

template<typename T >
std::ostream& Sequence::operator<< ( std::ostream &  s,
const AlignStream< T > &  c 
) [inline]

Allows objects derived from Sequence::AlignStream to be printed to output streams. The operator works by calling the virtual function Sequence::AlignStream::print

Definition at line 162 of file AlignStream.hpp.

std::ostream& Sequence::operator<< ( std::ostream &  stream,
class SimParams &  object 
)

Writes the parameters passed to Dick Hudson's coalescent simulation program to an output stream.

Definition at line 99 of file SimParams.cc.

std::ostream & Sequence::operator<< ( std::ostream &  o,
const samrecord &  b 
)
std::ostream & Sequence::operator<< ( std::ostream &  o,
const samflag &  s 
)
std::istream& Sequence::operator>> ( std::istream &  s,
Seq &  c 
) [inline]

Allows objects derived from Sequence::Seq to be read from output streams. This operator acts by a call to the virtual funtion Sequence::Seq::read

Definition at line 116 of file Seq.hpp.

std::istream& Sequence::operator>> ( std::istream &  s,
PolyTable &  c 
) [inline]

Allows objects derived from Sequence::PolyTable to be read in from streams

Definition at line 260 of file PolyTable.hpp.

template<typename T >
std::istream& Sequence::operator>> ( std::istream &  s,
AlignStream< T > &  c 
) [inline]

Allows objects derived from Sequence::AlignStream to be read in from input streams. The operator works by calling the virtual function Sequence::AlignStream::read

Definition at line 150 of file AlignStream.hpp.

std::istream & Sequence::operator>> ( std::istream &  s,
SimParams &  c 
)

Allows the simulation parameters from Dick Hudson's coalescent simulation program to be read in from streams.

std::istream & Sequence::operator>> ( std::istream &  i,
samrecord &  b 
)
std::istream & Sequence::operator>> ( std::istream &  i,
samflag &  s 
)
Generated on Thu Aug 11 13:22:00 2011 for libsequence by  doxygen 1.6.3