R/GenTernary.R

Defines functions GenTernary

Documented in GenTernary

#' @name GenTernary
#' @title Generate Polynomial with Ternary
#' @param n the order
#' @return ternary polynomial of order x^^n with coefficients (-1,0,1)
#' @export
#' @examples
#' n = 5
#' GenTernary(n)
GenTernary <- function(n)
  polynomial( sample(c(-1,0,1), n, replace=TRUE) )

Try the HEtools package in your browser

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

HEtools documentation built on June 22, 2024, 11:19 a.m.