A stack implementation using a filehash
database
# S4 method for stack
show(object)createS(filename)
initS(filename)
# S4 method for stack
push(db, val, ...)
mpush(db, vals, ...)
# S4 method for stack
mpush(db, vals, ...)
# S4 method for stack
isEmpty(db, ...)
# S4 method for stack
top(db, ...)
# S4 method for stack
pop(db, ...)
a stack object
a stack object
name of file where stack is stored
a stack object
an R object to be added to the stack
arguments passed to other methods
a list of R objects
show(stack)
: Print a stack object.
push(stack)
: Push an object on to the stack
mpush(stack)
: Push a list of R objects on to the stack
isEmpty(stack)
: Indicate whether the stack is empty or not
top(stack)
: Return the top element of the stack
pop(stack)
: Return the top element of the stack and remove that element from the stack
createS()
: Create a filehash Stack
initS()
: Initialize and existing filehash stack
mpush()
: Push multiple R objects on to a stack
stack
Object of class "filehashDB1"
name
Object of class "character"
: the name of the stack (default is the file name in which the stack data are stored)
Objects can be created by calls of the form new("stack", ...)
or by calling createS
. Existing queues can be initialized with initS
.