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) {
	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 May 1, 2019, 8:24 p.m.