% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree_routines.R
\name{get_levels}
\alias{get_levels}
\title{Obtains the node levels from a tree.}
\usage{
get_levels(adj_list)
}
\arguments{
\item{adj_list}{The adjacency list of the tree.}
}
\value{
It returns a vector of integers. The length of this vector will be
the number of nodes in the tree. The root is at level 1, the next is at level
 2, and so on.
}
\description{
This function obtains the node levels from a tree.
}
\details{
This function is used to check if the specification of the tree is
in BFS order. If that is indeed the case, the levels of each node should be
sorted.

This function is not exported for the general user.
}
