aitools::invertedindex::Triple< T1, T2, T3 > Class Template Reference

#include <Triple.hpp>

List of all members.

Public Types

typedef T1 e1_type
typedef T2 e2_type
typedef T3 e3_type

Public Member Functions

 Triple ()
 Triple (T1 e1, T2 e2, T3 e3)
 Triple (const Triple< T1, T2, T3 > &triple)
virtual ~Triple ()
void clear ()
double score () const
bool operator== (const Triple< T1, T2, T3 > &triple) const
bool operator!= (const Triple< T1, T2, T3 > &triple) const
bool operator> (const Triple< T1, T2, T3 > &triple) const
bool operator< (const Triple< T1, T2, T3 > &triple) const
void parse (std::istream &is)
T1 & e1 ()
T2 & e2 ()
T3 & e3 ()
const T1 & e1 () const
const T2 & e2 () const
const T3 & e3 () const
void print (std::ostream &os) const
void to_bytes (ByteBuffer &buffer) const
void wrap (const char *data, size_t size)
void wrap (const ByteBuffer &buffer)

Static Public Attributes

static const std::string classname
static const size_t sizeof_T1 = sizeof(T1)
static const size_t sizeof_T2 = sizeof(T2)
static const size_t sizeof_T3 = sizeof(T3)
static const size_t offset_T2 = sizeof_T1
static const size_t offset_T3 = sizeof_T2 + offset_T2
static const size_t sizeof_value = sizeof_T1 + sizeof_T2 + sizeof_T3

Private Attributes

T1 e1_
T2 e2_
T3 e3_

Detailed Description

template<typename T1, typename T2, typename T3>
class aitools::invertedindex::Triple< T1, T2, T3 >

A class template of a concrete Value. This class interprets its ByteBuffer as three primitive values. Valid primitive types defined by the template parameters T1, T2 and T3 are [u]int[ 8 | 16 | 32 | 64 ]_t | float | double

Author:
martin.trenkmann@uni-weimar.de
Version:
Id
Triple.hpp,v 1.1 2010/10/15 17:44:47 trenkman Exp

Definition at line 25 of file Triple.hpp.


Member Typedef Documentation

template<typename T1, typename T2, typename T3>
typedef T1 aitools::invertedindex::Triple< T1, T2, T3 >::e1_type

Definition at line 30 of file Triple.hpp.

template<typename T1, typename T2, typename T3>
typedef T2 aitools::invertedindex::Triple< T1, T2, T3 >::e2_type

Definition at line 31 of file Triple.hpp.

template<typename T1, typename T2, typename T3>
typedef T3 aitools::invertedindex::Triple< T1, T2, T3 >::e3_type

Definition at line 32 of file Triple.hpp.


Constructor & Destructor Documentation

template<typename T1 , typename T2 , typename T3 >
aitools::invertedindex::Triple< T1, T2, T3 >::Triple (  )  [inline]

The default constructor.

Definition at line 141 of file Triple.hpp.

template<typename T1, typename T2, typename T3>
aitools::invertedindex::Triple< T1, T2, T3 >::Triple ( T1  e1,
T2  e2,
T3  e3 
) [inline]

The explicit constructor.

Definition at line 148 of file Triple.hpp.

template<typename T1, typename T2, typename T3>
aitools::invertedindex::Triple< T1, T2, T3 >::Triple ( const Triple< T1, T2, T3 > &  triple  )  [inline]

The copy constructor.

Definition at line 155 of file Triple.hpp.

template<typename T1 , typename T2 , typename T3 >
aitools::invertedindex::Triple< T1, T2, T3 >::~Triple (  )  [inline, virtual]

The destructor.

Definition at line 162 of file Triple.hpp.


Member Function Documentation

template<typename T1 , typename T2 , typename T3 >
void aitools::invertedindex::Triple< T1, T2, T3 >::clear (  )  [inline, virtual]
template<typename T1 , typename T2 , typename T3 >
const T1 & aitools::invertedindex::Triple< T1, T2, T3 >::e1 (  )  const [inline]

Access the 1st element for reading.

Definition at line 247 of file Triple.hpp.

References aitools::invertedindex::Triple< T1, T2, T3 >::e1_.

template<typename T1 , typename T2 , typename T3 >
T1 & aitools::invertedindex::Triple< T1, T2, T3 >::e1 (  )  [inline]

Access the 1st element for writing.

Definition at line 226 of file Triple.hpp.

References aitools::invertedindex::Triple< T1, T2, T3 >::e1_.

Referenced by BOOST_AUTO_TEST_CASE(), and aitools::invertedindex::NGramFileReader::next().

Here is the caller graph for this function:

template<typename T1 , typename T2 , typename T3 >
const T2 & aitools::invertedindex::Triple< T1, T2, T3 >::e2 (  )  const [inline]

Access the 2nd element for reading.

Definition at line 254 of file Triple.hpp.

References aitools::invertedindex::Triple< T1, T2, T3 >::e2_.

template<typename T1 , typename T2 , typename T3 >
T2 & aitools::invertedindex::Triple< T1, T2, T3 >::e2 (  )  [inline]

Access the 2nd element for writing.

Definition at line 233 of file Triple.hpp.

References aitools::invertedindex::Triple< T1, T2, T3 >::e2_.

Referenced by aitools::invertedindex::NGramFileReader::next().

Here is the caller graph for this function:

