\Header{depthStruct}{tools for manipulating depth concepts for rooted DAGs}
\alias{DMdepth}{depthStruct}
\alias{ontoDepth}{depthStruct}
\keyword{models}{depthStruct}
\begin{Description}\relax
return a list of environments giving mapping from
node name to rooted DAG depth and from depth to vector of names of nodes
at that depth
\end{Description}
\begin{Usage}
\begin{verbatim}
depthStruct(rg)
ontoDepth(rg)
DMdepth(g, maxd)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{rg}] rg: instance of class rootedDAG
\item[\code{g}] rg: instance of class depth
\item[\code{maxd}] maxd: bound on depth to be measured
\end{ldescription}
\end{Arguments}
\begin{Value}
depthStruct: a list of two environments (see examples).
\end{Value}
\begin{Note}\relax
ontoDepth is the workhorse for depthStruct.
DMdepth is a function that works on a plain graph, creating
the 'daughter matrix' and computing depths.
\end{Note}
\begin{Author}\relax
Vince Carey <stvjc@channing.harvard.edu>
\end{Author}
\begin{Examples}
\begin{ExampleCode}
data(litOnto)
print(litOnto)
g1 <- new("rootedDAG", DAG=litOnto, root="A")
o1 <- new("ontology", name="demo", version="0.1",
        rDAG=g1)
print(ds <- depthStruct(g1))
ds$tag2depth("A")
ds$tag2depth("H")
ds$depth2tag(2)
\end{ExampleCode}
\end{Examples}

