% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/th_getter-length.R
\name{get_parent_id}
\alias{get_parent_id}
\alias{get_parent_id,TreeHarp-method}
\alias{get_parent_id,list-method}
\title{Generic for Getting Parent Node Id.}
\usage{
get_parent_id(x, node_num)

\S4method{get_parent_id}{TreeHarp}(x, node_num)

\S4method{get_parent_id}{list}(x, node_num)
}
\arguments{
\item{x}{An object of class TreeHarp or an adjacency list.}

\item{node_num}{An integer, length 1. This the node whose parent we are
after. If node_num is equal to 1, then NULL is returned because that should
be the root node.}
}
\value{
An integer, indicating the parent node.
}
\description{
The generic method definition for getting parent node id.
}
\section{Methods (by class)}{
\itemize{
\item \code{get_parent_id(TreeHarp)}: Obtain parent node id.

Extracts parent id of a node from a TreeHarp object.

\item \code{get_parent_id(list)}: Obtain parent node id.

Extracts parent id of a node from an adjacency list object.

}}
\seealso{
\code{\link{get_child_ids}}
}
