KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Friends | List of all members
semantics::Categorical_event< N > Class Template Reference

look-up key class for contingency table More...

#include <Categorical_event.h>

Inheritance diagram for semantics::Categorical_event< N >:
semantics::Categorical_event_base

Public Types

typedef Categorical_event< N > Self_type
 
- Public Types inherited from semantics::Categorical_event_base
typedef Categorical_event_base Self_type
 
typedef size_t Val_type
 
typedef std::vector< Val_typeData_type
 
typedef size_t Hash_type
 

Public Member Functions

 Categorical_event ()
 default ctor More...
 
 Categorical_event (Data_type data, size_t size)
 construct look-up key from a standard container, More...
 
 Categorical_event (Data_type::const_iterator first, Data_type::const_iterator last, size_t size)
 alternative ctor using iterators More...
 
 Categorical_event (const Self_type &other)
 copy constructor More...
 
const size_t & size () const
 get length of data key More...
 
const size_t & front () const
 get first data entry More...
 
const size_t & back () const
 get last data entry More...
 
bool operator== (const Self_type &other) const
 two keys are equal iff their hash values are equal More...
 
std::ostream & print_to (std::ostream &os) const
 print key data to ostream os More...
 

Friends

Categorical_event< N-1 > smooth (const Self_type &event, const size_t steps)
 get smoothed key (context simplified by one level) More...
 
Categorical_event< N > get_context (const Self_type &event, const size_t steps)
 get RHS of conditioning context More...
 
size_t hash_value (Self_type const &e)
 return underlying hash value More...
 

Detailed Description

template<size_t N>
class semantics::Categorical_event< N >

look-up key class for contingency table

Member Typedef Documentation

template<size_t N>
typedef Categorical_event<N> semantics::Categorical_event< N >::Self_type

Constructor & Destructor Documentation

template<size_t N>
semantics::Categorical_event< N >::Categorical_event ( )
inline

default ctor

template<size_t N>
semantics::Categorical_event< N >::Categorical_event ( Data_type  data,
size_t  size 
)
inline

construct look-up key from a standard container,

Parameters
datastandard container containing lookup key data
sizeintended size of lookup key (for consistency checking)
template<size_t N>
semantics::Categorical_event< N >::Categorical_event ( Data_type::const_iterator  first,
Data_type::const_iterator  last,
size_t  size 
)
inline

alternative ctor using iterators

Parameters
firstiterator to beginning of data range
lastiterator to end of data range
sizeasserted size, for consistency check
template<size_t N>
semantics::Categorical_event< N >::Categorical_event ( const Self_type other)
inline

copy constructor

Member Function Documentation

template<size_t N>
const size_t& semantics::Categorical_event< N >::back ( ) const
inline

get last data entry

template<size_t N>
const size_t& semantics::Categorical_event< N >::front ( ) const
inline

get first data entry

template<size_t N>
bool semantics::Categorical_event< N >::operator== ( const Self_type other) const
inlinevirtual

two keys are equal iff their hash values are equal

Reimplemented from semantics::Categorical_event_base.

template<size_t N>
std::ostream & semantics::Categorical_event< N >::print_to ( std::ostream &  os) const
virtual

print key data to ostream os

Reimplemented from semantics::Categorical_event_base.

template<size_t N>
const size_t& semantics::Categorical_event< N >::size ( ) const
inline

get length of data key

Friends And Related Function Documentation

template<size_t N>
Categorical_event<N> get_context ( const Self_type event,
const size_t  steps = 1 
)
friend

get RHS of conditioning context

template<size_t N>
size_t hash_value ( Self_type const &  e)
friend

return underlying hash value

template<size_t N>
Categorical_event<N-1> smooth ( const Self_type event,
const size_t  steps = 1 
)
friend

get smoothed key (context simplified by one level)


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