as.function.exactmvp {jack}R Documentation

Exact multivariate polynomial as function

Description

Coerces an exact multivariate polynomial into a function.

Usage

## S3 method for class 'exactmvp'
as.function(x, ...)

Arguments

x

object of class exactmvp; the functions returned by Jack_julia can return such objects

...

ignored

Value

A function having the same variables as the polynomial.

Examples

# library(jack)
if(JuliaConnectoR::juliaSetupOk()){
  julia <- Jack_julia()
  ( pol <- julia$JackPol(m = 2, lambda = c(3, 1), alpha = "3/2") )
  f <- as.function(pol)
  f(2, "3/7")
  # the evaluation is performed by (R)yacas and complex numbers are
  # allowed; the imaginary unit is denoted by `I`
  f("2 + 2*I", "1/4")
  JuliaConnectoR::stopJulia()
}

[Package jack version 3.0.0 Index]