%\VignetteEngine{knitr::knitr}
%\VignetteIndexEntry{ClassDiagram}
\documentclass{article}
\usepackage[margin=.5in]{geometry}
\usepackage{pbox}
\usepackage{adjustbox}
\usepackage{xcolor}
\usepackage{tikz}
%using linguistics makes the tree smaller apparently
\usepackage[linguistics]{forest}

\usetikzlibrary{positioning}
\usetikzlibrary{automata}
\usetikzlibrary{arrows.meta}

\renewcommand{\emph}[1]{\textcolor{blue}{#1}}
\tikzstyle{umlClass}=[color=black, rectangle split, rectangle split parts=3,text centered, text width = 1.5in,text opacity = 1 ,fill opacity= .3 , draw]
\tikzstyle{abstract}=[fill = green ,fill opacity= .3 ]
\tikzstyle{concrete}=[fill = red,fill opacity= .3 ]
\tikzstyle{inherits}=[-{Latex[length=5mm, width=2mm]},dashed]
\tikzstyle{member}=[-{Latex[length=5mm, width=2mm]},blue]

\begin{document}
\maxsizebox*{.95\textwidth}{.95\textheight}{
  \begin{forest}
    umlClass/.style={color=black, rectangle, text opacity=1,fill opacity=.3,draw}
    abstract/.style={fill = green ,fill opacity= .3 }
    concrete/.style={fill = red,fill opacity= .3 }
[
	\parbox{\widthofpbox{
Generic
 \emph{ private::checkType - name val type{=}'self'}\\ \emph{ private::defaultAbstract - ...}\\ \emph{ private::defaultActive - name type value}\\ \emph{ public::debug - string}\\ \emph{ public::initialize - ...}\\ \emph{ public::undebug - string}}}{
Generic
\begin{itemize}
\item \emph{ private::checkType - name val type{=}'self'}\item \emph{ private::defaultAbstract - ...}\item \emph{ private::defaultActive - name type value}\item \emph{ public::debug - string}\item \emph{ public::initialize - ...}\item \emph{ public::undebug - string}\end{itemize}
}
,umlClass,concrete	][\parbox{\widthofpbox{
RecursiveForecastModel
 \emph{ active::data - value}\\ \emph{ active::maxPredCol - value}\\ \emph{ active::predCols - value}\\ \emph{ active::stochastic - value}\\ \emph{ public::fit - data}\\ public::fit\_ - 
\\ \emph{ public::forecast - newdata {=} private\$.data steps{=}1}\\ \emph{ public::predict - newdata}\\ \emph{ public::predictRow - newdata row col}\\ public::predictRow\_ - row
\\ public::predict\_ - col{=}0
\\ public::prepareFitData - data
\\ public::prepareForecastData - data
\\ public::prepareOutputData - inputData steps{=}0
\\ public::preparePredictData - newdata
}}{
RecursiveForecastModel
\begin{itemize}
\item \emph{ active::data - value}\item \emph{ active::maxPredCol - value}\item \emph{ active::predCols - value}\item \emph{ active::stochastic - value}\item \emph{ public::fit - data}\item public::fit\_ - 
\item \emph{ public::forecast - newdata {=} private\$.data steps{=}1}\item \emph{ public::predict - newdata}\item \emph{ public::predictRow - newdata row col}\item public::predictRow\_ - row
\item public::predict\_ - col{=}0
\item public::prepareFitData - data
\item public::prepareForecastData - data
\item public::prepareOutputData - inputData steps{=}0
\item public::preparePredictData - newdata
\end{itemize}
}
,umlClass,abstract	][\parbox{\widthofpbox{
SimulatedIncidenceMatrix
 \emph{ active::mat - value}\\ \emph{ active::sample - value}\\ \emph{ active::simulations - value}\\ \emph{ public::addColumns - columns}\\ \emph{ public::addError - type rows cols mutate {=} TRUE}\\ \emph{ public::addRows - rows}\\ \emph{ public::diff - lag {=} 1 mutate{=}TRUE}\\ \emph{ public::head - k direction{=}2 mutate{=}FALSE}\\ \emph{ public::initialize - data{=}MatrixData\$new() nsim{=}1}\\ \emph{ public::lag - indices mutate {=} TRUE na.rm{=}FALSE}\\ \emph{ public::lead - indices mutate {=} TRUE na.rm{=}FALSE}\\ \emph{ public::mean - }\\ \emph{ public::median - }\\ \emph{ public::mutate - rows cols sims data}\\ \emph{ public::scale - f mutate{=}TRUE}\\ \emph{ public::subsample - simulations mutate{=}TRUE}\\ \emph{ public::subset - rows cols mutate{=}TRUE}\\ \emph{ public::summarize - FUNC ...}\\ \emph{ public::tail - k direction{=}2}}}{
SimulatedIncidenceMatrix
\begin{itemize}
\item \emph{ active::mat - value}\item \emph{ active::sample - value}\item \emph{ active::simulations - value}\item \emph{ public::addColumns - columns}\item \emph{ public::addError - type rows cols mutate {=} TRUE}\item \emph{ public::addRows - rows}\item \emph{ public::diff - lag {=} 1 mutate{=}TRUE}\item \emph{ public::head - k direction{=}2 mutate{=}FALSE}\item \emph{ public::initialize - data{=}MatrixData\$new() nsim{=}1}\item \emph{ public::lag - indices mutate {=} TRUE na.rm{=}FALSE}\item \emph{ public::lead - indices mutate {=} TRUE na.rm{=}FALSE}\item \emph{ public::mean - }\item \emph{ public::median - }\item \emph{ public::mutate - rows cols sims data}\item \emph{ public::scale - f mutate{=}TRUE}\item \emph{ public::subsample - simulations mutate{=}TRUE}\item \emph{ public::subset - rows cols mutate{=}TRUE}\item \emph{ public::summarize - FUNC ...}\item \emph{ public::tail - k direction{=}2}\end{itemize}
}
,umlClass,concrete	][\parbox{\widthofpbox{
ForecastModel
 public::forecast - newdata steps
}}{
ForecastModel
\begin{itemize}
\item public::forecast - newdata steps
\end{itemize}
}
,umlClass,abstract	][\parbox{\widthofpbox{
ObservationList
 \emph{ active::aCellData - value}\\ \emph{ active::aDimData - value}\\ \emph{ active::aDims - value}\\ \emph{ active::aVal - value}\\ \emph{ active::aggregate - value}\\ \emph{ active::arr - value}\\ \emph{ active::cellData - value}\\ \emph{ active::cnames - value}\\ \emph{ active::colData - value}\\ \emph{ active::dimData - value}\\ \emph{ active::dims - value}\\ \emph{ active::dnames - value}\\ \emph{ active::frame - value}\\ \emph{ active::mat - value}\\ \emph{ active::ncol - value}\\ \emph{ active::ndim - value}\\ \emph{ active::nrow - value}\\ \emph{ active::rnames - value}\\ \emph{ active::rowData - value}\\ \emph{ active::slice - value}\\ \emph{ private::updateArray - na.rm {=} private\$na.rm}\\ \emph{ public::formArray - ... val dimData{=}list(),metaData{=}list(),cellData {=} list()}\\ \emph{ public::initialize - data{=}tibble::tibble() ...}}}{
ObservationList
\begin{itemize}
\item \emph{ active::aCellData - value}\item \emph{ active::aDimData - value}\item \emph{ active::aDims - value}\item \emph{ active::aVal - value}\item \emph{ active::aggregate - value}\item \emph{ active::arr - value}\item \emph{ active::cellData - value}\item \emph{ active::cnames - value}\item \emph{ active::colData - value}\item \emph{ active::dimData - value}\item \emph{ active::dims - value}\item \emph{ active::dnames - value}\item \emph{ active::frame - value}\item \emph{ active::mat - value}\item \emph{ active::ncol - value}\item \emph{ active::ndim - value}\item \emph{ active::nrow - value}\item \emph{ active::rnames - value}\item \emph{ active::rowData - value}\item \emph{ active::slice - value}\item \emph{ private::updateArray - na.rm {=} private\$na.rm}\item \emph{ public::formArray - ... val dimData{=}list(),metaData{=}list(),cellData {=} list()}\item \emph{ public::initialize - data{=}tibble::tibble() ...}\end{itemize}
}
,umlClass,concrete	][\parbox{\widthofpbox{
Model
 public::fit - data
\\ public::predict - newdata
}}{
Model
\begin{itemize}
\item public::fit - data
\item public::predict - newdata
\end{itemize}
}
,umlClass,abstract	[
		\parbox{\widthofpbox{
DataContainer
 \emph{ active::metaData - value}}}{
DataContainer
\begin{itemize}
\item \emph{ active::metaData - value}\end{itemize}
}
,umlClass,concrete		[
			\parbox{\widthofpbox{
MatrixData
 active::cellData - value
\\ \emph{ active::cnames - value}\\ \emph{ active::colData - value}\\ \emph{ active::mat - value}\\ \emph{ active::ncol - value}\\ \emph{ active::nrow - value}\\ \emph{ active::rnames - value}\\ \emph{ active::rowData - value}}}{
MatrixData
\begin{itemize}
\item active::cellData - value
\item \emph{ active::cnames - value}\item \emph{ active::colData - value}\item \emph{ active::mat - value}\item \emph{ active::ncol - value}\item \emph{ active::nrow - value}\item \emph{ active::rnames - value}\item \emph{ active::rowData - value}\end{itemize}
}
,umlClass,abstract			[
				\parbox{\widthofpbox{
AbstractIncidenceMatrix
 active::cellData - value
\\ \emph{ active::cnames - value}\\ \emph{ active::rnames - value}\\ public::addColumns - columns mutate{=}TRUE
\\ public::addRows - rows mutate{=}TRUE
\\ public::diff - lag{=}1 mutate{=}TRUE
\\ public::head - k direction mutate{=}TRUE...
\\ public::lag - indices mutate{=}TRUE na.rm{=}FALSE
\\ public::mutate - rows cols data
\\ public::scale - f mutate{=}TRUE
\\ public::subset - rows cols mutate{=}TRUE...
\\ public::tail - k direction mutate{=}TRUE...
}}{
AbstractIncidenceMatrix
\begin{itemize}
\item active::cellData - value
\item \emph{ active::cnames - value}\item \emph{ active::rnames - value}\item public::addColumns - columns mutate{=}TRUE
\item public::addRows - rows mutate{=}TRUE
\item public::diff - lag{=}1 mutate{=}TRUE
\item public::head - k direction mutate{=}TRUE...
\item public::lag - indices mutate{=}TRUE na.rm{=}FALSE
\item public::mutate - rows cols data
\item public::scale - f mutate{=}TRUE
\item public::subset - rows cols mutate{=}TRUE...
\item public::tail - k direction mutate{=}TRUE...
\end{itemize}
}
,umlClass,abstract				[
					\parbox{\widthofpbox{
IncidenceMatrix
 \emph{ active::cellData - value}\\ \emph{ active::colData - value}\\ \emph{ active::frame - value}\\ \emph{ active::mat - value}\\ \emph{ active::rowData - value}\\ \emph{ public::addColumns - columns}\\ \emph{ public::addRows - rows}\\ \emph{ public::as\_sts - pop\_name {=} 'pop' freq\_name {=} 'freq' start\_name {=} 'start' epoch\_name {=} 'epoch' map\_name {=} 'map' neighbourhood\_name {=} 'neighbourhood'}\\ \emph{ public::diff - lag {=} 1 mutate{=}TRUE}\\ \emph{ public::head - k direction{=}2 mutate{=}TRUE}\\ \emph{ public::initialize - data{=}matrix(),metaData{=}list(),rowData{=}list(),colData{=}list(),cellData {=} list()}\\ \emph{ public::lag - indices mutate{=}TRUE na.rm{=}FALSE}\\ \emph{ public::lead - indices mutate{=}TRUE na.rm{=}FALSE}\\ \emph{ public::mutate - rows cols data}\\ \emph{ public::scale - f mutate{=}TRUE}\\ \emph{ public::subset - rows cols mutate{=}TRUE}\\ \emph{ public::tail - k direction{=}2 mutate{=}TRUE}}}{
IncidenceMatrix
\begin{itemize}
\item \emph{ active::cellData - value}\item \emph{ active::colData - value}\item \emph{ active::frame - value}\item \emph{ active::mat - value}\item \emph{ active::rowData - value}\item \emph{ public::addColumns - columns}\item \emph{ public::addRows - rows}\item \emph{ public::as\_sts - pop\_name {=} 'pop' freq\_name {=} 'freq' start\_name {=} 'start' epoch\_name {=} 'epoch' map\_name {=} 'map' neighbourhood\_name {=} 'neighbourhood'}\item \emph{ public::diff - lag {=} 1 mutate{=}TRUE}\item \emph{ public::head - k direction{=}2 mutate{=}TRUE}\item \emph{ public::initialize - data{=}matrix(),metaData{=}list(),rowData{=}list(),colData{=}list(),cellData {=} list()}\item \emph{ public::lag - indices mutate{=}TRUE na.rm{=}FALSE}\item \emph{ public::lead - indices mutate{=}TRUE na.rm{=}FALSE}\item \emph{ public::mutate - rows cols data}\item \emph{ public::scale - f mutate{=}TRUE}\item \emph{ public::subset - rows cols mutate{=}TRUE}\item \emph{ public::tail - k direction{=}2 mutate{=}TRUE}\end{itemize}
}
,umlClass,concrete				]
				][\parbox{\widthofpbox{
ArrayData
 \emph{ active::arr - value}\\ active::cellData - value
\\ \emph{ active::cnames - value}\\ \emph{ active::colData - value}\\ \emph{ active::dimData - value}\\ \emph{ active::dims - value}\\ \emph{ active::dnames - value}\\ \emph{ active::mat - value}\\ \emph{ active::ncol - value}\\ \emph{ active::ndim - value}\\ \emph{ active::nrow - value}\\ \emph{ active::rnames - value}\\ \emph{ active::rowData - value}}}{
ArrayData
\begin{itemize}
\item \emph{ active::arr - value}\item active::cellData - value
\item \emph{ active::cnames - value}\item \emph{ active::colData - value}\item \emph{ active::dimData - value}\item \emph{ active::dims - value}\item \emph{ active::dnames - value}\item \emph{ active::mat - value}\item \emph{ active::ncol - value}\item \emph{ active::ndim - value}\item \emph{ active::nrow - value}\item \emph{ active::rnames - value}\item \emph{ active::rowData - value}\end{itemize}
}
,umlClass,abstract				[
					\parbox{\widthofpbox{
AbstractIncidenceArray
 active::cellData - value
\\ public::addSlices - number dimension{=}2 mutate{=}TRUE
\\ public::apply - FUNC dimension{=}c(1,2)
\\ public::subset - ... mutate{=}TRUE
}}{
AbstractIncidenceArray
\begin{itemize}
\item active::cellData - value
\item public::addSlices - number dimension{=}2 mutate{=}TRUE
\item public::apply - FUNC dimension{=}c(1,2)
\item public::subset - ... mutate{=}TRUE
\end{itemize}
}
,umlClass,abstract					][\parbox{\widthofpbox{
AbstractSimulatedIncidenceMatrix
 active::cellData - value
\\ \emph{ active::dnames - value}\\ \emph{ active::nsim - value}\\ \emph{ active::sample - value}\\ \emph{ active::simulations - value}\\ public::addColumns - columns mutate{=}TRUE
\\ public::addError - type
\\ public::addRows - rows mutate{=}TRUE
\\ public::diff - lag{=}1 mutate{=}TRUE
\\ public::head - k direction mutate{=}TRUE...
\\ public::lag - indices mutate{=}TRUE
\\ public::mutate - rows cols data
\\ public::scale - f mutate{=}TRUE
\\ public::subsample - simulations mutate{=}TRUE...
\\ public::subset - rows cols mutate{=}TRUE...
\\ public::summarize - FUNC
\\ public::tail - k direction mutate{=}TRUE...
}}{
AbstractSimulatedIncidenceMatrix
\begin{itemize}
\item active::cellData - value
\item \emph{ active::dnames - value}\item \emph{ active::nsim - value}\item \emph{ active::sample - value}\item \emph{ active::simulations - value}\item public::addColumns - columns mutate{=}TRUE
\item public::addError - type
\item public::addRows - rows mutate{=}TRUE
\item public::diff - lag{=}1 mutate{=}TRUE
\item public::head - k direction mutate{=}TRUE...
\item public::lag - indices mutate{=}TRUE
\item public::mutate - rows cols data
\item public::scale - f mutate{=}TRUE
\item public::subsample - simulations mutate{=}TRUE...
\item public::subset - rows cols mutate{=}TRUE...
\item public::summarize - FUNC
\item public::tail - k direction mutate{=}TRUE...
\end{itemize}
}
,umlClass,abstract					][\parbox{\widthofpbox{
FrameData
 active::cellData - value
\\ \emph{ active::frame - value}}}{
FrameData
\begin{itemize}
\item active::cellData - value
\item \emph{ active::frame - value}\end{itemize}
}
,umlClass,abstract					[
						\parbox{\widthofpbox{
AbstractObservationList
 active::aggregate - value
\\ active::cellData - value
\\ \emph{ active::frame - value}\\ private::updateArray - 
\\ public::formArray - val ... metaData{=}list(),dimData{=}list()
}}{
AbstractObservationList
\begin{itemize}
\item active::aggregate - value
\item active::cellData - value
\item \emph{ active::frame - value}\item private::updateArray - 
\item public::formArray - val ... metaData{=}list(),dimData{=}list()
\end{itemize}
}
,umlClass,abstract						][\parbox{\widthofpbox{
RelationalData
 active::cellData - value
\\ \emph{ active::tables - value}}}{
RelationalData
\begin{itemize}
\item active::cellData - value
\item \emph{ active::tables - value}\end{itemize}
}
,umlClass,abstract						[
							\parbox{\widthofpbox{
AbstractRelationalTables
 active::cellData - value
\\ \emph{ active::keys - value}\\ \emph{ active::tables - value}\\ private::updateFrame - 
}}{
AbstractRelationalTables
\begin{itemize}
\item active::cellData - value
\item \emph{ active::keys - value}\item \emph{ active::tables - value}\item private::updateFrame - 
\end{itemize}
}
,umlClass,abstract						]
					]
				]
			]
		]
		][\parbox{\widthofpbox{
Forecast
 \emph{ active::data - value}\\ \emph{ active::forecastMadeTime - value}\\ \emph{ active::forecastTimes - value}\\ \emph{ active::model - value}\\ public::binDist - cutoffs include.lowest {=} FALSE right {=} TRUE
\\ public::mean - 
\\ public::median - 
\\ public::quantile - alphas na.rm{=}FALSE
}}{
Forecast
\begin{itemize}
\item \emph{ active::data - value}\item \emph{ active::forecastMadeTime - value}\item \emph{ active::forecastTimes - value}\item \emph{ active::model - value}\item public::binDist - cutoffs include.lowest {=} FALSE right {=} TRUE
\item public::mean - 
\item public::median - 
\item public::quantile - alphas na.rm{=}FALSE
\end{itemize}
}
,umlClass,abstract		][\parbox{\widthofpbox{
MoveAheadModel
 \emph{ active::nsim - value}\\ \emph{ public::fit\_ - }\\ \emph{ public::initialize - nsim {=} 3}\\ \emph{ public::predictRow\_ - row col{=}0}\\ \emph{ public::predict\_ - col{=}0}\\ \emph{ public::prepareFitData - data}\\ \emph{ public::prepareForecastData - data}\\ \emph{ public::prepareOutputData - inputData steps{=}0}\\ \emph{ public::preparePredictData - newdata}}}{
MoveAheadModel
\begin{itemize}
\item \emph{ active::nsim - value}\item \emph{ public::fit\_ - }\item \emph{ public::initialize - nsim {=} 3}\item \emph{ public::predictRow\_ - row col{=}0}\item \emph{ public::predict\_ - col{=}0}\item \emph{ public::prepareFitData - data}\item \emph{ public::prepareForecastData - data}\item \emph{ public::prepareOutputData - inputData steps{=}0}\item \emph{ public::preparePredictData - newdata}\end{itemize}
}
,umlClass,concrete		[
			\parbox{\widthofpbox{
SimpleForecast
 \emph{ active::data - value}\\ \emph{ active::forecastMadeTime - value}\\ \emph{ active::forecastTimes - value}\\ \emph{ active::model - value}\\ \emph{ public::binDist - cutoffs}\\ \emph{ public::initialize - data forecastTimes}\\ \emph{ public::mean - }\\ \emph{ public::median - }\\ \emph{ public::quantile - alphas na.rm{=}FALSE}}}{
SimpleForecast
\begin{itemize}
\item \emph{ active::data - value}\item \emph{ active::forecastMadeTime - value}\item \emph{ active::forecastTimes - value}\item \emph{ active::model - value}\item \emph{ public::binDist - cutoffs}\item \emph{ public::initialize - data forecastTimes}\item \emph{ public::mean - }\item \emph{ public::median - }\item \emph{ public::quantile - alphas na.rm{=}FALSE}\end{itemize}
}
,umlClass,concrete			][\parbox{\widthofpbox{
SimulatedForecast
 \emph{ active::data - value}\\ \emph{ active::forecastMadeTime - value}\\ \emph{ active::forecastTimes - value}\\ \emph{ active::model - value}\\ \emph{ active::nsim - value}\\ \emph{ active::sample - value}\\ \emph{ public::binDist - cutoffs include.lowest {=} FALSE right {=} TRUE}\\ \emph{ public::mean - trim {=} 0 na.rm {=} FALSE}\\ \emph{ public::median - na.rm{=}FALSE}\\ \emph{ public::quantile - probs na.rm{=}FALSE names{=}TRUE type{=}7}}}{
SimulatedForecast
\begin{itemize}
\item \emph{ active::data - value}\item \emph{ active::forecastMadeTime - value}\item \emph{ active::forecastTimes - value}\item \emph{ active::model - value}\item \emph{ active::nsim - value}\item \emph{ active::sample - value}\item \emph{ public::binDist - cutoffs include.lowest {=} FALSE right {=} TRUE}\item \emph{ public::mean - trim {=} 0 na.rm {=} FALSE}\item \emph{ public::median - na.rm{=}FALSE}\item \emph{ public::quantile - probs na.rm{=}FALSE names{=}TRUE type{=}7}\end{itemize}
}
,umlClass,concrete			[
				\parbox{\widthofpbox{
IncidenceForecast
 \emph{ active::data - value}\\ \emph{ active::forecastMadeTime - value}\\ \emph{ active::forecastTimes - value}\\ \emph{ active::model - value}\\ \emph{ public::initialize - data{=}SimulatedIncidenceMatrix\$new(),forecastTimes{=}c()}}}{
IncidenceForecast
\begin{itemize}
\item \emph{ active::data - value}\item \emph{ active::forecastMadeTime - value}\item \emph{ active::forecastTimes - value}\item \emph{ active::model - value}\item \emph{ public::initialize - data{=}SimulatedIncidenceMatrix\$new(),forecastTimes{=}c()}\end{itemize}
}
,umlClass,concrete			]
		]
	]
]
  \end{forest}
}
\end{document}
