[][src]Struct julia_set::Function

pub struct Function { /* fields omitted */ }
This is supported on crate features dyn_cpu_backend or opencl_backend or vulkan_backend only.

Parsed complex-valued function of a single variable.

A Function instance can be created using FromStr trait. A function must use z as the (only) argument. A function may use arithmetic operations (+, -, *, /, ^) and/or predefined unary functions:

  • General functions: arg, sqrt, exp, log
  • Hyperbolic trigonometry: sinh, cosh, tanh
  • Inverse hyperbolic trigonometry: asinh, acosh, atanh

A function may define local variable assignment(s). The assignment syntax is similar to Python (or Rust, just without the let keyword): variable name followed by = and then by the arithmetic expression. Assignments must be separated by semicolons ;. As in Rust, the last expression in function body is its return value.

Examples

let function: Function = "z * z - 0.5".parse()?;
let fn_with_calls: Function = "0.8 * z + z / atanh(z ^ -4)".parse()?;
let fn_with_vars: Function = "c = -0.5 + 0.4i; z * z + c".parse()?;

Trait Implementations

impl Backend<&'_ Function> for Cpu[src]

type Error = Infallible

Error that may be returned during program creation.

type Program = CpuProgram<Function>

Program output by the backend.

impl Backend<&'_ Function> for OpenCl[src]

type Error = Error

Error that may be returned during program creation.

type Program = OpenClProgram

Program output by the backend.

impl Backend<&'_ Function> for Vulkan[src]

type Error = Error

Error that may be returned during program creation.

type Program = VulkanProgram

Program output by the backend.

impl Clone for Function[src]

impl ComputePoint for Function[src]

impl Debug for Function[src]

impl FromStr for Function[src]

type Err = FnError

The associated error which can be returned from parsing.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Content for T[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.