Class Julia

Hierarchy

  • Julia

Constructors

Properties

Float16: JuliaDataType
Float32: JuliaDataType
Float64: JuliaDataType
Function: JuliaDataType
Nothing: JuliaDataType
globals: JuliaIdDict
nthreads: number
options: JuliaOptions = DEFAULT_JULIA_OPTIONS

Methods

  • Call a Julia function with variable arguments.

    Parameters

    • func: JuliaFunction

      The Julia function to be called.

    • Rest ...args: any[]

      The arguments to be passed to the function. Non-JuliaValue objects will be automatically wrapped by Julia.autoWrap. Since the automatic wrapping does not work perfectly all the time, be sure to wrap the objects yourself in order to feed the function with the exact types.

    Returns JuliaValue

  • Call a Julia function with keyword arguments and variable arguments.

    Parameters

    • func: JuliaFunction

      The Julia function to be called.

    • kwargs: JuliaNamedTuple | Record<string, any>

      Keyword arguments to be passed to the function. If a plain object is provided, it will be automatically wrapped as a JuliaNamedTuple. Be sure to wrap it yourself to get exact typing.

    • Rest ...args: any[]

      Variable arguments to be passed to the function. Non-JuliaValue objects will be automatically wrapped by. Be sure to wrap it yourself to get exact typing.

    Returns JuliaValue

  • Close the Julia runtime and also close the dynamic library.

    Parameters

    • status: number = 0

      Status code to be reported.

    Returns void

  • Delete an object from the global scope maintained by jlbun.

    Returns

    Whether the object was deleted.

    Parameters

    • name: string

      Name of the object to be deleted.

    Returns boolean

  • Evaluate a Julia code fragment and get the result as a JuliaValue.

    Parameters

    • code: string

      Julia code to be evaluated.

    Returns JuliaValue

  • Retrieve an object from the global scope maintained by jlbun.

    Parameters

    • name: string

      Name of the object to be retrieved.

    Returns JuliaValue

  • Get the string representation of a Julia value's type.

    Parameters

    • ptr: number | JuliaValue

      Pointer to a Julia object, or a JuliaValue object.

    Returns string

  • Parameters

    • code: string

    Returns void

  • Import a module and get a JuliaModule object referring to that module.

    Parameters

    • name: string

      Name of the module to be imported.

    Returns JuliaModule

  • Initialize the Julia runtime. All other methods need to be called after this.

    Parameters

    • extraOptions: Partial<JuliaOptions> = {}

      Extra options for initialization.

    Returns void

  • Get a string representation of a JuliaValue using Julia's repr() function, with the given MIME.

    Parameters

    • value: JuliaValue

      Object to be represented.

    • mime: MIME = MIME.Default

      The MIME to use. Default to MIME.Default.

    Returns string

  • Sava an object to the global scope maintained by jlbun.

    Parameters

    • name: string

      Name to use.

    • obj: JuliaValue

      Object to be saved.

    Returns void

  • Stringify a JuliaValue using Julia's string() function,

    Parameters

    Returns string

  • Evaluate a Julia code fragment and get the result as a JuliaValue. This method supports value-interpolation, meaning that the tagged values will be automatically wrapped and interpolated into the code.

    Parameters

    • strings: TemplateStringsArray

      Strings separated by tagged values

    • Rest ...values: any[]

      Tagged values to be interpolated

    Returns JuliaValue

Generated using TypeDoc