w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

graphite2::sparse Class Reference

#include <Sparse.h>

Collaboration diagram for graphite2::sparse:
[legend]

Classes

struct  chunk
 

Public Types

typedef uint16 key_type
 
typedef uint16 mapped_type
 
typedef std::pair< const key_type, mapped_typevalue_type
 
typedef uint16 key_type
 
typedef uint16 mapped_type
 
typedef std::pair< const key_type, mapped_typevalue_type
 

Public Member Functions

template<typename I >
 sparse (I first, const I last)
 
 sparse () throw ()
 
 ~sparse () throw ()
 
 operator bool () const throw ()
 
mapped_type operator[] (const key_type k) const throw ()
 
size_t capacity () const throw ()
 
size_t size () const throw ()
 
size_t _sizeof () const throw ()
 
template<typename I >
 sparse (I first, const I last)
 
 sparse () throw ()
 
 ~sparse () throw ()
 
 operator bool () const throw ()
 
mapped_type operator[] (const key_type k) const throw ()
 
size_t capacity () const throw ()
 
size_t size () const throw ()
 
size_t _sizeof () const throw ()
 

Public Attributes

 CLASS_NEW_DELETE
 
chunkmap
 
mapped_typevalues
 

Private Types

typedef unsigned long mask_t
 
typedef unsigned long mask_t
 

Private Member Functions

 sparse (const sparse &)
 
sparseoperator= (const sparse &)
 
 sparse (const sparse &)
 
sparseoperator= (const sparse &)
 

Private Attributes

union {
   chunk *   map
 
   mapped_type *   values
 
m_array
 
key_type m_nchunks
 
union {
   chunk *   map
 
   mapped_type *   values
 
m_array
 

Static Private Attributes

static const unsigned char SIZEOF_CHUNK = (sizeof(mask_t) - sizeof(key_type))*8
 
static const chunk empty_chunk = {0,0}
 

Detailed Description

Definition at line 41 of file Sparse.h.

Member Typedef Documentation

◆ key_type [1/2]

Definition at line 44 of file Sparse.h.

◆ key_type [2/2]

Definition at line 44 of file Sparse.h.

◆ mapped_type [1/2]

Definition at line 45 of file Sparse.h.

◆ mapped_type [2/2]

Definition at line 45 of file Sparse.h.

◆ mask_t [1/2]

typedef unsigned long graphite2::sparse::mask_t
private

Definition at line 49 of file Sparse.h.

◆ mask_t [2/2]

typedef unsigned long graphite2::sparse::mask_t
private

Definition at line 49 of file Sparse.h.

◆ value_type [1/2]

Definition at line 46 of file Sparse.h.

◆ value_type [2/2]

Definition at line 46 of file Sparse.h.

Constructor & Destructor Documentation

◆ sparse() [1/6]

graphite2::sparse::sparse ( const sparse )
private

◆ sparse() [2/6]

template<typename I >
graphite2::sparse::sparse ( I  first,
const I  last 
)

◆ sparse() [3/6]

graphite2::sparse::sparse ( )
throw (
)
inline

Definition at line 89 of file Sparse.h.

References empty_chunk, and m_array.

Referenced by _sizeof().

◆ ~sparse() [1/2]

sparse::~sparse ( )
throw (
)

Definition at line 35 of file Sparse.cpp.

References empty_chunk, free, and m_array.

◆ sparse() [4/6]

graphite2::sparse::sparse ( const sparse )
private

◆ sparse() [5/6]

template<typename I >
graphite2::sparse::sparse ( I  first,
const I  last 
)

◆ sparse() [6/6]

graphite2::sparse::sparse ( )
throw (
)

◆ ~sparse() [2/2]

graphite2::sparse::~sparse ( )
throw (
)

Member Function Documentation

◆ _sizeof() [1/2]

size_t graphite2::sparse::_sizeof ( ) const
throw (
)
inline

Definition at line 163 of file Sparse.h.

References capacity(), m_nchunks, and sparse().

◆ _sizeof() [2/2]

size_t graphite2::sparse::_sizeof ( ) const
throw (
)

References map, and values.

◆ capacity() [1/2]

size_t sparse::capacity ( ) const
throw (
)

Definition at line 53 of file Sparse.cpp.

References graphite2::bit_set_count(), m_array, m_nchunks, n, and s.

Referenced by _sizeof().

◆ capacity() [2/2]

size_t graphite2::sparse::capacity ( ) const
throw (
)

◆ operator bool() [1/2]

graphite2::sparse::operator bool ( ) const
throw (
)
inline

Definition at line 151 of file Sparse.h.

◆ operator bool() [2/2]

graphite2::sparse::operator bool ( ) const
throw (
)

◆ operator=() [1/2]

sparse& graphite2::sparse::operator= ( const sparse )
private

◆ operator=() [2/2]

sparse& graphite2::sparse::operator= ( const sparse )
private

◆ operator[]() [1/2]

sparse::mapped_type sparse::operator[] ( const key_type  k) const
throw (
)

Definition at line 42 of file Sparse.cpp.

References graphite2::bit_set_count(), c, g, k, and m.

◆ operator[]() [2/2]

mapped_type graphite2::sparse::operator[] ( const key_type  k) const
throw (
)

◆ size() [1/2]

size_t graphite2::sparse::size ( ) const
throw (
)
inline

Definition at line 157 of file Sparse.h.

References m_nchunks, and SIZEOF_CHUNK.

◆ size() [2/2]

size_t graphite2::sparse::size ( ) const
throw (
)

Member Data Documentation

◆ CLASS_NEW_DELETE

graphite2::sparse::CLASS_NEW_DELETE

Definition at line 77 of file Sparse.h.

◆ empty_chunk

const sparse::chunk sparse::empty_chunk = {0,0}
staticprivate

Definition at line 59 of file Sparse.h.

Referenced by sparse(), and ~sparse().

◆  [1/2]

graphite2::sparse::m_array { ... } union

Referenced by capacity(), sparse(), and ~sparse().

◆  [2/2]

graphite2::sparse::m_array { ... } union

◆ m_nchunks

key_type graphite2::sparse::m_nchunks
private

Definition at line 84 of file Sparse.h.

Referenced by _sizeof(), capacity(), size(), and sparse().

◆ map

chunk* graphite2::sparse::map

Definition at line 81 of file Sparse.h.

Referenced by _sizeof().

◆ SIZEOF_CHUNK

static const unsigned char graphite2::sparse::SIZEOF_CHUNK = (sizeof(mask_t) - sizeof(key_type))*8
staticprivate

Definition at line 51 of file Sparse.h.

Referenced by size(), and sparse().

◆ values

mapped_type* graphite2::sparse::values

Definition at line 82 of file Sparse.h.

Referenced by _sizeof().


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