stack-class {filehash} | R Documentation |
A stack implementation using a filehash
database
Objects can be created by calls of the form new("stack", ...)
or
by calling createS
. Existing queues can be initialized with
initS
.
stack
:"filehashDB1"
name
:"character"
: the name of
the stack (default is the file name in which the stack data are
stored)signature(db = "stack")
: returns
TRUE
/FALSE
depending on whether there are elements
in the stack.signature(db = "stack")
: returns the value of the
top of the stack and subsequently removes that
element from the stack; an error is signaled if the stack is emptysignature(db = "stack")
: adds an element to the
top of the stacksignature(object = "stack")
: prints the name of
the stacksignature(db = "stack")
: returns the value of the
top of the stack; an error is signaled if the stack
is emptysignature(db = "stack")
: works like push
except it can push multiple objects in a list on to the stackRoger D. Peng rpeng@jhsph.edu
showClass("stack")