Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
IndexTable< VAL > Class Template Reference

#include "lib/diff/index-table.hpp"

Description

template<typename VAL>
class lib::diff::IndexTable< VAL >

data snapshot and lookup table

Definition at line 52 of file index-table.hpp.

Public Types

using iterator = std::vector< VAL >::iterator
 
using const_iterator = std::vector< VAL >::const_iterator
 

Public Member Functions

template<class SEQ >
 IndexTable (SEQ const &seq)
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
size_t size () const
 
VAL const & getElement (size_t i) const
 
bool contains (VAL const &elm) const
 
size_t pos (VAL const &elm) const
 

Private Member Functions

void __rejectDuplicate (VAL const &elm)
 

Private Attributes

std::vector< VAL > data_
 
std::map< VAL, size_t > idx_
 

Constructor & Destructor Documentation

◆ IndexTable()

template<typename VAL >
template<class SEQ >
IndexTable ( SEQ const &  seq)
inline

Definition at line 59 of file index-table.hpp.

References IndexTable< VAL >::__rejectDuplicate(), IndexTable< VAL >::data_, and IndexTable< VAL >::idx_.

+ Here is the call graph for this function:

Member Typedef Documentation

◆ iterator

template<typename VAL >
using iterator = std::vector<VAL>::iterator

Definition at line 72 of file index-table.hpp.

◆ const_iterator

template<typename VAL >
using const_iterator = std::vector<VAL>::const_iterator

Definition at line 73 of file index-table.hpp.

Member Function Documentation

◆ begin() [1/2]

template<typename VAL >
iterator begin ( )
inline

Definition at line 75 of file index-table.hpp.

References IndexTable< VAL >::data_.

Referenced by DiffDetector< SEQ >::isChanged().

+ Here is the caller graph for this function:

◆ end() [1/2]

template<typename VAL >
iterator end ( )
inline

Definition at line 76 of file index-table.hpp.

References IndexTable< VAL >::data_.

Referenced by DiffDetector< SEQ >::isChanged().

+ Here is the caller graph for this function:

◆ begin() [2/2]

template<typename VAL >
const_iterator begin ( ) const
inline

Definition at line 77 of file index-table.hpp.

References IndexTable< VAL >::data_.

◆ end() [2/2]

template<typename VAL >
const_iterator end ( ) const
inline

Definition at line 78 of file index-table.hpp.

References IndexTable< VAL >::data_.

◆ size()

template<typename VAL >
size_t size ( ) const
inline

Definition at line 80 of file index-table.hpp.

References IndexTable< VAL >::data_.

Referenced by IndexTable< VAL >::contains(), IndexTable< VAL >::getElement(), DiffDetector< SEQ >::DiffFrame::hasNew(), DiffDetector< SEQ >::DiffFrame::hasOld(), and IndexTable< VAL >::pos().

+ Here is the caller graph for this function:

◆ getElement()

template<typename VAL >
VAL const & getElement ( size_t  i) const
inline

Definition at line 86 of file index-table.hpp.

References IndexTable< VAL >::data_, and IndexTable< VAL >::size().

Referenced by DiffDetector< SEQ >::DiffFrame::consumeNew(), DiffDetector< SEQ >::DiffFrame::consumeOld(), DiffDetector< SEQ >::DiffFrame::newElm(), and DiffDetector< SEQ >::DiffFrame::oldElm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ contains()

template<typename VAL >
bool contains ( VAL const &  elm) const
inline

Definition at line 94 of file index-table.hpp.

References IndexTable< VAL >::pos(), and IndexTable< VAL >::size().

Referenced by DiffDetector< SEQ >::DiffFrame::canDelete(), and DiffDetector< SEQ >::DiffFrame::canInsert().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pos()

template<typename VAL >
size_t pos ( VAL const &  elm) const
inline

Definition at line 101 of file index-table.hpp.

References IndexTable< VAL >::idx_, and IndexTable< VAL >::size().

Referenced by IndexTable< VAL >::contains(), DiffDetector< SEQ >::DiffFrame::needFetch(), and DiffDetector< SEQ >::DiffFrame::obsoleted().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __rejectDuplicate()

template<typename VAL >
void __rejectDuplicate ( VAL const &  elm)
inlineprivate

Definition at line 110 of file index-table.hpp.

References util::contains(), and IndexTable< VAL >::idx_.

Referenced by IndexTable< VAL >::IndexTable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ data_

◆ idx_

template<typename VAL >
std::map<VAL,size_t> idx_
private
+ Inheritance diagram for IndexTable< VAL >:
+ Collaboration diagram for IndexTable< VAL >:

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