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_multi_stack_support Class Reference

A stack class which contains ... More...

#include <sorted_multi_stack_support.hpp>

List of all members.

Public Types

typedef int_vector< 64 >::size_type size_type

Public Member Functions

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

Detailed Description

A stack class which contains ...

Space complexity
$2n$ bits

Constructor & Destructor Documentation

Constructor.

Parameters:
nMiximum that can be pushed onto the stack

Member Function Documentation

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

Returns if the stack is empty.

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

Unequality Operator.

Two sorted_multi_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_multi_stack_support & sdsl::sorted_multi_stack_support::operator= ( const sorted_multi_stack_support sis) [inline]

Assign Operator.

Required for the Assignable Concept of the STL.

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

Equality Operator.

Two sorted_multi_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.

Returns:
True if there the value of the top element after the execution of pop() is not equal to the value of the top element before the execution of pop(). False otherwise.
bool sdsl::sorted_multi_stack_support::push ( size_type  x) [inline]

Push the index x of vector vec onto the stack.

x value which should be pushed onto the stack.
Returns:
True if the value on the top of the stack is smaller than x. False if the value is equal.
Precondition:
top() <= x
size_type sdsl::sorted_multi_stack_support::size ( ) const [inline]

Returns the number of element is the stack.

const sorted_multi_stack_support::size_type sdsl::sorted_multi_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: