% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/graph.R
\name{create_graph}
\alias{create_graph}
\title{Create a phase-type distribution graph}
\usage{
create_graph(
  state_length = NULL,
  callback = NULL,
  parameterized = FALSE,
  nr_samples = NULL
)
}
\arguments{
\item{state_length}{Integer length of state vector}

\item{callback}{Optional R function for graph construction}

\item{parameterized}{Logical, whether edges are parameterized (default FALSE)}

\item{nr_samples}{Integer, number of samples for callback-based construction}
}
\value{
A Graph object
}
\description{
Convenience function to create a Graph object
}
\examples{
\dontrun{
# Simple graph construction
g <- create_graph(state_length = 1)

# Callback-based construction (coalescent model)
coalescent_callback <- function(state) {
  n <- state[1]
  if (n <= 1) return(list())
  rate <- n * (n - 1) / 2
  list(list(c(n - 1), 0.0, c(rate)))
}
g <- create_graph(callback = coalescent_callback, parameterized = TRUE, nr_samples = 5)
}

}
