R/part_of.R

Defines functions part_of

Documented in part_of

#' @title Part of
#'
#' @description Check if a node is part of a petri net
#'
#' @param node A node
#' @param PN A Petri Net
#'
#' @export part_of

part_of <- function(node, PN) {

	lifecycle::deprecate_warn(
		when = "0.3.0",
		what = "part_of()",
		with = "is_node()")

	if(node %in% transitions(PN)$id)
		return(T)
	else if(node %in% places(PN)$id)
		return(T)
	else
		return(F)
}

Try the petrinetR package in your browser

Any scripts or data that you put into this service are public.

petrinetR documentation built on April 3, 2023, 5:21 p.m.