template<typename T1 , typename T2 , typename T3 >
const T3 & aitools::invertedindex::Triple< T1, T2, T3 >::e3 (  )  const [inline]

Access the 3th element for reading.

Definition at line 261 of file Triple.hpp.

References aitools::invertedindex::Triple< T1, T2, T3 >::e3_.

template<typename T1 , typename T2 , typename T3 >
T3 & aitools::invertedindex::Triple< T1, T2, T3 >::e3 (  )  [inline]

Access the 3th element for writing.

Definition at line 240 of file Triple.hpp.

References aitools::invertedindex::Triple< T1, T2, T3 >::e3_.

Referenced by aitools::invertedindex::NGramFileReader::next().

Here is the caller graph for this function:

template<typename T1, typename T2, typename T3>
bool aitools::invertedindex::Triple< T1, T2, T3 >::operator!= ( const Triple< T1, T2, T3 > &  triple  )  const [inline]

Definition at line 190 of file Triple.hpp.

template<typename T1, typename T2, typename T3>
bool aitools::invertedindex::Triple< T1, T2, T3 >::operator< ( const Triple< T1, T2, T3 > &  triple  )  const [inline]

Definition at line 204 of file Triple.hpp.

References aitools::invertedindex::Triple< T1, T2, T3 >::score().

Here is the call graph for this function:

template<typename T1, typename T2, typename T3>
bool aitools::invertedindex::Triple< T1, T2, T3 >::operator== ( const Triple< T1, T2, T3 > &  triple  )  const [inline]
template<typename T1, typename T2, typename T3>
bool aitools::invertedindex::Triple< T1, T2, T3 >::operator> ( const Triple< T1, T2, T3 > &  triple  )  const [inline]

Definition at line 197 of file Triple.hpp.

References aitools::invertedindex::Triple< T1, T2, T3 >::score().

Here is the call graph for this function:

template<typename T1 , typename T2 , typename T3 >
void aitools::invertedindex::Triple< T1, T2, T3 >::parse ( std::istream &  is  )  [inline, virtual]
template<typename T1 , typename T2 , typename T3 >
void aitools::invertedindex::Triple< T1, T2, T3 >::print ( std::ostream &  os  )  const [inline, virtual]
template<typename T1 , typename T2 , typename T3 >
double aitools::invertedindex::Triple< T1, T2, T3 >::score (  )  const [inline, virtual]

Gets the weight of this object.

Implements aitools::invertedindex::Value.

Definition at line 176 of file Triple.hpp.

References aitools::invertedindex::Triple< T1, T2, T3 >::e1_.

Referenced by aitools::invertedindex::Triple< T1, T2, T3 >::operator<(), and aitools::invertedindex::Triple< T1, T2, T3 >::operator>().

Here is the caller graph for this function:

template<typename T1 , typename T2 , typename T3 >
void aitools::invertedindex::Triple< T1, T2, T3 >::to_bytes ( ByteBuffer buffer  )  const [inline, virtual]
template<typename T1 , typename T2 , typename T3 >
void aitools::invertedindex::Triple< T1, T2, T3 >::wrap ( const ByteBuffer buffer  )  [inline]

Interprets a byte buffer.

Reimplemented from aitools::invertedindex::Value.

Definition at line 306 of file Triple.hpp.

References aitools::invertedindex::Triple< T1, T2, T3 >::wrap().

Here is the call graph for this function:

template<typename T1 , typename T2 , typename T3 >
void aitools::invertedindex::Triple< T1, T2, T3 >::wrap ( const char *  data,
size_t  size 
) [inline, virtual]

Member Data Documentation

template<typename T1, typename T2, typename T3>
const std::string aitools::invertedindex::Triple< T1, T2, T3 >::classname [inline, static]

Definition at line 36 of file Triple.hpp.

template<typename T1, typename T2, typename T3>
T1 aitools::invertedindex::Triple< T1, T2, T3 >::e1_ [private]
template<typename T1, typename T2, typename T3>
T2 aitools::invertedindex::Triple< T1, T2, T3 >::e2_ [private]
template<typename T1, typename T2, typename T3>
T3 aitools::invertedindex::Triple< T1, T2, T3 >::e3_ [private]
template<typename T1, typename T2, typename T3>
const size_t aitools::invertedindex::Triple< T1, T2, T3 >::offset_T2 = sizeof_T1 [static]
template<typename T1, typename T2, typename T3>
const size_t aitools::invertedindex::Triple< T1, T2, T3 >::offset_T3 = sizeof_T2 + offset_T2 [static]
template<typename T1, typename T2, typename T3>
const size_t aitools::invertedindex::Triple< T1, T2, T3 >::sizeof_T1 = sizeof(T1) [static]
template<typename T1, typename T2, typename T3>
const size_t aitools::invertedindex::Triple< T1, T2, T3 >::sizeof_T2 = sizeof(T2) [static]
template<typename T1, typename T2, typename T3>
const size_t aitools::invertedindex::Triple< T1, T2, T3 >::sizeof_T3 = sizeof(T3) [static]
template<typename T1, typename T2, typename T3>
const size_t aitools::invertedindex::Triple< T1, T2, T3 >::sizeof_value = sizeof_T1 + sizeof_T2 + sizeof_T3 [static]

The documentation for this class was generated from the following file:
Generated on Wed May 30 15:07:39 2012 by  doxygen 1.6.3