SDSL: Succinct Data Structure Library
A C++ template library for succinct data structures
 All Classes Namespaces Files Functions Variables Typedefs Friends
Public Types | Public Member Functions
sdsl::sorted_stack_support Class Reference

A stack class which contains indices of elements from an random access container and the elements are in sorted order on the stack. More...

#include <sorted_stack_support.hpp>

List of all members.

Public Types

typedef int_vector< 64 >::size_type size_type

Public Member Functions

 sorted_stack_support (size_type n)
 Constructor.
 sorted_stack_support (const sorted_stack_support &sis)
bool empty () const
const size_type top () const
void pop ()
void push (size_type x)
size_type size () const
size_type serialize (std::ostream &out) const
void load (std::istream &in)
sorted_stack_supportoperator= (const sorted_stack_support &sis)
 Assign Operator.
bool operator== (const sorted_stack_support &sis) const
 Equality Operator.
bool operator!= (const sorted_stack_support &sis) const
 Unequality Operator.

Detailed Description

A stack class which contains indices of elements from an random access container and the elements are in sorted order on the stack.

Space complexity
$n$ bits

Constructor & Destructor Documentation

Constructor.

Parameters:
nMiximum that can be pushed onto the stack

Member Function Documentation

bool sdsl::sorted_stack_support::empty ( ) const [inline]

Returns if the stack is empty.

bool sdsl::sorted_stack_support::operator!= ( const sorted_stack_support sis) const [inline]

Unequality Operator.

Two sorted_stack_supports are not equal if any member variable are not equal.

Required for the Equality Comparable Concept of the STL.

See also:
operator==
sorted_stack_support & sdsl::sorted_stack_support::operator= ( const sorted_stack_support sis) [inline]

Assign Operator.

Required for the Assignable Concept of the STL.

bool sdsl::sorted_stack_support::operator== ( const sorted_stack_support sis) const [inline]

Equality Operator.

Two sorted_stack_supports are equal if all member variables are equal.

Required for the Equality Comparable Concept of the STL.

See also:
operator!=

Pop the topmost index of the stack.

void sdsl::sorted_stack_support::push ( size_type  x) [inline]

Push the index x of vector vec onto the stack.

x Index of the value in vec which should be pushed onto the stack.
Precondition:
top() < x
size_type sdsl::sorted_stack_support::size ( ) const [inline]

Returns the number of element is the stack.

const sorted_stack_support::size_type sdsl::sorted_stack_support::top ( ) const [inline]

Returns the topmost index on the stack.

Precondition:
empty()==false

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